Skip to content

A2A support with a new microsoft-agents-hosting-a2a package - #596

Draft
Rodrigo Brandão (rodrigobr-msft) wants to merge 44 commits into
mainfrom
users/robrandao/a2a
Draft

Rodrigo Brandão (rodrigobr-msft) wants to merge 44 commits into
mainfrom
users/robrandao/a2a

Conversation

@rodrigobr-msft

Copy link
Copy Markdown
Contributor

This pull request introduces the new microsoft-agents-hosting-a2a library and adds support for the A2A protocol across the codebase. It also includes enhancements to the core activity model and test coverage for A2A JWT validation. The most important changes are summarized below.


A2A Protocol and Library Integration:

  • Added the new microsoft-agents-hosting-a2a library, including its public API, client, turn context, agent extension, and supporting files. This provides first-class support for the A2A protocol, enabling integration with A2A agents and services. (microsoft_agents/hosting/a2a/__init__.py, a2a_agent_extension.py, a2a_client.py, a2a_turn_context.py, activity/__init__.py, MANIFEST.in, LICENSE) [1] [2] [3] [4] [5] [6] [7]
  • Registered the new library as a dependency for integration tests. (dev/integration/pyproject.toml)

A2A Protocol Support in Core Libraries:

  • Added the a2a channel to the list of supported channel IDs in the activity model. (microsoft_agents/activity/channels.py)
  • Added a new error code to EndOfConversationCodes for improved error handling. (microsoft_agents/activity/end_of_conversation_codes.py)

Activity Model Enhancements:

  • Added a get_streaming_entity helper to the Activity class to retrieve streaming-related entities, and improved typing and documentation for get_product_info_entity. (microsoft_agents/activity/activity.py) [1] [2]
  • Allowed service_url and request_id to be None in ConversationReference and Activity, respectively, improving flexibility for A2A and other scenarios. (microsoft_agents/activity/conversation_reference.py, microsoft_agents/activity/activity.py) [1] [2]
  • Imported StreamInfo in the activity model to support streaming entities. (microsoft_agents/activity/activity.py)

Testing and Validation:

  • Added integration tests for A2A JWT validation, including acceptance of real service connection tokens and rejection of tokens with invalid audiences. (dev/integration/tests/jwt_validation/test_a2a_jwt_validation.py)

@rodrigobr-msft Rodrigo Brandão (rodrigobr-msft) linked an issue Sep 23, 2026 that may be closed by this pull request
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.

A2A Support in Agents SDK for Python

1 participant