What is the A2A (Agent-to-Agent) protocol in Google ADK? How does it enable inter-agent communication?
#google-adk#a2a#protocol#multi-agent#interoperability
Answer
A2A (Agent-to-Agent) Protocol
The Agent-to-Agent (A2A) protocol is an open standard developed by Google that enables AI agents built with different frameworks to communicate and collaborate with each other over the network.
Why A2A?
| Problem | A2A Solution |
|---|---|
| Agents from different frameworks can't talk | Standard communication protocol |
| Vendor lock-in | Framework-agnostic interoperability |
| No discovery mechanism | Agent Cards for capability advertisement |
| No standard task format | Unified task lifecycle (send, stream, cancel) |
How A2A Works
Key Components
1. Agent Card
A JSON document that advertises an agent's capabilities:
json{ "name": "research-agent", "description": "Researches topics using web search", "url": "https://research-agent.example.com", "skills": [ { "id": "web-search", "name": "Web Search", "description": "Search the web for information" } ], "authentication": { "schemes": ["bearer"] } }
2. Task Lifecycle
A2A in Google ADK
pythonfrom google.adk.agents import Agent from google.adk.a2a import A2AClient, A2AServer # Server: Expose an agent via A2A server_agent = Agent( name="research_agent", model="gemini-2.5-flash", instruction="You research topics using web search.", tools=[google_search], ) # Serve over A2A protocol server = A2AServer(agent=server_agent, port=8080) server.start() # Client: Discover and call the remote agent client = A2AClient(url="https://research-agent.example.com") card = client.discover() result = client.send_task("What is the latest news on LLaMA 4?")
A2A vs MCP
| Feature | A2A | MCP |
|---|---|---|
| Purpose | Agent-to-Agent communication | Agent-to-Tool communication |
| Scope | Remote inter-agent collaboration | Local tool/data access |
| Transport | HTTP/SSE | Stdio/HTTP |
| Discovery | Agent Cards | Tool manifests |
| Complementary? | Yes - agents use MCP internally, communicate via A2A |
Key insight: A2A and MCP are complementary. MCP connects agents to tools, A2A connects agents to agents.
Learn more at A2A Protocol and ADK A2A Docs.