Area 03 · AI Agents · Concept 20 of 20

A2A Protocol

Agent2Agent: an open protocol that lets agents from different teams find and talk to each other.

11–20 · Production levelPhase 3 · Weeks 11–14≈ 1 hour

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.

Why it matters

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

  1. Pick one agent you would expose to other teams.
  2. 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

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." }
  ]
}
PRACTICE · TICK IT AFTER THIS

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.

Go deeper