Skip to content

Commit 911c3c8

Browse files
Merge pull request #740 from microsoft/psl-raifix
fix: store _agent.chat_client.agent_id in cosmosDB instead of local agent id
2 parents fdd4af7 + 4496833 commit 911c3c8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/backend/v4/magentic_agents/common/lifecycle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ async def save_database_team_agent(self) -> None:
279279
stored_id = await get_database_team_agent_id(
280280
self.memory_store, self.team_config, self.agent_name
281281
)
282-
if stored_id == self._agent.id:
282+
if stored_id == self._agent.chat_client.agent_id:
283283
self.logger.info(
284284
"RAI reuse: id unchanged (id=%s); skip save.", self._agent.id
285285
)
@@ -289,7 +289,7 @@ async def save_database_team_agent(self) -> None:
289289
team_id=self.team_config.team_id,
290290
team_name=self.team_config.name,
291291
agent_name=self.agent_name,
292-
agent_foundry_id=self._agent.id,
292+
agent_foundry_id=self._agent.chat_client.agent_id,
293293
agent_description=self.agent_description,
294294
agent_instructions=self.agent_instructions,
295295
)

0 commit comments

Comments
 (0)