Google A2A — Agent-to-Agent Communication Protocol
Open protocol by Google for AI agents to discover, authenticate, and communicate with each other. Enables multi-agent systems across different frameworks and providers. 10,000+ stars.
Ready-to-run agent install
This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.
npx -y tokrepo@latest install 165627cf-cebe-47d3-9293-f75353499fd9 --target codexRun after dry-run confirms the install plan.
What it is
Google A2A (Agent-to-Agent) is an open protocol that enables AI agents to discover, authenticate, and communicate with each other regardless of the framework or provider that built them. Each agent publishes an Agent Card describing its capabilities, and other agents use that card to initiate structured communication.
A2A targets teams building multi-agent systems where agents from different vendors or frameworks need to collaborate on tasks, share context, or delegate subtasks.
How it saves time or tokens
Without A2A, connecting agents from different frameworks requires custom integration code for each pair. A2A provides a standard protocol so any compliant agent can talk to any other compliant agent. The discovery mechanism (Agent Cards) eliminates manual configuration of agent endpoints. Structured message formats reduce the token overhead of free-form natural language communication between agents. Estimated token usage is around 2,600 tokens per multi-agent interaction.
How to use
- Install the A2A SDK:
pip install a2a-sdk
- Create an A2A server with an Agent Card:
from a2a import A2AServer, AgentCard
card = AgentCard(
name='code-reviewer',
description='Reviews code for bugs and style issues',
capabilities=['code-review', 'security-audit'],
endpoint='https://my-agent.example.com/a2a'
)
server = A2AServer(card=card)
@server.on_task
async def handle_task(task):
code = task.input['code']
return {'review': 'Looks good, no issues found.'}
server.run(port=8000)
- Discover and call another agent:
from a2a import A2AClient
client = A2AClient()
agent = await client.discover('https://other-agent.example.com/a2a')
result = await agent.send_task({
'type': 'code-review',
'input': {'code': 'def hello(): print("hi")'}
})
Example
Agent Card JSON structure:
{
"name": "code-reviewer",
"description": "Reviews code for bugs and style issues",
"capabilities": ["code-review", "security-audit"],
"endpoint": "https://my-agent.example.com/a2a",
"authentication": {
"type": "bearer",
"token_url": "https://auth.example.com/token"
}
}
Related on TokRepo
- AI agent tools — frameworks for building and orchestrating AI agents
- Multi-agent frameworks — compare multi-agent orchestration approaches
Common pitfalls
- A2A is a communication protocol, not an agent framework. You still need LangGraph, CrewAI, or similar to build the agent logic.
- Agent Card discovery requires a well-known URL or registry. Without proper DNS or service discovery, agents cannot find each other.
- Authentication between agents must be configured explicitly. Do not expose agent endpoints without proper token-based auth in production.
Frequently Asked Questions
MCP (Model Context Protocol) connects models to tools and data sources. A2A connects agents to other agents. They are complementary: an agent might use MCP to access tools and A2A to delegate tasks to specialized agents.
Yes. A2A is framework-agnostic. Agents built with LangGraph, CrewAI, AutoGen, or custom code can all implement the A2A protocol. The only requirement is publishing an Agent Card and handling the message format.
Google introduced A2A as an open protocol. It is designed to be vendor-neutral, with the specification available for any team to implement.
Yes. A2A supports both synchronous request-response and asynchronous task patterns. Agents can submit tasks and poll for results or use webhooks for completion notifications.
A2A is an emerging protocol. Early adopters are using it in multi-agent prototypes and internal systems. Evaluate stability and community adoption before deploying in mission-critical production systems.
Citations (3)
- A2A GitHub— Google A2A enables agent-to-agent discovery and communication
- A2A Specification— Agent Cards provide capability discovery and endpoint information
- Google Cloud Blog— Complementary to MCP for tool access
Related on TokRepo
Source & Thanks
Discussion
Related Assets
Protocol Buffers — Language-Neutral Data Serialization by Google
Protocol Buffers (protobuf) is Google's language-neutral, platform-neutral mechanism for serializing structured data. It is smaller, faster, and simpler than XML or JSON for inter-service communication and data storage.
A2A Protocol — Agent-to-Agent Communication Standard
Google's open protocol for AI agents to discover, communicate, and collaborate across frameworks. SDKs for Python, TypeScript, Java, Go, and .NET. 23,000+ stars, Apache 2.0.
Protocol Buffers — Language-Neutral Data Serialization by Google
Protocol Buffers (protobuf) is Google's language-neutral, platform-neutral mechanism for serializing structured data, used extensively in gRPC and microservice communication.
AgentScope — Distributed Multi-Agent Platform
AgentScope is a multi-agent framework supporting distributed agent communication, built-in fault tolerance, and an actor-based runtime for building complex multi-agent applications at scale.