Skip to content

A2A Profile

目标

A2A 是 AaaS v1 的一等北向协议档案,用于 Agent 发现、Agent Card 发布、任务创建、流式输出和跨 Agent 协作。

A2A 对外暴露的是 canonical AgentRunInteractionRequest 和事件流的协议视图,而不是另一套独立的数据模型。

档案声明

  • A2A 能力由 AgentRevision.protocolProfiles.a2a 声明
  • 实际 endpoint、transport 和 security 由 ProtocolBinding(protocol=a2a) 声明
  • identityProjectionskillsProjection 用于生成面向 A2A 的 Agent Card 视图
  • transportssecurityextensions 用于声明 A2A endpoint 的可用接口与安全方案
  • protocolVersion 表示 A2A 版本,不等于 AaaS /v1

核心映射

A2A 概念AaaS canonical model
Agent CardAgent.card + AgentRevision.protocolProfiles.a2a + ProtocolBinding(a2a)
skillsskillsProjection,或从 card / tool 视图投影
taskRun
task stateRun.status + interaction 覆盖层
message / update streamSequencedOutputEnvelope / 消息投影
artifactArtifact
input-required / auth-requiredInteractionRequest
resubscribe cursorcursor(runId, threadId, sequence)
push notificationwebhook 或 adapter 推送,但顺序仍以 event log 为准

映射原则

  • Agent discovery MUST 来源于 Agent.cardAgentRevision.protocolProfiles.a2a 与启用的 ProtocolBinding
  • A2A 的任务创建语义映射到 CreateRunCommand
  • A2A 的继续输入语义映射到 ContinueRunCommand
  • A2A 的鉴权、补充输入、确认语义映射到 RespondInteractionCommand
  • A2A 的流式事件 MUST 映射到统一 SequencedOutputEnvelope

任务与状态语义

  • A2A task 的生命周期 MUST 复用 canonical run 状态机
  • run 在等待输入或授权时,MUST NOT 被映射成新的 AaaS 顶层状态;应通过 InteractionRequestblockedReason 表达
  • 子任务、委派或 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 / resume
    • MUST NOT 生成与主事件流不一致的临时消息模型
    • MUST 保持与 event log 一致的排序语义

安全与多接口

  • 如 A2A profile 声明多种接口或安全方案,adapter MUST 在 Agent Card 中准确宣告
  • signedAgentCardextendedAgentCardpushNotifications 一类能力只在 profile 明确声明时才可对外暴露
  • 安全层的字段转译 MAY 发生在 adapter 中,但授权结果 MUST 仍落到 AaaS 的组织、Agent 和 run 作用域上

兼容要求

  • A2A 的 protocolVersion 与 agent-service-spec 大版本无直接绑定
  • A2A 适配层可以做字段转译,但不得改变 run 状态机语义
  • A2A 的 push、stream、resubscribe 与读面查询 MUST 对同一 run 暴露一致事实

白皮书与规范内容以仓库真源为准。