主题
A2A Profile
目标
A2A 是 AaaS v1 的一等北向协议档案,用于 Agent 发现、Agent Card 发布、任务创建、流式输出和跨 Agent 协作。
A2A 对外暴露的是 canonical Agent、Run、InteractionRequest 和事件流的协议视图,而不是另一套独立的数据模型。
档案声明
- A2A 能力由
AgentRevision.protocolProfiles.a2a声明 - 实际 endpoint、transport 和 security 由
ProtocolBinding(protocol=a2a)声明 identityProjection与skillsProjection用于生成面向 A2A 的 Agent Card 视图transports、security和extensions用于声明 A2A endpoint 的可用接口与安全方案protocolVersion表示 A2A 版本,不等于 AaaS/v1
核心映射
| A2A 概念 | AaaS canonical model |
|---|---|
| Agent Card | Agent.card + AgentRevision.protocolProfiles.a2a + ProtocolBinding(a2a) |
| skills | skillsProjection,或从 card / tool 视图投影 |
| task | Run |
| task state | Run.status + interaction 覆盖层 |
| message / update stream | SequencedOutputEnvelope / 消息投影 |
| artifact | Artifact |
input-required / auth-required | InteractionRequest |
| resubscribe cursor | cursor(runId, threadId, sequence) |
| push notification | webhook 或 adapter 推送,但顺序仍以 event log 为准 |
映射原则
- Agent discovery
MUST来源于Agent.card、AgentRevision.protocolProfiles.a2a与启用的ProtocolBinding - A2A 的任务创建语义映射到
CreateRunCommand - A2A 的继续输入语义映射到
ContinueRunCommand - A2A 的鉴权、补充输入、确认语义映射到
RespondInteractionCommand - A2A 的流式事件
MUST映射到统一SequencedOutputEnvelope
任务与状态语义
- A2A task 的生命周期
MUST复用 canonical run 状态机 - run 在等待输入或授权时,
MUST NOT被映射成新的 AaaS 顶层状态;应通过InteractionRequest和blockedReason表达 - 子任务、委派或 handoff
SHOULD通过RunLink建模 - A2A 的历史状态查询
SHOULD来自读面投影,而不是 adapter 的临时缓存
必需能力
GET /.well-known/agent-card.json- 返回 Agent Card 视图
- 其中的身份、skills、supported interfaces、安全要求
MUST与 revision profile 和 binding 一致
- task 创建、继续、查询和流式订阅
MUST映射到控制面命令、读面查询和标准事件流
- 如协议支持流式响应、重新订阅或推送:
MUST支持 cursor / resumeMUST NOT生成与主事件流不一致的临时消息模型MUST保持与 event log 一致的排序语义
安全与多接口
- 如 A2A profile 声明多种接口或安全方案,adapter
MUST在 Agent Card 中准确宣告 signedAgentCard、extendedAgentCard、pushNotifications一类能力只在 profile 明确声明时才可对外暴露- 安全层的字段转译
MAY发生在 adapter 中,但授权结果MUST仍落到 AaaS 的组织、Agent 和 run 作用域上
兼容要求
- A2A 的 protocolVersion 与
agent-service-spec大版本无直接绑定 - A2A 适配层可以做字段转译,但不得改变 run 状态机语义
- A2A 的 push、stream、resubscribe 与读面查询
MUST对同一 run 暴露一致事实