Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Get Started with Microsoft Agent Framework A2A

Please install this package via pip:

pip install agent-framework-a2a --pre

A2A Agent Integration

The A2A agent integration enables communication with remote A2A-compliant agents using the standardized A2A protocol. This allows your Agent Framework applications to connect to agents running on different platforms, languages, or services.

A2AAgent (Client)

The A2AAgent class is a client that wraps an A2A Client to connect the Agent Framework with external A2A-compliant agents.

from agent_framework.a2a import A2AAgent

# Connect to a remote A2A agent
a2a_agent = A2AAgent(url="http://remote-agent/a2a")
response = await a2a_agent.run("Hello!")

A2AExecutor (Hosting)

The A2AExecutor class bridges local AI agents built with the agent_framework library to the A2A protocol, allowing them to be hosted and accessed by other A2A-compliant clients.

from agent_framework.a2a import A2AExecutor
from a2a.server.apps import A2AStarletteApplication
from a2a.server.request_handlers import DefaultRequestHandler
from a2a.server.tasks import InMemoryTaskStore

# Create an A2A executor for your agent
executor = A2AExecutor(agent=my_agent)

# Set up the request handler and server application
request_handler = DefaultRequestHandler(
    agent_executor=executor,
    task_store=InMemoryTaskStore(),
)

app = A2AStarletteApplication(
    agent_card=my_agent_card,
    http_handler=request_handler,
).build()

Basic Usage Example

See the A2A agent examples which demonstrate:

  • Connecting to remote A2A agents
  • Hosting local agents via A2A protocol
  • Sending messages and receiving responses
  • Handling different content types (text, files, data)
  • Streaming responses and real-time interaction

Security considerations

The hosting example above focuses on protocol wiring and does not add authentication or authorization by itself. Production A2A hosts should protect their HTTP or JSON-RPC entry points with the deployment's normal auth layer and verify that each caller is allowed to access the requested agent, task, or session.

Task, thread, context, and session identifiers used by an A2A host are routing handles, not bearer credentials. Do not rely on client-supplied identifiers alone to select or mutate persisted state; bind them to authenticated user, tenant, or workspace context first.

Metadata

Release files for agent-framework-a2a 1.0.0b260910

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-framework-a2a 1.0.0b260910
File Size Uploaded
agent_framework_a2a-1.0.0b260910.tar.gz 19.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agent-framework-a2a 1.0.0b260910
File Interpreter ABI Platform
agent_framework_a2a-1.0.0b260910-py3-none-any.whl Python 3 none any Details

Total release size: 39.1 kB

Release files / agent_framework_a2a-1.0.0b260910.tar.gz

Download URL agent_framework_a2a-1.0.0b260910.tar.gz
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8dd63b6518a5ff41a1270722ce964687ec81497990c53a821e29c75c30e86328
BLAKE2b-256 checksum
How to use checksums
cd97411bef0082ec0605b1312554887897c3ddbf076868f17c3f4c9720c47537
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / agent_framework_a2a-1.0.0b260910-py3-none-any.whl

Download URL agent_framework_a2a-1.0.0b260910-py3-none-any.whl
Size 19.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26407d1c7ef01f2983e786fc30eb49a47d2e6630d38e11091900589a30f9dc60
BLAKE2b-256 checksum
How to use checksums
08f0b0bb2174f914f4227dd0edb31e13287f4ae2ab3da686862f783c26414dcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

1.0.0b260910 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page