Skip to content

fix: upgraded the agent-framework to latest version#860

Merged
Roopan-Microsoft merged 10 commits intomainfrom
dev-v4
Mar 17, 2026
Merged

fix: upgraded the agent-framework to latest version#860
Roopan-Microsoft merged 10 commits intomainfrom
dev-v4

Conversation

@Dhruvkumar-Microsoft
Copy link
Collaborator

Purpose

This pull request introduces significant updates to the agent framework integration across the backend, focusing on upgrading dependencies to release candidates, refactoring agent and message types, and updating agent protocol methods to match the new framework API. The changes modernize agent initialization and invocation, streamline tool handling, and improve message and session management. The most important changes are grouped below:

Dependency and Framework Upgrades

  • Updated agent-framework-azure-ai and agent-framework-core dependencies to 1.0.0rc4 and added agent-framework-orchestrations==1.0.0b260311, ensuring compatibility with the latest agent framework API. Also upgraded azure-ai-projects to 2.0.0. (src/backend/pyproject.toml) [1] [2]

Agent and Message Type Refactoring

  • Replaced legacy ChatAgent, ChatMessage, and HostedCodeInterpreterTool types with new Agent, Message, and ChatOptions types throughout the codebase, including agent initialization, message handling, and tool collection. (src/backend/v4/callbacks/response_handlers.py, src/backend/v4/magentic_agents/common/lifecycle.py, src/backend/v4/magentic_agents/foundry_agent.py, src/backend/v4/magentic_agents/proxy_agent.py) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Agent Protocol and Session Management

  • Refactored agent protocol methods to use AgentSession instead of AgentThread, updated run and streaming invocation methods to match the new framework contract, and improved session handling in the proxy agent. (src/backend/v4/magentic_agents/proxy_agent.py) [1] [2] [3]

Tool Handling and Azure Search Integration

  • Updated tool handling logic: removed HostedCodeInterpreterTool (now handled server-side), replaced AzureAISearchAgentTool with AzureAISearchTool, and clarified tool initialization paths for both MCP and Azure Search modes. (src/backend/v4/magentic_agents/foundry_agent.py) [1] [2] [3] [4]

Message and Content Serialization

  • Improved message and content serialization in agent responses, ensuring use of the new Content.from_text and proper role assignment, and updated websocket event payloads to use explicit dict serialization for frontend compatibility. (src/backend/v4/magentic_agents/proxy_agent.py) [1] [2] [3]

These changes collectively modernize the backend agent integration, align with the latest agent framework, and streamline agent and message handling throughout the codebase.

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

fix: codeQL fix for raising the error
@Roopan-Microsoft Roopan-Microsoft merged commit bb5a11f into main Mar 17, 2026
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants