Registry / llm-agents / agent-framework-a2a

agent-framework-a2a

JSON →
library1.0.0b260409pypiunverified

This library provides agent-to-agent (A2A) communication and integration capabilities for the Microsoft Agent Framework. It enables agents built with the framework to interact, exchange messages, and coordinate actions, particularly within environments like Azure AI Studio and Prompt Flow. The package is currently in a beta development stage (version 1.0.0b), indicating active development and potential for API changes.

llm-agentsai-mlcommunicationazure
pip install agent-framework-a2a
Install & Compatibility
Where this runs
tested against v1.0.0b260604 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 9.05s
py 3.11
✓ —
✓ 7.6s
py 3.12
✓ —
✓ 6.35s
py 3.13
✓ —
✓ 6.05s
py 3.9
✕ build_error
✕ build_error
71MB installed
● package 71MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AgentToAgentClient
from agent_framework_a2a.client import AgentToAgentClient
AgentToAgentMessage
from agent_framework_a2a.models import AgentToAgentMessage

This quickstart verifies the installation by attempting to import core components and demonstrates creating a conceptual A2A message. Full client instantiation and interaction require specific environment configuration and integration with the broader Microsoft Agent Framework or Azure AI Studio.

import os print("Attempting to import core A2A components from agent-framework-a2a...") try: from agent_framework_a2a.client import AgentToAgentClient from agent_framework_a2a.models import AgentToAgentMessage print("Successfully imported AgentToAgentClient and AgentToAgentMessage.") # This part is conceptual as actual client instantiation and usage # heavily depends on the broader Microsoft Agent Framework context and # specific environment setup (e.g., Azure AI Studio, Prompt Flow). # The below code demonstrates creating a sample message object. sender_id = os.environ.get("A2A_SENDER_ID", "agent_alpha") recipient_id = os.environ.get("A2A_RECIPIENT_ID", "agent_beta") message_content = "Hello from agent_alpha to agent_beta!" # Creating a message object (assuming a simple constructor) message = AgentToAgentMessage( sender_id=sender_id, recipient_id=recipient_id, content=message_content, message_type="text" ) print(f"Created a sample message: Sender={message.sender_id}, Recipient={message.recipient_id}, Content='{message.content}'") # To use AgentToAgentClient, you would typically need to configure it # with an endpoint and potentially authentication from your environment. # client = AgentToAgentClient(endpoint=os.environ.get("A2A_ENDPOINT", ""), api_key=os.environ.get("A2A_API_KEY", "")) # response = client.send_message(message) # print(f"Conceptual message sent, response: {response}") except ImportError as e: print(f"Failed to import agent-framework-a2a components. Please ensure the library is correctly installed and its API is stable. Error: {e}") except Exception as e: print(f"An unexpected error occurred during quickstart: {e}")
Debug
Known issues
breakingAPI instability and breaking changes: As a beta package, `agent-framework-a2a`'s API surface is subject to frequent changes without strict adherence to semantic versioning. Existing code might break with minor version updates.
fix
Regularly check the `microsoft/agent-framework` GitHub repository for updates and breaking change announcements. Pin exact versions for production use and test thoroughly after updates.
affects: 1.x.x beta versions
gotchaRequires `agent-framework` context: This library is designed as an integration for the broader Microsoft Agent Framework. Standalone usage without the full framework context or appropriate environment setup (e.g., Azure AI Studio, Prompt Flow) may be complex or non-functional.
fix
Refer to the `microsoft/agent-framework` documentation and examples for proper integration within the framework ecosystem.
affects: All 1.x.x beta versions
gotchaLimited public documentation: Due to its beta status and integration-focused nature, detailed, standalone documentation and examples specifically for `agent-framework-a2a` may be sparse. Expect to infer usage from the main `agent-framework` repository.
fix
Consult the `microsoft/agent-framework` GitHub repository and associated Azure AI Studio documentation for guidance.
affects: All 1.x.x beta versions
gotchaImport path variability: Given the beta status and potential refactoring, the exact import paths for client and model classes may change in future releases. Always verify against the latest framework examples.
fix
Verify import paths with the latest `agent-framework` source code or documentation before deployment.
affects: All 1.x.x beta versions
Upgrade
Version history
1.0.0b260604latest on PyPI
Audit
Dependencies
agent-frameworkrequiredThis package provides A2A integration within the larger Microsoft Agent Framework and typically requires other core framework components to function.
Agent activity
94 hits · last 30 days
node
10
claudebot
4
ahrefsbot
3
Amazon
2
amazonbot
1
Resources