agent-framework-a2a

A2A integration for Microsoft Agent Framework.

47 个版本 Python >=3.10
安装
pip install agent-framework-a2a
poetry add agent-framework-a2a
pipenv install agent-framework-a2a
conda install agent-framework-a2a
描述

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
版本列表
1.0.0b260604 2026-06-04
1.0.0b260528 2026-05-28
1.0.0b260521 2026-05-22
1.0.0b260519 2026-05-20
1.0.0b260514 2026-05-15
1.0.0b260507 2026-05-08
1.0.0b260429 2026-04-29
1.0.0b260428 2026-04-28
1.0.0b260424 2026-04-24
1.0.0b260423 2026-04-23
1.0.0b260421 2026-04-21
1.0.0b260409 2026-04-10
1.0.0b260402 2026-04-02
1.0.0b260330 2026-03-30
1.0.0b260319 2026-03-20
1.0.0b260311 2026-03-11
1.0.0b260304 2026-03-04
1.0.0b260225 2026-02-26
1.0.0b260219 2026-02-20
1.0.0b260212 2026-02-13
1.0.0b260210 2026-02-11
1.0.0b260130 2026-01-30
1.0.0b260128 2026-01-28
1.0.0b260127 2026-01-27
1.0.0b260123 2026-01-23
1.0.0b260116 2026-01-16
1.0.0b260114 2026-01-14
1.0.0b260107 2026-01-07
1.0.0b260106 2026-01-07
1.0.0b251223 2025-12-24
1.0.0b251218 2025-12-19
1.0.0b251216 2025-12-17
1.0.0b251211 2025-12-11
1.0.0b251209 2025-12-09
1.0.0b251204 2025-12-04
1.0.0b251120 2025-11-21
1.0.0b251114 2025-11-15
1.0.0b251112 2025-11-13
1.0.0b251112.post1 2025-11-13
1.0.0b251111 2025-11-11
1.0.0b251108 2025-11-08
1.0.0b251105 2025-11-05
1.0.0b251104 2025-11-04
1.0.0b251028 2025-10-28
1.0.0b251016 2025-10-16
1.0.0b251007 2025-10-07
1.0.0b251001 2025-10-01