Agent-to-Agent Protocol (A2A)
Google's Open Standard for AI Agent Interoperability
What is A2A?
The Agent-to-Agent (A2A) Protocol is an open-source communication standard initiated by Google and over 50 technology partners. It enables AI agents to communicate, collaborate, and coordinate actions seamlesslyβregardless of their underlying frameworks, vendors, or platforms.
Think of A2A as a "universal translator" for AI agents. Just as HTTP standardized web communication, A2A aims to standardize how AI agents interact with each other in multi-agent systems.
A2A vs MCP: Complementary Standards
A2A Protocol
- Agent-to-agent communication
- Multi-agent collaboration
- Task delegation between agents
- Agent discovery and capabilities
MCP Protocol
- Agent-to-tool communication
- External data sources
- Tool execution and resources
- Context and prompts
π‘ Key Insight: A2A and MCP are complementary. A2A handles how agents talk to each other, while MCP handles how agents access tools and data. Together, they enable powerful multi-agent systems with rich capabilities.
Key Features
π Agent Discovery
Agents publish "Agent Cards" describing their capabilities, allowing other agents to discover and understand what they can do.
π Task-Based Communication
Interactions are structured as tasks with clear start and end states, enabling agents to exchange context, status, and results.
π Standard Web Protocols
Uses HTTPS and JSON-RPC 2.0βno custom protocols needed. Works with existing web infrastructure and security models.
π¨ Modality Agnostic
Supports text, audio, video, and structured data. Agents can communicate in whatever format suits their task.
π Built-in Security
Authentication, access control, and encrypted transport are core to the protocolβnot afterthoughts.
π Framework Agnostic
Works with LangChain, LangGraph, CrewAI, AutoGen, and any other agent framework through standardized interfaces.
Agent Cards
Agent Cards are JSON documents that describe an agent's identity and capabilities, enabling discovery by other agents:
{
"name": "research-agent",
"description": "An agent that can search the web and summarize findings",
"version": "1.0.0",
"capabilities": [
{
"name": "web_search",
"description": "Search the web for information on a topic",
"inputSchema": {
"type": "object",
"properties": {
"query": { "type": "string" },
"max_results": { "type": "integer", "default": 10 }
},
"required": ["query"]
}
},
{
"name": "summarize",
"description": "Summarize provided text or search results",
"inputSchema": {
"type": "object",
"properties": {
"content": { "type": "string" },
"max_length": { "type": "integer", "default": 500 }
},
"required": ["content"]
}
}
],
"endpoint": "https://agents.example.com/research",
"authentication": {
"type": "bearer"
}
}
Task Lifecycle
- Created: Task is initialized but not yet started
- Running: Agent is actively processing the task
- Streaming: Partial results are being sent incrementally
- Completed: Task finished successfully with final results
- Failed: Task encountered an error (not shown)
- Cancelled: Task was stopped by the client (not shown)
Using A2A in Python
from google.adk import Agent, A2AClient
# Discover an agent by its endpoint
async def call_research_agent():
client = A2AClient()
# Get agent card to understand capabilities
agent_card = await client.get_agent_card(
"https://agents.example.com/research"
)
print(f"Agent: {agent_card.name}")
print(f"Capabilities: {[c.name for c in agent_card.capabilities]}")
# Create and send a task
task = await client.create_task(
endpoint=agent_card.endpoint,
capability="web_search",
input={
"query": "Latest developments in AI agents",
"max_results": 5
}
)
# Wait for completion (or stream results)
result = await client.wait_for_task(task.id)
print(f"Status: {result.status}")
print(f"Results: {result.output}")
# For agent-side: expose your agent via A2A
class MyAgent(Agent):
@capability("analyze_data")
async def analyze(self, data: str) -> dict:
# Your analysis logic here
return {"analysis": "...", "confidence": 0.95}
Ecosystem Partners
A2A launched with support from over 50 technology partners, including: