-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathagent-policy.schema.json
More file actions
347 lines (347 loc) · 12 KB
/
agent-policy.schema.json
File metadata and controls
347 lines (347 loc) · 12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://agentpolicy.org/schema/v1/agent-policy.schema.json",
"title": "Agent Policy Protocol (APoP) v1.0 Manifest",
"description": "Defines how AI agents may interact with a website — what they can access, what actions are allowed, rate limits, and verification requirements. Part of the Agent Policy Protocol (APoP) standard. Note: The $id URI is the canonical identifier for this schema. The schema is currently hosted at https://github.com/agent-policy-protocol/spec/blob/main/spec/schema/agent-policy.schema.json.",
"type": "object",
"required": ["version", "defaultPolicy"],
"properties": {
"$schema": {
"type": "string",
"description": "Reference to this JSON Schema for validation.",
"format": "uri"
},
"version": {
"type": "string",
"description": "APoP protocol version. Use '1.0' for this specification.",
"enum": ["0.1", "1.0"],
"default": "1.0"
},
"policyUrl": {
"type": "string",
"description": "RECOMMENDED. Canonical URL where this policy is hosted (e.g., https://example.com/.well-known/agent-policy.json). Without this, error responses cannot reference the policy.",
"format": "uri"
},
"defaultPolicy": {
"$ref": "#/$defs/PolicyRule",
"description": "Site-wide fallback rules. Applies when no path-specific rule matches the request."
},
"pathPolicies": {
"type": "array",
"description": "Path-specific policy overrides. Evaluated in order; first matching path wins.",
"items": {
"$ref": "#/$defs/PathPolicy"
}
},
"verification": {
"$ref": "#/$defs/Verification",
"description": "Configuration for how agent identity verification is handled."
},
"contact": {
"$ref": "#/$defs/Contact",
"description": "Contact information for policy questions, abuse reports, or compliance queries."
},
"metadata": {
"$ref": "#/$defs/Metadata",
"description": "Human-readable metadata about this policy."
},
"interop": {
"$ref": "#/$defs/Interoperability",
"description": "Optional cross-protocol interoperability declarations."
}
},
"additionalProperties": false,
"$defs": {
"ActionType": {
"type": "string",
"description": "Standardized action type that an agent may perform.",
"enum": [
"read",
"index",
"extract",
"summarize",
"render",
"api_call",
"form_submit",
"automated_purchase",
"tool_invoke",
"all"
]
},
"RateLimit": {
"type": "object",
"description": "Rate limiting configuration for agent requests.",
"required": ["requests", "window"],
"properties": {
"requests": {
"type": "integer",
"description": "Maximum number of requests allowed within the specified window.",
"minimum": 0
},
"window": {
"type": "string",
"description": "Time window for rate limiting.",
"enum": ["minute", "hour", "day"]
}
},
"additionalProperties": false
},
"PolicyRule": {
"type": "object",
"description": "A set of rules governing agent access.",
"required": ["allow"],
"properties": {
"allow": {
"type": "boolean",
"description": "If true, access is allowed by default. If false, access is denied."
},
"disallow": {
"type": "array",
"description": "List of explicitly disallowed action types. Takes precedence over 'allow' when both are present.",
"items": { "$ref": "#/$defs/ActionType" }
},
"actions": {
"type": "array",
"description": "Explicit list of permitted action types. Use this array to enumerate allowed actions alongside 'allow: true'.",
"items": { "$ref": "#/$defs/ActionType" }
},
"rateLimit": {
"$ref": "#/$defs/RateLimit"
},
"requireVerification": {
"type": "boolean",
"description": "If true, agents must verify their identity before access is granted.",
"default": false
}
},
"additionalProperties": false
},
"PathPolicy": {
"type": "object",
"description": "Path-specific policy override. Extends PolicyRule with path matching and agent filtering.",
"required": ["path"],
"properties": {
"path": {
"type": "string",
"description": "URL path pattern. Supports glob-style wildcards: * matches a single path segment, ** matches multiple segments.",
"examples": ["/public/*", "/api/**", "/admin/*", "/checkout/*"]
},
"allow": {
"type": "boolean",
"description": "If true, access is allowed on this path. If false, access is denied."
},
"disallow": {
"type": "array",
"items": { "$ref": "#/$defs/ActionType" }
},
"actions": {
"type": "array",
"items": { "$ref": "#/$defs/ActionType" }
},
"rateLimit": {
"$ref": "#/$defs/RateLimit"
},
"requireVerification": {
"type": "boolean",
"default": false
},
"agentAllowlist": {
"type": "array",
"description": "List of agent identifiers explicitly allowed on this path. If present, only listed agents may access. Accepts DID URIs, email-style identifiers, or agent name patterns.",
"items": {
"type": "string"
},
"examples": [["did:web:comet.perplexity.ai", "did:web:gemini.google.com", "mybot@company.com"]]
},
"agentDenylist": {
"type": "array",
"description": "List of agent identifiers explicitly denied on this path. Agents on this list are blocked regardless of other rules.",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"Verification": {
"type": "object",
"description": "Configuration for agent identity verification.",
"required": ["method"],
"properties": {
"method": {
"oneOf": [
{
"type": "string",
"enum": ["pkix", "did", "verifiable-credential", "partner-token"]
},
{
"type": "array",
"description": "Multiple accepted verification methods (any one suffices).",
"items": {
"type": "string",
"enum": ["pkix", "did", "verifiable-credential", "partner-token"]
}
}
],
"description": "Supported verification method(s). pkix = PKI signature validation, did = Decentralized Identifiers, verifiable-credential = W3C Verifiable Credentials (AP2 alignment), partner-token = pre-shared API token."
},
"registry": {
"type": "string",
"description": "URL of the verification registry for identity lookups.",
"format": "uri"
},
"trustedIssuers": {
"type": "array",
"description": "List of trusted Verifiable Credential issuer DIDs. Only relevant when method includes 'verifiable-credential'.",
"items": {
"type": "string"
},
"examples": [["did:web:trust.agentpolicy.org", "did:web:google.com", "did:web:anthropic.com"]]
},
"verificationEndpoint": {
"type": "string",
"description": "URL where agents can initiate verification (e.g., key exchange or token request).",
"format": "uri"
}
},
"additionalProperties": false
},
"Contact": {
"type": "object",
"description": "Contact information for the policy owner.",
"properties": {
"email": {
"type": "string",
"description": "Contact email for policy questions or compliance.",
"format": "email"
},
"policyUrl": {
"type": "string",
"description": "Human-readable policy page URL.",
"format": "uri"
},
"abuseUrl": {
"type": "string",
"description": "URL for reporting agent abuse or policy violations.",
"format": "uri"
}
},
"additionalProperties": false
},
"Metadata": {
"type": "object",
"description": "Human-readable metadata about this policy.",
"properties": {
"description": {
"type": "string",
"description": "Brief description of this policy's purpose."
},
"owner": {
"type": "string",
"description": "Organization or individual that owns this website/policy."
},
"maintainer": {
"type": "string",
"description": "Contact for the person or team maintaining the policy."
},
"lastModified": {
"type": "string",
"description": "ISO 8601 timestamp of last policy update.",
"format": "date-time"
},
"license": {
"type": "string",
"description": "License URL or SPDX identifier for the policy content."
}
},
"additionalProperties": false
},
"Interoperability": {
"type": "object",
"description": "Cross-protocol interoperability declarations. Links this APoP policy to other agentic protocol endpoints.",
"properties": {
"a2aAgentCard": {
"type": "string",
"description": "URL to the site's A2A Agent Card (if the site operates as an A2A agent). Typically /.well-known/agent.json.",
"format": "uri"
},
"mcpServerUrl": {
"type": "string",
"description": "URL to the site's MCP server endpoint (if the site exposes MCP tools).",
"format": "uri"
},
"webmcpEnabled": {
"type": "boolean",
"description": "Whether the site exposes WebMCP tools via navigator.modelContext.",
"default": false
},
"ucpCapabilities": {
"type": "string",
"description": "URL to the site's UCP capability profile (if the site supports Universal Commerce Protocol).",
"format": "uri"
},
"apaaiEndpoint": {
"type": "string",
"description": "URL to the site's APAAI accountability endpoint for action logging and evidence.",
"format": "uri"
}
},
"additionalProperties": false
}
},
"examples": [
{
"$schema": "https://agentpolicy.org/schema/v1/agent-policy.schema.json",
"version": "1.0",
"defaultPolicy": {
"allow": true,
"actions": ["read", "render"],
"rateLimit": { "requests": 100, "window": "hour" },
"requireVerification": false
}
},
{
"version": "1.0",
"policyUrl": "https://example.com/.well-known/agent-policy.json",
"defaultPolicy": {
"allow": true,
"actions": ["read", "render"],
"rateLimit": { "requests": 100, "window": "hour" },
"requireVerification": false
},
"pathPolicies": [
{
"path": "/public/*",
"allow": true,
"actions": ["read", "index", "summarize"],
"requireVerification": false
},
{
"path": "/api/*",
"allow": true,
"actions": ["read", "api_call"],
"requireVerification": true,
"rateLimit": { "requests": 1000, "window": "hour" }
},
{
"path": "/admin/*",
"allow": false
}
],
"verification": {
"method": "verifiable-credential",
"registry": "https://registry.agentpolicy.org",
"trustedIssuers": ["did:web:trust.agentpolicy.org"]
},
"contact": {
"email": "security@example.com",
"policyUrl": "https://example.com/agent-policy"
},
"metadata": {
"description": "Agent access policy for Example Corp",
"owner": "Example Corp",
"lastModified": "2026-02-14T00:00:00Z"
}
}
]
}