Lesson 08.07 · Phase 08 · Multi-Agent Systems

Agent-to-agent (A2A) protocol

MCP connects an agent to tools. A2A connects an agent to another agent it doesn't control: built by another team or company, running elsewhere, with its own model and data. You see its card, send it messages, and track a task through states until it hands back artifacts. What happens inside stays inside.

Learning objectives

  • Publish and read an A2A v1.0 Agent Card at /.well-known/agent-card.json: interfaces, capabilities and skills.
  • Implement the JSON-RPC binding's core methods (SendMessage, GetTask, CancelTask, SendStreamingMessage) for a remote agent.
  • Drive a task through its states, including TASKSTATEINPUTREQUIRED for multi-turn exchanges, and read artifacts made of text and data parts.
  • Choose between waiting, polling and streaming for long tasks, and handle A2A errors.

Everything in this phase so far has been agents you wrote, in one process, sharing your code and your model. Real organisations don't look like that. The travel team has a booking agent; the finance team has an expense agent; a partner company offers a logistics agent. Your agent wants to delegate to them, but it can't import their code, doesn't know which model they use, and shouldn't see their prompts or internal data.

Loading the full lesson…