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?

ProblemA2A Solution
Agents from different frameworks can't talkStandard communication protocol
Vendor lock-inFramework-agnostic interoperability
No discovery mechanismAgent Cards for capability advertisement
No standard task formatUnified 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

python
from 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

FeatureA2AMCP
PurposeAgent-to-Agent communicationAgent-to-Tool communication
ScopeRemote inter-agent collaborationLocal tool/data access
TransportHTTP/SSEStdio/HTTP
DiscoveryAgent CardsTool 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.