Skip to content

Upgrade azure-ai-agentserver-agentframework to agent-framework 1.0.0rc1#45239

Open
eavanvalkenburg wants to merge 2 commits intoAzure:lusu/agentserver-1110from
eavanvalkenburg:fix_agentserver_agentframework
Open

Upgrade azure-ai-agentserver-agentframework to agent-framework 1.0.0rc1#45239
eavanvalkenburg wants to merge 2 commits intoAzure:lusu/agentserver-1110from
eavanvalkenburg:fix_agentserver_agentframework

Conversation

@eavanvalkenburg
Copy link
Contributor

@eavanvalkenburg eavanvalkenburg commented Feb 18, 2026

Summary

Upgrades the agent-framework dependency from 1.0.0b251007 (Oct 2025) to 1.0.0rc1 (Feb 2026), applying all breaking changes from the official upgrade guide.

Breaking changes applied

  • AgentProtocolSupportsAgentRun
  • ChatMessage/Role/TextContentMessage/string roles/Content
  • AgentRunResponseAgentResponse, AgentRunResponseUpdateAgentResponseUpdate
  • run_stream()run(stream=True) returning ResponseStream
  • isinstance checks → Content.type string discriminator with match statements
  • .create_agent().as_agent() in samples
  • WorkflowBuilder constructor, WorkflowEvent, options pattern in workflow sample
  • setup_observability()configure_azure_monitor() + enable_instrumentation()

Refactoring

  • Replaced unnecessary classes with module-level functions and constants (Constants, AgentIdGenerator, AgentFrameworkInputConverter)
  • Python 3.10+ match statements throughout converters
  • Added text_reasoning content type support
  • Added warning logging for unknown content types
  • Streaming converter uses ResponseStream async iteration pattern

Testing

All 9 unit tests pass.

Copilot AI review requested due to automatic review settings February 18, 2026 16:34
@github-actions github-actions bot added Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Hosted Agents sdk/agentserver/* labels Feb 18, 2026
@github-actions
Copy link

Thank you for your contribution @eavanvalkenburg! We will review the pull request and get back to you soon.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the azure-ai-agentserver-agentframework package to use agent-framework version 1.0.0b260212 (February 2026 release), applying significant breaking changes from the upstream framework. The upgrade modernizes the codebase with Python 3.10+ features and simplifies the architecture.

Changes:

  • Upgraded agent-framework dependencies from 1.0.0b251007 to 1.0.0b260212
  • Refactored utility classes into module-level functions and constants
  • Replaced isinstance checks with Python 3.10+ match statements throughout converters
  • Updated streaming API from run_stream() to run(stream=True) returning ResponseStream
  • Modernized observability setup from setup_observability() to configure_azure_monitor() + enable_instrumentation()

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pyproject.toml Updated agent-framework dependencies to version 1.0.0b260212
constants.py Converted Constants class to module-level constants
agent_id_generator.py Converted AgentIdGenerator class to generate_agent_id() function
agent_framework_input_converters.py Refactored AgentFrameworkInputConverter class to transform_input() function; replaced isinstance checks with match statements
agent_framework_output_streaming_converter.py Updated to use AgentResponseUpdate, Content types; added text_reasoning support; replaced isinstance with match statements
agent_framework_output_non_streaming_converter.py Updated to use AgentResponse, Content types; replaced isinstance with match statements
agent_framework.py Updated to use SupportsAgentRun; changed streaming API to run(stream=True); modernized observability setup; removed asyncio timeout logic
test_agent_framework_input_converter.py Updated tests to use transform_input function and new Message/Content APIs
workflow_agent_simple.py Updated to use new Message/Content APIs, WorkflowEvent, WorkflowBuilder(start_executor=...) pattern
minimal_async_example.py Changed create_agent() to as_agent()
mcp_simple.py Changed create_agent() to as_agent()
mcp_apikey.py Changed create_agent() to as_agent()
minimal_example.py Changed create_agent() to as_agent()

@eavanvalkenburg eavanvalkenburg force-pushed the fix_agentserver_agentframework branch 5 times, most recently from 04c6572 to df4ff48 Compare February 23, 2026 09:25
@eavanvalkenburg eavanvalkenburg changed the title Upgrade azure-ai-agentserver-agentframework to agent-framework 1.0.0b260212 Upgrade azure-ai-agentserver-agentframework to agent-framework 1.0.0rc1 Feb 24, 2026
@eavanvalkenburg eavanvalkenburg changed the base branch from main to lusu/agentserver-1110 February 24, 2026 19:04
eavanvalkenburg and others added 2 commits February 25, 2026 12:01
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@eavanvalkenburg eavanvalkenburg force-pushed the fix_agentserver_agentframework branch from 2b1b4c4 to 67b69fd Compare February 25, 2026 11:01


class AgentFrameworkInputConverter:
def transform_input( # pylint: disable=too-many-return-statements
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you do the update based on dev branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Hosted Agents sdk/agentserver/*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants