
A2A
独立して動くエージェント同士が能力を知らせ、仕事を委ねるためのオープンプロトコル
A2Aとは
A2Aは、別々に開発されたエージェントが能力を公開し、メッセージを交換し、1回の接続では終わらない仕事の状態を追跡する方法を定めます。バージョン1.0では、共通のデータモデルと操作をJSON-RPC、gRPC、HTTP/RESTの各方式から分離し、公式SDKは別のリポジトリで提供しています。タスクの状態管理、途中経過の配信、非同期の更新を必要とする自律サービス間には向きますが、データベース照会のように入出力が定まったツール呼び出しはMCPの領域であり、仕様を採用するだけではエージェント、レジストリ、認可ポリシーは手に入りません。
A2Aで何ができますか?
- Agent Cardで能力を公開する — A2Aサーバーは、識別情報、接続先、入出力で扱える形式、任意の拡張、認証方式、名前付きの能力をJSON文書として公開します。クライアントは、相手のプロンプト、記憶、内部ツールを知らなくても、仕事を渡せる相手かどうかを事前に判断できます。
- 長く続く仕事をTaskとして保持する — リクエストは最終メッセージの代わりに、状態を持つTaskを返せます。クライアントはTaskの取得、一覧、キャンセルを行い、関連する仕事をcontextIdでまとめ、相手の実装を見ずに成果物の文書や構造化データをArtifactとして受け取れます。
- 即時応答、逐次配信、切断後の通知を選ぶ — 短い処理はMessageを直接返します。時間のかかる処理は、選択した通信方式で状態とArtifactの断片を順次配信するか、元のクライアントが切断した後にWebhookへ通知できます。人間の承認や外部処理を1回のHTTP応答内で終わらせる必要がありません。
- 3つの通信方式で意味を共有する — バージョン1.0は、Protocol Buffersで共通データモデルを定め、操作を通信方式から独立して記述したうえで、JSON-RPC、gRPC、HTTP/RESTへ対応付けます。実装者は通信方式を選べますが、Task、Message、Agent Card、Artifactの意味は変わりません。
- 認証情報をメッセージに入れずWebの仕組みを使う — Agent CardはOAuth、OpenID Connect、APIキー、相互TLSの要件を宣言し、認証情報はA2AのMessage内ではなく各通信方式のヘッダーや通信路で渡します。プロトコルが定めるのは方式の表現までで、誰がエージェントを発見し、Taskを読み、Artifactを受け取れるかは各サーバーが強制します。
- MCPを置き換えず、その上で連携する — 外部のエージェントは、計画を立て、状態を保持し、複数のツールを使いながら、A2A経由で委ねられた仕事を引き受けます。そのエージェント自身は、データベース、API、入出力の定まった機能へ接続するためにMCPを内部で利用できます。
A2Aを選ぶ前に
- Agent Cardは発見の形式を定めますが、共通レジストリまでは提供しないため、既知のURL、公開カタログ、非公開レジストリのどれを使うかは導入側が決めます。
- 仕様は認証方式を表現しますが、アクセス制御、テナント分離、認証情報の保存は実装しないため、サーバーとクライアントの双方で用意する必要があります。
- 仕様と公式SDKは別々のリポジトリから公開されるため、採用する言語のSDKが目的のプロトコル版へ対応しているかを個別に確認する必要があります。
スター推移
8月17日〜8月28日 · +153
よくある質問
A2Aは商用利用できますか?
A2AはApache-2.0ライセンスで公開されています。OSI承認のオープンソースライセンスで、商用利用が認められています。
ドキュメント
a2aproject/A2A のREADMEより転載(Apache-2.0)。 原文を読む ↗
Agent2Agent (A2A) Protocol
An open protocol enabling communication and interoperability between opaque agentic applications.
The Agent2Agent (A2A) protocol addresses a critical challenge in the AI landscape: enabling gen AI agents, built on diverse frameworks by different companies running on separate servers, to communicate and collaborate effectively - as agents, not just as tools. A2A aims to provide a common language for agents, fostering a more interconnected, powerful, and innovative AI ecosystem.
With A2A, agents can:
- Discover each other’s capabilities.
- Negotiate interaction modalities (text, forms, media).
- Securely collaborate on long-running tasks.
- Operate without exposing their internal state, memory, or tools.
DeepLearning.AI Course
Join this short course on A2A: The Agent2Agent Protocol, built in partnership with Google Cloud and IBM Research, and taught by Holt Skinner, Ivan Nardini, and Sandi Besen.
What you’ll learn:
- Make agents A2A-compliant: Expose agents built with frameworks like Google ADK, LangGraph, or BeeAI as A2A servers.
- Connect agents: Create A2A clients from scratch or using integrations to connect to A2A-compliant agents.
- Orchestrate workflows: Build sequential and hierarchical workflows of A2A-compliant agents.
- Multi-agent systems: Build a healthcare multi-agent system using different frameworks and see how A2A enables collaboration.
- A2A and MCP: Learn how A2A complements MCP by enabling agents to collaborate with each other.
Why A2A?
As AI agents become more prevalent, their ability to interoperate is crucial for building complex, multi-functional applications. A2A aims to:
- Break Down Silos: Connect agents across different ecosystems.
- Enable Complex Collaboration: Allow specialized agents to work together on tasks that a single agent cannot handle alone.
- Promote Open Standards: Foster a community-driven approach to agent communication, encouraging innovation and broad adoption.
- Preserve Opacity: Allow agents to collaborate without needing to share internal memory, proprietary logic, or specific tool implementations, enhancing security and protecting intellectual property.
Key Features
- Standardized Communication: JSON-RPC 2.0 over HTTP(S).
- Agent Discovery: Via “Agent Cards” detailing capabilities and connection info.
- Flexible Interaction: Supports synchronous request/response, streaming (SSE), and asynchronous push notifications.
- Rich Data Exchange: Handles text, files, and structured JSON data.
- Enterprise-Ready: Designed with security, authentication, and observability in mind.
Getting Started
- 📚 Explore the Documentation: Visit the Agent2Agent Protocol Documentation Site for a complete overview, the full protocol specification, tutorials, and guides.
- 📝 View the Specification: A2A Protocol Specification
- Use the SDKs:
- 🐍 A2A Python SDK
pip install a2a-sdk - 🐿️ A2A Go SDK
go get github.com/a2aproject/a2a-go - 🧑💻 A2A JS SDK
npm install @a2a-js/sdk - ☕️ A2A Java SDK using maven
- 🔷 A2A .NET SDK using NuGet
dotnet add package A2A - 🦀 A2A Rust SDK
cargo add a2a-lf
- 🐍 A2A Python SDK
- 🎬 Use our samples to see A2A in action
What’s next
Protocol Enhancements
- Agent Discovery:
- Formalize inclusion of authorization schemes and optional credentials directly within the
AgentCard.
- Formalize inclusion of authorization schemes and optional credentials directly within the
- Agent Collaboration:
- Investigate a
QuerySkill()method for dynamically checking unsupported or unanticipated skills.
- Investigate a
- Task Lifecycle & UX:
- Support for dynamic UX negotiation within a task (e.g., agent adding audio/video mid-conversation).
- Client Methods & Transport:
- Explore extending support to client-initiated methods (beyond task management).
- Improvements to streaming reliability and push notification mechanisms.
About
The A2A Protocol is an open source project under the Linux Foundation, contributed by Google. It is licensed under the Apache License 2.0 and is open to contributions from the community.
