Skip to content

Commit 40e502b

Browse files
committed
v0.2 — add protocols field + action via/operation binding
Adds a new top-level `protocols` block that declares sibling agent protocols a surface speaks (A2A, MCP, ACP, AP2, x402, skyfire, OpenAPI, GraphQL, etc.). AWP remains the discovery layer — agents hit /agent.json first, then learn from one document every standard the surface supports and where to reach each. Actions gain two new optional fields, `via` and `operation`, that link an action to a declared protocol. When `via` is set, the action is invoked through that protocol's client instead of direct HTTP — the existing v0.1 default. ### New top-level field - `protocols` (object, optional) — see §5.5 - Each key is a protocol identifier (lowercase, hyphenated) - Each value must include `version`; `endpoint` required for transport/tool protocols - Known identifiers (informative, not enforced): a2a, mcp, acp, ap2, x402, skyfire, openapi, graphql, payment ### Extended action fields - `endpoint` / `method` are now CONDITIONAL — required unless `via` is set. Fully backward-compatible for v0.1 files. - `via` (string, optional) — references an identifier in `protocols` - `operation` (string, optional) — protocol-specific operation name (e.g., an A2A method or MCP tool name) ### Backward compatibility All v0.1 files validate as v0.2 without modification. The new fields are purely additive. Agents encountering an unknown major version SHOULD degrade gracefully per §4. ### Reference implementation Live at https://laclawclaw.com/.well-known/agent.json — agent-only Shopify commerce store declaring MCP + A2A + Stripe payment link protocols in a single manifest. ### Changelog §16 now includes v0.2 (2026-04-16) alongside the v0.1 (2026-03-16) entry.
1 parent 56a42ee commit 40e502b

1 file changed

Lines changed: 106 additions & 6 deletions

File tree

SPEC.md

Lines changed: 106 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Agent Web Protocol — Specification v0.1
1+
# Agent Web Protocol — Specification v0.2
22

33
**Status:** Draft RFC
4-
**Published:** 2026-03-16
4+
**Published:** 2026-04-16
55
**Authors:** Agent Web Protocol contributors
66
**License:** MIT
77

@@ -53,17 +53,18 @@ MAJOR.MINOR
5353
- Agents encountering an unknown major version SHOULD degrade gracefully
5454
rather than fail entirely.
5555

56-
Current version: `0.1`
56+
Current version: `0.2`
5757

5858
---
5959

6060
## 5. Top-Level Fields
6161

6262
| Field | Type | Required | Description |
6363
|-------|------|----------|-------------|
64-
| `awp_version` | string | yes | Spec version (e.g. `"0.1"`) |
64+
| `awp_version` | string | yes | Spec version (e.g. `"0.2"`) |
6565
| `domain` | string | yes | Canonical domain this file applies to |
6666
| `intent` | string | yes | Plain language description of the surface |
67+
| `protocols` | object | no | Other agent protocols this surface speaks (see §5.5) |
6768
| `capabilities` | object | no | Feature flags (see §6) |
6869
| `auth` | object | no | Authentication contract (see §7) |
6970
| `entities` | object | no | Typed data models (see §8) |
@@ -75,6 +76,94 @@ Current version: `0.1`
7576

7677
---
7778

