Phase 13: Tools & Protocols

A2A — Agent-to-Agent Protocol

MCP is agent-to-tool. A2A (Agent2Agent) is agent-to-agent — an open protocol for letting opaque agents built on different frameworks collaborate. Released by Google in April 2025, donated to the Linux Foundation in June 2025, reaching v1.0 in April 2026 with 150+ supporters including AWS, Cisco, Microsoft, Salesforce, SAP, and ServiceNow. It absorbed IBM's ACP and added the AP2 payments extension. This lesson walks the Agent Card, Task lifecycle, and the two transport bindings. Distinguish agent-to-tool (MCP) from agent-to-agent (A2A) use cases. Publish an Agent Card at /.well-known/agent.json with skills and endpoint metadata. Walk the Task lifecycle (submitted → working → input-required → completed / failed / canceled / rejected). Use Messages with Parts (text, file, data) and Artifacts as outputs. A customer-service agent needs to delegate report-writing to a specialized writer agent. Options pre-A2A: Custom REST API. Works but every pairing is a one-off. Shared codebase. Requires the two agents to run the same framework. MCP. Doesn't fit: MCP is for calling tools, not for two agents collaborating while preserving each agent's opaque internal reasoning. A2A fills the gap. It models the interaction as one agent sending a Task to another, with a lifecycle, messages, and artifacts. The called agent's internal state stays opaque — the caller sees only task state transitions and eventual outputs. A2A is the "let agents…

A2A — Agent-to-Agent Protocol: MCP is agent-to-tool. A2A (Agent2Agent) is agent-to-agent — an open protocol for letting opaque agents built on different…

This free lesson is part of the AI Engineering from Scratch curriculum. Read the full explanation, run the lesson code, and verify the result in the interactive reader or from the repository source.

Browse the complete course catalog or open this lesson on GitHub.