12 episodes, about 51 min 1 view across the series

Topics: Agents Code: abhydesai/a2a-explained-code

A2A Explained

Created by Abhyuday DesaiUpdated , episode 12

How you delegate work to another agent without knowing how it does that work. The idea, the build, and the real world, for viewers who know MCP.

Start with episode 1

About this series

The Agent2Agent protocol, explained the way MCP Explained was: short videos, one idea each, animated diagrams and code scenes, a companion repo with one runnable folder per video. The series assumes you have watched MCP Explained and never re-teaches it.

One mental model runs through every episode. A tool is designed to be called: you decide what to invoke and with what arguments, and the contract is a function's schema. An agent is designed to be delegated to: it plans its own steps with its own model and tools, and the contract is a description of what it can do. Once you delegate rather than call, four things need an agreed form: how you find the agent and learn what it offers (the card), how the work is tracked while it runs (the task and its states), how it comes back to you for more (input required), and how the deliverables arrive (artifacts). That is the whole protocol.

Three sections, twelve episodes.

The idea

  • 1. What Is A2A, and Why Isn't It Just MCP? Another team's agent could be one more tool with a text parameter; what that wrapper would have to invent is the case for a protocol.
  • 2. The Agent Card. How one agent finds another and learns what it can do before any work is exchanged, and the roles around the card.
  • 3. The Task. What travels between two agents: a status that moves, messages, artifacts, and the two ids that tell work and conversation apart.
  • 4. Talk to Your First Agent. A forty-line client fetches a card, sends one message to an agent we did not write, and prints the task's state and artifact.

Build it

  • 5. Build the Smallest A2A Agent. A model with a price lookup becomes a served agent through the SDK's executor; the client from episode 4 needs only its address.
  • 6. A Task Is Not a Return Value. The brief takes several seconds and involves choices; each step surfaces as a working update, and the client waits, polls or streams.
  • 7. When the Agent Asks Back. Asked about a ticker with no period, the agent stops in input-required and the conversation continues inside one task.
  • 8. What Goes Over the Wire. One run tapped and read line by line: the card fetch, the JSON-RPC request, the task in the reply, the streamed events.
  • 9. Where A2A Meets MCP. The agent's lookup moves behind an MCP server: MCP inside its wall, A2A outside it, and why the two are not rivals.

The real world

  • 10. One Agent, Many Agents. A briefing agent with two cards on its list and one question that needs both, and how little code that takes.
  • 11. Delegating Is a Decision. What you hand over when you delegate, what you accept when you serve, and the protocol's answers on the card.
  • 12. A Task That Outlives the Call. The caller disconnects while the agent is still working; the task lives on, and the brief still arrives.

The line the series rests on: the client needs nothing behind the card, not the agent's model, not its prompt, not its tools.

Part oneThe idea

  1. 01

    What Is A2A, and Why Isn't It Just MCP?

    Another team's agent could be one more tool with a text parameter. What that wrapper would have to invent is the case for a protocol of its own.

    4:11 1 view Published
    Watch
  2. 02

    The Agent Card

    How one agent finds another and learns what it can do before any work is exchanged: the card, and the roles around it.

    4:12 0 views Updated , v2
    Watch
  3. 03

    The Task

    A tool call returns a value. Work sent to an agent comes back as a task: a status that moves, messages, artifacts, and two ids.

    4:09 0 views Updated , v2
    Watch
  4. 04

    Talk to Your First Agent

    A forty-line client fetches a card, sends one message to an agent we did not write, and prints the task's state and its artifact.

    3:34 0 views Updated , v2
    Watch

Part twoBuild it

  1. 05

    Build the Smallest A2A Agent

    A model with a price lookup becomes a served agent through the SDK's executor, and the client from Episode 04 needs nothing but its address.

    4:42 0 views Updated , v2
    Watch
  2. 06

    A Task Is Not a Return Value

    One clause more in the question, and the brief takes more than ten seconds. Two clients watch the task while it runs: one asks again, one is told as it happens.

    4:14 0 views Updated , v2
    Watch
  3. 07

    When the Agent Asks Back

    The question leaves out the period, so the analyst stops before it starts any work and asks for one. The answer goes back to the task that is already open, and that task finishes the brief.

    2:50 0 views Updated , v2
    Watch
  4. 08

    What Goes Over the Wire

    A tap between our client and the analyst copies every byte both ways. What crosses is ordinary HTTP with JSON bodies: a task in the reply, and a stream of events that all answer one request.

    4:42 0 views Updated , v2
    Watch
  5. 09

    Where A2A Meets MCP

    The analyst's price lookup moves behind an MCP server. The card it serves does not change by a byte, both clients run unedited, and one agent ends up using both protocols for different things.

    5:34 0 views Updated , v2
    Watch

Part threeThe real world

  1. 10

    One Agent, Many Agents

    A briefing agent hands one question to two agents built by different teams. One small piece of code handles both hand-offs; deciding who gets what stays in our program.

    4:21 0 views Updated , v2
    Watch
  2. 11

    Delegating Is a Decision

    What a hand-off to another agent carries, what serving one exposes, what the card declares about identity, and how auth required hands a permission back to the client.

    3:15 0 views Published
    Watch
  3. 12

    A Task That Outlives the Call

    The caller hangs up while our analyst is still working. The task stays on the server, so the client can come back for the brief, or have the analyst call it.

    4:50 0 views Published
    Watch