Skip to content

Commit 4125f34

Browse files
authored
Merge pull request #286 from flashcatcloud/docs/a2a-protocol-version
docs(ai-sre): document supported A2A protocol version and Agent Card format
2 parents a0a9d21 + 3d4b4da commit 4125f34

2 files changed

Lines changed: 86 additions & 2 deletions

File tree

en/ai-sre/agents.mdx

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,55 @@ On the A2A Agents list page, click **Add A2A Agent** and fill in the form:
7272
| Scope | Account / Team || Scope: **Account** (visible account-wide) or a specific **Team** (visible and editable only to members of that team). Required — see "Scope" below |
7373
| Execution Environment | Cloud / BYOC Runners (multiple) | All environments | Controls where this A2A agent is available. Select Cloud and one or more visible BYOC Runners; leave empty to make it available everywhere. It does not route delegated calls: an A2A call still runs in the current AI SRE session's environment. For a remote agent available only on a private network, select only the Runner(s) that can reach it |
7474
| Instructions | string || The agent-selection signal shown to AI SRE, as **a single document**: an optional `summary:` frontmatter block plus a body. The summary appears in the available-agent list; the body is delivered in full only on first delegation. Required; the whole document is at most 50 KB, and `summary` is at most 1,024 characters and must not contain `<` or `>`. See "[Writing Instructions](#writing-instructions)" below for the format |
75-
| Card URL | string || The Agent Card URL of the remote A2A agent, or just the service origin for agents that follow the default well-known location (for example, `https://agents.example.com`). If the URL includes a path, the platform reads that exact URL; if only an origin is provided, it resolves `/.well-known/agent-card.json` by A2A convention. Required. The platform only validates that the URL is well-formed (scheme is http/https, host is non-empty) — it does not classify hosts or IPs; actual network reachability and egress restrictions depend on the current AI SRE session's execution environment. The Execution Environment field above only limits where this agent is available |
75+
| Card URL | string || The Agent Card URL of the remote A2A agent, or just the service origin for agents that follow the default well-known location (for example, `https://agents.example.com`). If the URL includes a path, the platform reads that exact URL; if only an origin is provided, it resolves `/.well-known/agent-card.json` by A2A convention. Required. The platform only validates that the URL is well-formed (scheme is http/https, host is non-empty) — it does not classify hosts or IPs; actual network reachability and egress restrictions depend on the current AI SRE session's execution environment. The Execution Environment field above only limits where this agent is available. The remote agent must implement A2A Protocol 1.0 — see "[Protocol Version and Agent Card Requirements](#protocol-version-and-agent-card-requirements)" below |
7676
| Auth Type | enum | `none` | Credential type attached to outbound requests: `none` / `bearer` (Bearer Token) / `api_key` (custom Header + Key) |
7777
| Streaming | bool | on | Whether to communicate with the remote agent in streaming mode |
7878
| User Auth Mode | enum | `shared` | See "Auth Modes" below |
7979
| Skip TLS certificate verification | bool | off | Shown only when the Card URL uses HTTPS. Enable only when the remote endpoint uses a self-signed certificate inside a controlled network; this skips certificate-chain and hostname verification |
8080
| Allow fetching OAuth configuration over HTTP (testing only) | bool | off | Required only when "Per-user OAuth" is selected and the Card URL is a non-local HTTP URL. Use only in controlled test environments; after you enable it, the AI SRE service can fetch OAuth metadata from that host |
8181

82+
### Protocol Version and Agent Card Requirements
83+
84+
When calling a remote agent as an A2A client, the platform implements **A2A Protocol 1.0** (with the `JSONRPC` or `HTTP+JSON` protocol binding). **Protocol 0.x and other major versions are not supported**: the remote agent's Agent Card must be in the 1.0 format, or delegated calls will fail.
85+
86+
A 1.0-format Agent Card declares its endpoints via the `supportedInterfaces` array, where at least one entry must contain `url`, `protocolBinding` (`JSONRPC` or `HTTP+JSON`), and `protocolVersion: "1.0"`. A minimal valid card looks like this:
87+
88+
```json
89+
{
90+
"name": "metrics-analyzer",
91+
"description": "Analyzes metrics for a target service",
92+
"supportedInterfaces": [
93+
{
94+
"url": "https://agents.example.com/a2a",
95+
"protocolBinding": "JSONRPC",
96+
"protocolVersion": "1.0"
97+
}
98+
],
99+
"capabilities": { "streaming": true },
100+
"skills": [
101+
{
102+
"id": "analyze_metrics",
103+
"name": "Analyze Metrics",
104+
"description": "Query and summarize metrics within a time window",
105+
"tags": ["metrics"]
106+
}
107+
],
108+
"defaultInputModes": ["text"],
109+
"defaultOutputModes": ["text"]
110+
}
111+
```
112+
113+
<Note>
114+
The `version` field on the card is the **agent's own version number**, not the protocol version. The protocol version is declared by `protocolVersion` in each `supportedInterfaces` entry.
115+
</Note>
116+
117+
**Migrating from 0.x to 1.0**: if your Agent Card still uses the 0.x format, adjust it as follows before connecting:
118+
119+
| 0.x format | 1.0 format |
120+
| --- | --- |
121+
| Top-level `url` + `preferredTransport` + `additionalInterfaces` | `supportedInterfaces` array, each entry with `url` / `protocolBinding` / `protocolVersion` |
122+
| `authentication` | `securitySchemes` + `security` |
123+
82124
### Writing Instructions
83125

84126
Instructions are **a single document** with up to two parts: an optional YAML frontmatter block at the top (a single `summary` field), followed by the body.

