Skip to content

Python: feat: Add Agent Framework to A2A bridge support#2403

Open
Shubham-Kumar-2000 wants to merge 16 commits intomicrosoft:mainfrom
Shubham-Kumar-2000:agent_framework_to_a2a
Open

Python: feat: Add Agent Framework to A2A bridge support#2403
Shubham-Kumar-2000 wants to merge 16 commits intomicrosoft:mainfrom
Shubham-Kumar-2000:agent_framework_to_a2a

Conversation

@Shubham-Kumar-2000
Copy link

@Shubham-Kumar-2000 Shubham-Kumar-2000 commented Nov 23, 2025

Motivation and Context

This integration enables agent framework agents to communicate and execute as a A2A hosted agent server.

Description

  • Implement A2A event adapter for converting agent messages to A2A protocol
  • Implement A2A executor for running agents in A2A environment
  • Add comprehensive unit tests for event adapter, and executor
  • Update agent framework core A2A module exports and type stubs
  • Integrate thread management utilities for async execution
  • Add getting started sample for A2A agent framework integration
  • Update dependencies in uv.lock

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

- Implement A2A event adapter for converting agent messages to A2A protocol
- Add A2A execution context for managing agent execution state
- Implement A2A executor for running agents in A2A environment
- Add comprehensive unit tests for event adapter, execution context, and executor
- Update agent framework core A2A module exports and type stubs
- Integrate thread management utilities for async execution
- Add getting started sample for A2A agent framework integration
- Update dependencies in uv.lock

This integration enables agent framework agents to communicate and execute within the A2A (Agent to Agent) infrastructure.
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation python labels Nov 23, 2025
@github-actions github-actions bot changed the title feat: Add Agent Framework to A2A bridge support Python: feat: Add Agent Framework to A2A bridge support Nov 23, 2025
- Reordered imports in various files for consistency and clarity.
- Updated `__all__` definitions to maintain a consistent order across modules.
- Simplified method signatures by removing unnecessary line breaks.
- Enhanced readability by adjusting formatting in several sections.
- Removed redundant comments and example scenarios in the execution context.
- Improved handling of agent messages in the event adapter.
- Added type hints for better clarity and type checking.
- Cleaned up test cases for better organization and readability.
- Deleted the test file for A2aExecutionContext as it is no longer needed.
- Updated A2aExecutor tests to remove dependencies on A2aExecutionContext and adjusted method calls accordingly.
- Modified event adapter tests to use ChatMessage instead of AgentRunResponseUpdate.
- Removed A2aExecutionContext from imports in agent_framework.a2a module and updated type hints accordingly.
Copy link
Member

@eavanvalkenburg eavanvalkenburg left a comment

Choose a reason for hiding this comment

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

I like the idea behind this, but there are some major issues with the implementation, especially the addition of the AgentThreadStore, please discuss that further with us.

- Updated test cases to use A2AExecutor instead of A2aExecutor for consistency.
- Removed mock_event_adapter fixture and related tests as A2aEventAdapter is deprecated.
- Consolidated event handling tests into TestA2AExecutorEventAdapter.
- Adjusted imports in various files to reflect the removal of deprecated components.
- Ensured all references to A2aExecutor are updated to A2AExecutor across the codebase.
@Shubham-Kumar-2000
Copy link
Author

Hi @eavanvalkenburg thanks for the review.

I have further simplified the code for this feature and have addressed most of you review comments.

Regarding your major concern around AgentThreadStore I have started a discussion to finalize the approach.
#2463

Do let me know if any other changes are required.

@Shubham-Kumar-2000
Copy link
Author

I have successfully addressed all mentioned review comments.
Please re-review.

@eavanvalkenburg
Copy link
Member

@Shubham-Kumar-2000 we have redone the threads, now called sessions, and the context providers,please update if you can!

@Shubham-Kumar-2000
Copy link
Author

@Shubham-Kumar-2000 we have redone the threads, now called sessions, and the context providers,please update if you can!

Sure @eavanvalkenburg give me sometime let me go through the changes.

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

Labels

documentation Improvements or additions to documentation python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants