Schemas
JSON Schemas
Three schemas define every structured payload in ANP/0.1. They are served raw at stable URLs on this domain with permissive CORS, so your implementation can $ref them or vendor them. Validation is strict: additionalProperties is false everywhere, and unknown keys are rejected, not ignored.
envelope.schema.json
DownloadThe mandate envelope both sides declare at session open: party, agent (which must declare itself an AI), what it may discuss and disclose, and its offer authority.
GET /schemas/envelope.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://app.vendorbenchmark.com/agent-protocol/schemas/envelope.schema.json",
"title": "ANP v0.1 mandate exchange envelope",
"type": "object",
"additionalProperties": false,
"required": ["party", "agent", "may_discuss", "may_disclose", "offer_authority"],
"properties": {
"party": { "type": "string", "minLength": 1, "maxLength": 160 },
"agent": {
"type": "object",
"additionalProperties": false,
"required": ["name", "declared_ai"],
"properties": {
"name": { "type": "string", "minLength": 1, "maxLength": 160 },
"declared_ai": { "const": true }
}
},
"may_discuss": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"items": { "type": "string", "minLength": 1, "maxLength": 120 }
},
"may_disclose": {
"type": "array",
"maxItems": 20,
"items": { "type": "string", "minLength": 1, "maxLength": 120 }
},
"will_not_disclose": {
"type": "array",
"maxItems": 20,
"items": { "type": "string", "minLength": 1, "maxLength": 120 }
},
"offer_authority": { "enum": ["none", "propose_only", "bind_with_human_approval"] },
"human_contact": { "type": "string", "maxLength": 320 }
}
}offer.schema.json
DownloadOffers and counter-offers: currency, term, required expiry, 1 to 200 line items with quantities and unit prices, conditions, and notes. Unknown keys are rejected.
GET /schemas/offer.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://app.vendorbenchmark.com/agent-protocol/schemas/offer.schema.json",
"title": "ANP v0.1 offer / counter-offer",
"type": "object",
"additionalProperties": false,
"required": ["currency", "term_months", "expires_at", "line_items"],
"properties": {
"currency": { "type": "string", "pattern": "^[A-Z]{3}$" },
"term_months": { "type": "integer", "minimum": 1, "maximum": 120 },
"expires_at": { "type": "string", "format": "date-time" },
"line_items": {
"type": "array",
"minItems": 1,
"maxItems": 200,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["description", "quantity", "unit", "unit_price", "currency"],
"properties": {
"sku": { "type": "string", "maxLength": 80 },
"description": { "type": "string", "minLength": 1, "maxLength": 300 },
"quantity": { "type": "number", "exclusiveMinimum": 0, "maximum": 10000000 },
"unit": { "type": "string", "minLength": 1, "maxLength": 40 },
"unit_price": { "type": "number", "minimum": 0, "maximum": 1000000000 },
"currency": { "type": "string", "pattern": "^[A-Z]{3}$" },
"term_months": { "type": "integer", "minimum": 1, "maximum": 120 }
}
}
},
"total_annual": { "type": "number", "minimum": 0 },
"conditions": {
"type": "array",
"maxItems": 20,
"items": { "type": "string", "minLength": 1, "maxLength": 500 }
},
"notes": { "type": "string", "maxLength": 4000 }
}
}event.schema.json
DownloadOne event in the session log: seq, actor, kind, payload, the three hashes that form the chain, the authorship signature, and its signer.
GET /schemas/event.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://app.vendorbenchmark.com/agent-protocol/schemas/event.schema.json",
"title": "ANP v0.1 session log event",
"type": "object",
"additionalProperties": false,
"required": ["seq", "actor", "kind", "payload", "payload_hash", "prev_hash", "event_hash", "at"],
"properties": {
"seq": { "type": "integer", "minimum": 1 },
"actor": { "enum": ["vendor_agent", "buyer"] },
"kind": { "enum": ["session_open", "envelope", "offer", "counter_offer", "message", "decline", "session_close"] },
"payload": {},
"payload_hash": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
"prev_hash": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
"event_hash": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
"signature": { "type": ["string", "null"], "maxLength": 120 },
"signer": { "type": ["string", "null"], "pattern": "^[0-9a-f]{64}$" },
"at": { "type": "string", "format": "date-time" }
}
}