Skip to content

Commit 4f90ed9

Browse files
updated lifecycle
1 parent 567f094 commit 4f90ed9

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
from typing import Any, Optional
66

77
from agent_framework import (
8-
ChatAgent,
9-
HostedMCPTool,
8+
Agent,
109
MCPStreamableHTTPTool,
1110
)
1211

@@ -46,8 +45,8 @@ def __init__(
4645
) -> None:
4746
self._stack: AsyncExitStack | None = None
4847
self.mcp_cfg: MCPConfig | None = mcp
49-
self.mcp_tool: HostedMCPTool | None = None
50-
self._agent: ChatAgent | None = None
48+
self.mcp_tool: MCPStreamableHTTPTool | None = None
49+
self._agent: Agent | None = None
5150
self.team_service: TeamService | None = team_service
5251
self.team_config: TeamConfiguration | None = team_config
5352
self.client: Optional[AgentsClient] = None
@@ -155,9 +154,9 @@ def get_chat_client(self) -> AzureAIClient:
155154
"""
156155
if (
157156
self._agent
158-
and self._agent.chat_client
157+
and self._agent.client
159158
):
160-
return self._agent.chat_client # type: ignore
159+
return self._agent.client # type: ignore
161160
chat_client = AzureAIClient(
162161
project_endpoint=self.project_endpoint,
163162
agent_name=self.agent_name,

0 commit comments

Comments
 (0)