A2A (Agent-to-Agent Protocol) is an open standard protocol designed to enable AI agents from different vendors, built with different frameworks, to communicate and collaborate with each other directly.
CN: A2A(Agent-to-Agent Protocol,智能体间协议)是一个开放标准协议,旨在让来自不同供应商、使用不同框架构建的 AI 智能体能够直接相互通信和协作。
Core Content of A2A
Core Actors
Agent Card
A JSON metadata document, typically at /.well-known/agent.json, that describes an A2A Server.
CN: 一个 JSON 元数据文档,通常在 /.well-known/agent.json 路径,描述 A2A 服务器。
EN: It contains: agent identity (name, description), endpoint URL, version, supported capabilities (streaming, push notifications), skills offered, input/output modalities, and authentication requirements.
CN: 它包含:智能体身份(名称、描述)、端点 URL、版本、支持的能力(流式、推送通知)、提供的技能、输入/输出模态和认证要求。
EN: Think of it as an agent’s business card that tells other agents: “This is who I am, what I can do, and how to talk to me.”
CN: 把它想象成 智能体的名片,告诉其他智能体:”我是谁,我能做什么,以及如何与我对话。
Task
The unit of work in A2A. When a client delegates to an A2A agent, it sends a task containing the user request and context.
CN: A2A 中的工作单元。当客户端委托给 A2A 智能体时,它发送一个包含用户请求和上下文的任务。
EN: Each task has a unique ID and progresses through a lifecycle: submitted → working → input-required → completed → failed.
CN: 每个任务有唯一 ID,并通过生命周期推进:submitted → working → input-required → completed → failed。
EN: Tasks are stateful and can involve multiple exchanges between client and server.
CN: 任务是 有状态的,可以涉及客户端和服务器之间的多次交换。
Message & Part
Message represents a single turn of communication. It has a role (“user” or “agent”) and contains one or more Parts.
CN: Message 代表单轮通信。它有 role(”user” 或 “agent”)并包含一个或多个 Part。
EN: Part is the fundamental unit of content — can be TextPart (plain text) or FilePart (file, as base64 or URI).
CN: Part 是内容的基本单元——可以是 TextPart(纯文本)或 FilePart(文件,base64 或 URI)。
Context ID
Maintains session continuity across agent boundaries. When a user’s session spans multiple turns, the context ID links each delegated task to the same ongoing conversation.
CN: 跨智能体边界维持会话连续性。当用户的会话跨越多个轮次时,上下文 ID 将每个委托的任务与同一正在进行的对话相关联。
A2A vs MCP: Key Differences
This is the most important concept to understand. MCP and A2A are complementary, not competing.
CN: 这是最重要的概念。MCP 和 A2A 是互补的,不是竞争的。
Key Takeaways
| 要点 (Point) | EN | CN |
|---|---|---|
| A2A 定义 | A2A is an open standard for agent-to-agent communication | A2A 是智能体间通信的开放标准 |
| A2A vs MCP | MCP = agent to tools; A2A = agent to agents (complementary) | MCP = 智能体到工具;A2A = 智能体到智能体(互补) |
| 核心组件 | Core components: Agent Card, Task, Message, Part, Context ID | 核心组件:智能体名片、任务、消息、部件、上下文 ID |
| Agent Card | Agent Card is a JSON at /.well-known/agent.json describing agent capabilities | 智能体名片是 /.well-known/agent.json 的 JSON,描述智能体能力 |
| Task 生命周期 | Task lifecycle: submitted → working → input-required → completed → failed | 任务生命周期:submitted → working → input-required → completed → failed |
| 不透明性 | Remote agent is “opaque” — client doesn’t see its internal tools/logic | 远程智能体是”不透明的”——客户端看不到其内部工具/逻辑 |
| 传输协议 | A2A uses HTTP(S) with JSON-RPC 2.0 | A2A 使用 HTTP(S) + JSON-RPC 2.0 |
| 现实应用 | Many systems will use both MCP (inside agents) and A2A (between agents) | 许多系统会同时使用 MCP(智能体内)和 A2A(智能体间) |

