The idea
MCP connects an agent to tools. A2A (Agent2Agent) connects agents to other agents, possibly built by other teams or companies on different frameworks. Each agent publishes an Agent Card (a JSON document describing its skills, endpoint and auth), and others can send it tasks over HTTP.
Tasks have a lifecycle (submitted, working, input-required, completed, failed), can stream progress, and return messages and artifacts. The calling agent does not need to know how the remote agent works inside.
It is younger than MCP. Use it when you really have independent agents owned by different teams; inside one codebase, handoffs or subagents are simpler.
As organisations build many agents, a shared protocol avoids every pair needing a custom integration.
Picture it
Words to know
- Agent CardPublic JSON description of an agent’s skills and endpoint.
- TaskA unit of work sent to a remote agent, with a status lifecycle.
Try it without code
Write an Agent Card
- Pick one agent you would expose to other teams.
- Write its name, description, 3 skills, and the inputs each skill needs.
Use it in code
A minimal Agent Card served at /.well-known/agent-card.json
{
"name": "Expense Agent",
"description": "Files and checks expense claims against company policy.",
"url": "https://agents.example.com/expense",
"version": "1.0.0",
"capabilities": { "streaming": true },
"defaultInputModes": ["text", "application/pdf"],
"defaultOutputModes": ["text"],
"skills": [
{ "id": "file-receipt", "name": "File a receipt",
"description": "Extracts amount, date and vendor from a receipt and files a claim." },
{ "id": "policy-check", "name": "Check policy",
"description": "Says whether an expense is within policy and why." }
]
}Read the A2A specification overview and write how your research agent would call a separate "fact-checker" agent over A2A.
Common mistakes
- Using A2A between functions in the same app.
- Exposing agents without authentication.