A2A Agent Protocol — A2A 代理 Protocol
v1.0.0Use when (1) building an AI 代理 that needs to communicate with other 代理s over the 代理2代理 (A2A) protocol, (2) publishing an 代理Card for discovery, (3) acting as an A2A 命令行工具ent or server, or (4) integrating A2A capabilities into an existing 代理 框架. Solves 代理 isolation — enabling discovery, capability negotiation, task delegation, and structured data exchange across different 框架s and vendors.
运行时依赖
安装命令
点击复制本土化适配说明
A2A Agent Protocol — A2A 代理 Protocol 安装说明: 安装命令:["openclaw skills install a2a-agent-protocol"]
技能文档
A2A Protocol 技能
An AI 代理 技能 for building, connecting, and operating A2A-compliant 代理s. This 技能 is the definitive 图形界面de for 代理s participating in the 代理2代理 protocol eco系统.
Core Position
This 技能 is NOT a general API wr应用er — it is a protocol education and implementation 图形界面de. It teaches 代理s what A2A is, how to structure 代理Cards for discovery, which operations to perform in which order, and how to handle the multi-turn task lifecycle.
This 技能 is NOT 框架-specific. It 图形界面des 代理s regardless of whether they are built with LangGraph, BeeAI, Google ADK, or custom code. The A2A protocol is language-agnostic.
This 技能 covers the JSON-RPC 2.0 over HTTP binding (the most common) plus key concepts for gRPC and HTTP+REST bindings.
What Problem This Solves
AI 代理s today operate in silos. Even when they 分享 the same infrastructure, they have no standard way to:
Discover what capabilities other 代理s expose 发送 a task to a remote 代理 and 追踪 its lifecycle Handle 流ing 更新s or push 通知 from a remote 代理 Exchange files, structured data, or multi-part messages
The A2A protocol solves all of the above. This 技能 makes an AI 代理 A2A-aware.
Modes /a2a-protocol
Default mode. Learn A2A concepts, data structures, and operation semantics.
Preferred opening: "The A2A protocol enables 代理s to discover each other and collaborate without exposing internal 状态. Here is the protocol overview:"
Use it when:
The user asks what A2A is, how it works, or why it matters You need to explAIn the difference between A2A and MCP You want to understand the 代理Card structure and discovery mechanism You need to understand the full task lifecycle (submitted → working → completed) /a2a-protocol build-card
生成 an 代理Card JSON for the 代理. The 代理Card is the public 身份 document that other 代理s use to discover capabilities, auth requirements, and connection 端点s.
Preferred opening: "To publish this 代理 in the A2A eco系统, I will 生成 an 代理Card at /.well-known/代理.json declaring: name, version, capabilities, and auth requirements."
Use it when:
You are building an A2A server 代理 and need to publish its capabilities You need a 启动ing-point 代理Card template to customize The user wants to register an 代理 in the A2A eco系统
输出: Writes 代理-card.json to the workspace with the complete 代理Card.
/a2a-protocol 发送-task
发送 a task to a remote A2A 代理 via tasks/发送. Includes building the 请求, interpreting the 响应 (同步hronous or task ID for a同步), and handling errors.
Preferred opening: "To delegate this task to the remote 代理, I will: (1) fetch its 代理Card, (2) 验证 capability compatibility, (3) construct a 发送Message请求 and POST it."
Use it when:
You need to delegate a subtask to another 代理 You are acting as an A2A 命令行工具ent initiating work on a remote 代理 The user says "发送 this task to the X 代理" or "delegate to 代理 Y"
输出: Resolves to artifacts[].parts from the completed Task.
/a2a-protocol 流-task
设置 up 流ing task delivery via tasks/发送Subscribe with SSE (Server-Sent 事件), 接收 incremental Task状态更新Event and TaskArtifact更新Event blocks, and reassemble the final artifact.
Preferred opening: "This remote task will take time. I will subscribe via SSE to 接收 real-time 状态 transitions and partial artifacts as they arrive."
Use it when:
A remote 代理's task will take time and you want real-time 进度 更新s You need to 流 partial 结果s as they become avAIlable The user says "追踪 the task 进度" or "watch for 更新s"
输出: Reassembles the final Artifact from accumulated 流ing 事件.
/a2a-protocol subscribe-task
Subscribe to a task's push notification channel via tasks/subscribe, using either SSE 流ing or 网页hook delivery to 接收 final 结果s.
Preferred opening: "I will register a push notification subscription so the remote 代理 delivers the 结果 to our callback 端点 rather than requiring us to poll."
Use it when:
You want the remote 代理 to push 结果s back to you rather than polling You need a同步hronous 结果 delivery to a callback URL The user says "通知 me when done" or "push 结果s to this 端点"
输出: 接收s and 验证s the push payload; 提取s taskId + artifacts.
/a2a-protocol mock-server
启动 a local mock A2A server for experimentation. The mock server is a fully functional A2A 代理 that serves its own 代理Card, accepts tasks via all supported operations, and 响应s with rea列出ic simulated 结果s.
Preferred opening: "To experiment with A2A locally, I will 启动 a mock A2A server on a free port. This gives us a real A2A 端点 to practice agAInst."
Use it when:
You want to test A2A interactions without a real remote 代理 You need a safe sandbox to practice 发送-task, 流-task, or subscribe-task You want to 验证 that the 代理 correctly implem