79+
## 5.5 Protocols
80+
81+
AWP is the discovery layer — the manifest. Many surfaces also speak one or
82+
more transport, tool-invocation, or payment protocols. The `protocols` field
83+
declares them so an agent reading agent.json knows, in a single fetch, every
84+
standard the surface supports and where to reach it.
85+
86+
```json
87+
"protocols": {
88+
"a2a": {
89+
"version": "0.3",
90+
"endpoint": "https://agent.example.com/agent/message",
91+
"agent_card": "https://agent.example.com/.well-known/agent-card.json"
92+
},
93+
"mcp": {
94+
"version": "2025-06-18",
95+
"endpoint": "https://mcp.example.com",
96+
"transport": "http"
97+
},
98+
"x402": {
99+
"version": "1.0",
100+
"wallet": "0x..."
101+
},
102+
"payment": {
103+
"type": "stripe_link",
104+
"agent_op": "checkout.create"
105+
}
106+
}
107+
```
108+
109+
### Field structure
110+
111+
Each entry is keyed by a protocol identifier (lowercase, hyphenated). The
112+
value is an object with at least:
113+
114+
| Field | Type | Required | Description |
115+
|-------|------|----------|-------------|
116+
| `version` | string | yes | Protocol version this surface conforms to |
117+
| `endpoint` | string (url) | conditional | Where to reach the protocol. Required for transport/tool protocols; optional for payment-only declarations |
118+
119+
Additional protocol-specific fields are allowed (e.g. `agent_card` for A2A,
120+
`transport` for MCP, `wallet` for x402). Agents MUST ignore unknown
121+
protocol-specific fields rather than fail.
122+
123+
### Registered protocol identifiers
124+
125+
The following identifiers SHOULD be used when a surface speaks a known
126+
standard. This list is informative; surfaces MAY declare additional
127+
custom protocols.
128+
129+
| Identifier | Standard | Layer |
130+
|------------|----------|-------|
131+
| `a2a` | Agent-to-Agent (Google) | Transport / messaging |
132+
| `mcp` | Model Context Protocol (Anthropic) | Tool invocation |
133+
| `acp` | Agent Communication Protocol (IBM) | Messaging |
134+
| `ap2` | Agent Payments Protocol (Google) | Payment |
135+
| `x402` | HTTP 402 + crypto wallet (Coinbase) | Payment |
136+
| `skyfire` | Skyfire agent payments | Payment / identity |
137+
| `openapi` | OpenAPI / Swagger | API description |
138+
| `graphql` | GraphQL | API description |
139+
| `payment` | Generic payment hand-off (e.g. hosted checkout link) | Payment |
140+
141+
### Linking actions to protocols
142+
143+
Actions MAY include an optional `via` field naming a protocol declared in
144+
`protocols`. Agents use this to route the action through the correct
145+
protocol client.
146+
147+
```json
148+
"actions": [
149+
{ "id": "list_products", "via": "a2a", "operation": "product.search" },
150+
{ "id": "checkout", "via": "a2a", "operation": "checkout.create" }
151+
]
152+
```
153+
154+
When an action has `via`, the named protocol MUST appear in `protocols`.
155+
When an action omits `via`, agents SHOULD assume direct HTTP at the
156+
declared `endpoint`/`method` (the v0.1 default behavior).
157+
158+
### Why this exists
159+
160+
Other agent protocols define how to talk. AWP defines who to talk to. By
161+
declaring sibling protocols inside agent.json, a surface gives every
162+
agent a single bootstrap URL — `/agent.json` — from which all other
163+
standards become reachable. Agents no longer guess the transport.
164+
165+
---
166+
78167
## 6. Capabilities
79168

80169
Optional feature flags agents can check before planning actions.
@@ -203,8 +292,10 @@ The core of agent.json. Each action represents something an agent can do.
203292
| `auth_required` | boolean | yes | Whether authentication is required |
204293
| `inputs` | object | yes | Typed input parameters |
205294
| `outputs` | object | yes | Typed output fields |
206-
| `endpoint` | string | yes | API endpoint path |
207-
| `method` | string | yes | HTTP method: `GET`, `POST`, `PUT`, `DELETE`, `PATCH` |
295+
| `endpoint` | string | conditional | API endpoint path. Required unless `via` references a protocol that supplies the endpoint |
296+
| `method` | string | conditional | HTTP method: `GET`, `POST`, `PUT`, `DELETE`, `PATCH`. Required unless `via` is set |
297+
| `via` | string | no | Identifier of a protocol declared in `protocols` (see §5.5). When set, the action is invoked through that protocol |
298+
| `operation` | string | no | Protocol-specific operation name when `via` is set (e.g. an A2A method, an MCP tool name) |
208299
| `rate_limit` | string | no | Rate limit (e.g. `"30/minute"`) |
209300
| `idempotency` | object | no | Idempotency contract (see below) |
210301
| `execution_model` | string | no | `sync` (default) or `async` |
@@ -350,6 +441,15 @@ A conforming agent.json file MAY:
350441

351442
## 16. Changelog
352443

444+
### v0.2 (2026-04-16)
445+
- Added `protocols` top-level field (§5.5) — declares sibling agent
446+
protocols a surface speaks (A2A, MCP, ACP, AP2, x402, etc.) so agents
447+
can route via known transports
448+
- Added optional `via` and `operation` fields on actions, linking actions
449+
to a declared protocol
450+
- Reference implementation: `laclawclaw.com/.well-known/agent.json`
451+
- Backward compatible — v0.1 files validate as v0.2
452+
353453
### v0.1 (2026-03-16)
354454
- Initial draft
355455
- Core fields: actions, auth, entities, errors, dependencies, agent_hints

0 commit comments

Comments
 (0)