Agentic AI Engineering/The Agentic Leap
Lesson 4 / 7 · 20 min · 0 / 3 exercises
Course contents
Concept · 3 hands-on exercises

A2A — Agents Talking to Agents

The Agent2Agent protocol: discovery through Agent Cards, tasks with a lifecycle, and where it fits next to MCP.

A2A (Agent2Agent) standardizes how independent agents, built by different teams on different frameworks, find each other and work together. Google announced it in 2025; it's now a Linux Foundation project that joined the Agentic AI Foundation in August 2026. The spec reached v1.0 in March 2026 (v1.0.1 followed in May), with official SDKs such as a2a-sdk for Python and @a2a-js/sdk for TypeScript. The point is the same as an API contract: your travel agent can hand the flight booking to an airline's agent without either side reading the other's code.

The pieces

  • Agent Card: a JSON document, served at /.well-known/agent-card.json on the agent's domain, that says who the agent is, what skills it offers, where to reach it, which protocol bindings it supports and how to authenticate (securitySchemes). Cards can be signed, and an agent can offer a fuller card to authenticated clients.
  • Message and parts: what a client sends, made of text, file or structured-data parts.
  • Task: the stateful unit of work the remote agent creates, with a lifecycle you can poll, stream or subscribe to.
  • Artifact: what a task produces, such as a booking confirmation or a report.
  • Operations and bindings: SendMessage, SendStreamingMessage, GetTask, ListTasks, CancelTask and SubscribeToTask, plus push-notification configuration, over JSON-RPC, gRPC or HTTP+JSON (REST).
Task stateWhat it means
submittedReceived, not started
workingThe remote agent is on it; progress can stream
input-requiredIt needs more information from you to continue
auth-requiredIt needs you to authenticate or authorize something first
completedDone; results are attached as artifacts
failedIt tried and couldn't finish
canceledStopped at your request
rejectedIt declined the task
Put it in orderExercise 1 of 3

Put one A2A delegation in order, from discovery to result.

  1. The task moves to input-required, and you answer in a follow-up message
  2. Send a message describing the job
  3. Authenticate using a scheme the card declares
  4. The task completes and returns its result as an artifact
  5. Fetch the remote agent's card from /.well-known/agent-card.json
  6. The remote agent creates a task and reports it as working

MCP and A2A: hands versus colleagues

MCPA2A
Connects an agent toTools, data and prompts it usesOther agents it delegates to
The other side isA capability: called, returnsA peer: plans, runs long tasks, can ask questions
Typical boundaryInside your system or a vendor's serviceAcross teams, companies or trust domains
DiscoveryThe client lists a server's toolsThe client reads an Agent Card

They compose. An orchestrator uses MCP for its own hands and A2A to delegate to specialist peers, each of which uses MCP internally. The A2A project's own summary makes the same split: MCP connects an agent to tools, APIs and data; A2A connects it to other agents.

Sort itExercise 2 of 3

MCP, A2A, or a plain function call inside your own code?

Card 1 of 5

Hand a freight booking to a logistics partner's agent and track it for two days

When A2A earns its keep, and how to trust a peer

Inside one codebase you don't need A2A; in-process handoffs are simpler. Reach for it at organizational boundaries, the same places you'd publish an API: different teams, vendors or trust domains whose agents must interoperate. And treat a peer agent exactly like any external service: authenticate with the schemes its card declares, verify signed cards where offered, authorize which skills each caller may use, rate-limit, and validate every artifact as untrusted input before it touches your systems. OpenTelemetry's GenAI conventions include a document for A2A, so cross-agent calls can show up in the same traces as everything else.

Quick checkExercise 3 of 3

Your agent delegated a return to a partner's agent. The task reports input-required. What should your agent do?

Check your understanding
Q1. What's the difference between MCP and A2A, in one line?
Q2. When does A2A earn its complexity over an in-process handoff?
· Work through the 3 remaining exercises above (stuck? each one can show you the answer).
· Score 100% on the quiz.
Vocabulary in this lesson

Plain-English definitions from the AI Coding Dictionary.