Agent Protocols Explained

Agent Protocols Explained

How agents talk to tools and to each other, message by message.

An interactive guide to MCP and A2A, animated by an engine that sends the same messages as the official SDKs.

2025-11-2517 messages · 6,268 B

2025-11-25: 3,790 bytes of JSON and 2,478 bytes of HTTP framing in 17 messages.

2026-07-2812 messages · 6,970 B

2026-07-28: 5,262 bytes of JSON and 1,708 bytes of HTTP framing in 12 messages.

JSON-RPC HTTP framing

One short session (connect, then list and use a tool, a resource and a prompt) in each era, over Streamable HTTP, to scale: fewer messages without the handshake, but every request carries its own envelope.

How this is checkedThe engine sends the same 160 messages as the official MCP Python SDK (mcp 2.3.0) over 18 recorded sessions, and the same 56 as the official A2A SDK (a2a-sdk 1.2.2), compared as JSON. How it is tested →

What you'll learn

An agent reaches its tools through a protocol. The Model Context Protocol (MCP) is the common one: a host's MCP client sends JSON-RPC messages to an MCP server, over a pipe or over HTTP. Its current revision, 2026-07-28, dropped the handshake that every earlier revision began with: the same short session now takes 12 messages instead of 17.

Each chapter is built around an animation of real protocol messages. They come from Agent_Loop_Sim's protocol state machines, and in CI the official MCP Python SDK (mcp 2.3.0) plays the same 18 sessions: the simulator must send the same messages (see the recordings). Agents talk to other agents too: chapter 8 follows a task between two agents over A2A 1.0, checked the same way against the official A2A SDK (a2a-sdk 1.2.2). Then authorisation, gateways and the attacks on all of it. Nothing here calls a live model or opens a real connection.

Part of a family of sixteen companion sites in four tracks, all in the site menu above: Foundations (Decoder, Training), Hardware (Kernels, Systolic, Accelerators, Racks), Inference (Serving, Architectures, Numerics, Trade-offs) and Agents (Harnesses, Protocols, Context, Orchestration, Evals, Security). It is the second of the six agent sites. How this one was built, and how to check it: about.