zh/ai-sre/agents.mdx

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,55 @@ A2A Agent 的列表与管理入口在 **插件 → Agents** 页面(菜单标
7272
| 范围 | 账户 / 团队 || 作用域:**账户**(账户内全局可见)或某个**团队**(仅该团队成员可见和可编辑)。必填,详见下文「作用域」 |
7373
| 执行环境 | 云端环境 / BYOC Runner(可多选) | 所有环境 | 决定该 A2A Agent 在哪些执行环境中可用。可以选择云端环境和一个或多个当前可见的 BYOC Runner;不选择时默认在所有环境可用。它不指定委派调用路由:A2A 调用仍在当前 AI SRE 会话自身的执行环境中运行。若远端 Agent 只在某个内网可访问,请只选择能访问它的 Runner |
7474
| 调用说明 | string || 面向 AI SRE 的 Agent 选择信号,是**一份文档**:可选的 `summary:` frontmatter + 正文。简介(`summary`)进入「可用 Agent 清单」,正文在首次委派时才完整送达。必填;整份文档最多 50 KB,`summary` 最多 1,024 个字符且不能包含 `<` `>`。写法见下文「[调用说明的写法](#调用说明的写法)|
75-
| Card URL | string || 远端 A2A Agent 的 Agent Card 地址,或仅填写遵循默认 well-known 规则的服务根地址(如 `https://agents.example.com`)。如果 URL 已带路径,平台会按该地址原样读取;如果只填服务根地址,平台按 A2A 约定查找 `/.well-known/agent-card.json`。必填。平台只校验 URL 格式合法(scheme 为 http/https、host 非空),不做主机或 IP 分类;实际的网络可达性与出站限制取决于发起委派的 AI SRE 会话所在执行环境,上面的执行环境字段只限制该 Agent 在哪些环境中可用 |
75+
| Card URL | string || 远端 A2A Agent 的 Agent Card 地址,或仅填写遵循默认 well-known 规则的服务根地址(如 `https://agents.example.com`)。如果 URL 已带路径,平台会按该地址原样读取;如果只填服务根地址,平台按 A2A 约定查找 `/.well-known/agent-card.json`。必填。平台只校验 URL 格式合法(scheme 为 http/https、host 非空),不做主机或 IP 分类;实际的网络可达性与出站限制取决于发起委派的 AI SRE 会话所在执行环境,上面的执行环境字段只限制该 Agent 在哪些环境中可用。远端 Agent 需实现 A2A Protocol 1.0,见下文「[协议版本与 Agent Card 要求](#协议版本与-agent-card-要求) |
7676
| 认证类型 | enum | `none` | 出站请求附带的凭证类型:`none`(无)/ `bearer`(Bearer Token)/ `api_key`(自定义 Header + Key) |
7777
| 流式传输 | bool || 是否以流式方式与远端交互 |
7878
| 用户级认证模式 | enum | `shared` | 见下表「认证模式」 |
7979
| 跳过 TLS 证书校验 | bool || 仅当 Card URL 为 HTTPS 时显示。只在远端使用自签证书且网络受控时开启;开启后会跳过证书链和主机名校验 |
8080
| 允许通过 HTTP 获取 OAuth 配置(仅限测试环境) | bool || 仅当选择「每用户 OAuth」且 Card URL 是非本地 HTTP 地址时需要确认。只用于受控测试环境;开启后 AI SRE 服务端会访问该主机的 OAuth metadata |
8181

82+
### 协议版本与 Agent Card 要求
83+
84+
平台作为 A2A 客户端调用远端 Agent,实现的是 **A2A Protocol 1.0**`JSONRPC``HTTP+JSON` 协议绑定)。**0.x 及其他大版本协议不受支持**:远端 Agent 的 Agent Card 必须是 1.0 格式,否则委派调用会失败。
85+
86+
1.0 格式的 Agent Card 通过 `supportedInterfaces` 数组声明接入点,其中至少一项需包含 `url``protocolBinding``JSONRPC``HTTP+JSON`)和 `protocolVersion: "1.0"`。一张最小合法卡片如下:
87+
88+
```json
89+
{
90+
"name": "metrics-analyzer",
91+
"description": "Analyzes metrics for a target service",
92+
"supportedInterfaces": [
93+
{
94+
"url": "https://agents.example.com/a2a",
95+
"protocolBinding": "JSONRPC",
96+
"protocolVersion": "1.0"
97+
}
98+
],
99+
"capabilities": { "streaming": true },
100+
"skills": [
101+
{
102+
"id": "analyze_metrics",
103+
"name": "Analyze Metrics",
104+
"description": "Query and summarize metrics within a time window",
105+
"tags": ["metrics"]
106+
}
107+
],
108+
"defaultInputModes": ["text"],
109+
"defaultOutputModes": ["text"]
110+
}
111+
```
112+
113+
<Note>
114+
卡片里的 `version` 字段是 **Agent 自身的版本号**,不是协议版本;协议版本由 `supportedInterfaces` 各项中的 `protocolVersion` 声明。
115+
</Note>
116+
117+
**从 0.x 迁移到 1.0**:如果您的 Agent Card 仍是 0.x 旧格式,请按下表调整后再接入:
118+
119+
| 0.x 旧格式 | 1.0 格式 |
120+
| --- | --- |
121+
| 顶层 `url` + `preferredTransport` + `additionalInterfaces` | `supportedInterfaces` 数组,每项含 `url` / `protocolBinding` / `protocolVersion` |
122+
| `authentication` | `securitySchemes` + `security` |
123+
82124
### 调用说明的写法
83125

84126
调用说明是**一份文档**,最多分两部分:开头一段可选的 YAML frontmatter(只有一个 `summary` 字段),后面是正文。

0 commit comments

Comments
 (0)