Message Schema
Complete JSON schema, per-performative body definitions, and validation rules
Every ASP message conforms to a single top-level JSON schema. The content.body object varies by performative, with each of the 13 performatives defining its own body schema.
Top-Level Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"version",
"messageId",
"sessionId",
"sequenceNumber",
"timestamp",
"sender",
"performative",
"content",
"integrity"
],
"properties": {
"version": {
"type": "string",
"pattern": "^asp/\\d+\\.\\d+$",
"description": "Protocol version. Current: asp/0.1"
},
"messageId": {
"type": "string",
"format": "uuid",
"description": "UUID v7 (time-ordered) unique to this message"
},
"sessionId": {
"type": "string",
"format": "uuid",
"description": "UUID v7 identifying the session"
},
"sequenceNumber": {
"type": "integer",
"minimum": 0,
"description": "Monotonically increasing per sender within a session"
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp with Z suffix (UTC)"
},
"sender": {
"type": "object",
"required": ["agentId", "orgId", "trustScore", "dpopProof"],
"properties": {
"agentId": {
"type": "string",
"pattern": "^agent://",
"description": "Agent URI (e.g., agent://acme.com/procurement/alpha)"
},
"orgId": {
"type": "string",
"description": "Organization the agent belongs to"
},
"trustScore": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Sender's current composite trust score"
},
"dpopProof": {
"type": "string",
"description": "DPoP proof JWT binding this message to the sender's key pair"
}
}
},
"recipient": {
"type": "string",
"pattern": "^agent://",
"description": "Target agent URI. Optional for broadcast messages."
},
"performative": {
"type": "string",
"enum": [
"PROPOSE", "ACCEPT", "REJECT", "COUNTER",
"INFORM", "QUERY", "CLARIFY", "COMMIT",
"DELEGATE", "ESCALATE", "WITHDRAW", "OBSERVE", "CLOSE"
],
"description": "The communicative act this message performs"
},
"content": {
"type": "object",
"required": ["mimeType", "body"],
"properties": {
"mimeType": {
"type": "string",
"description": "Content type. Default: application/asp+json"
},
"body": {
"type": "object",
"description": "Performative-specific payload (see per-performative schemas below)"
},
"context": {
"type": "array",
"description": "Array of reference IDs providing context for this message"
}
}
},
"integrity": {
"type": "object",
"required": ["hash", "previousHash", "signature"],
"properties": {
"hash": {
"type": "string",
"pattern": "^sha256:",
"description": "SHA-256 hash of the canonical content object"
},
"previousHash": {
"type": "string",
"pattern": "^sha256:",
"description": "Hash of the previous message in the session chain"
},
"signature": {
"type": "string",
"pattern": "^ed25519:",
"description": "Ed25519 signature of the canonical fields"
}
}
},
"constraints": {
"type": "object",
"properties": {
"maxResponseTimeMs": {
"type": "integer",
"description": "Maximum time in milliseconds for a response"
},
"maxTokenBudget": {
"type": "integer",
"description": "Maximum LLM token budget for processing this message"
},
"requiredTrustScore": {
"type": "number",
"description": "Minimum trust score required to respond"
},
"allowedPerformatives": {
"type": "array",
"items": { "type": "string" },
"description": "Restrict which performatives the recipient may use in response"
}
}
}
}
}Top-Level Field Reference
| Field | Type | Required | Description |
|---|---|---|---|
version | string | Yes | Protocol version matching asp/{major}.{minor} |
messageId | string (UUID v7) | Yes | Time-ordered unique identifier for this message |
sessionId | string (UUID v7) | Yes | Identifies the session this message belongs to |
sequenceNumber | integer | Yes | Per-sender monotonic counter starting at 0 |
timestamp | string (ISO 8601) | Yes | UTC timestamp with Z suffix |
sender | object | Yes | Sender identity with agent URI, org, trust score, DPoP proof |
recipient | string | No | Target agent URI. Omitted for broadcast. |
performative | string (enum) | Yes | One of the 13 defined communicative acts |
content | object | Yes | Contains mimeType, body, and optional context |
integrity | object | Yes | Hash chain fields: hash, previousHash, signature |
constraints | object | No | Optional constraints on how the recipient should respond |
Per-Performative Body Schemas
PROPOSE
Initiates a session, suggests terms, requests actions, or asks for information.
| Field | Type | Required | Description |
|---|---|---|---|
proposalId | string | Yes | Unique identifier for this proposal |
type | string | Yes | One of: session-invitation, terms, action, information-request |
subject | string | Yes | Human-readable description of the proposal |
terms | object | No | Structured terms being proposed (free-form key-value) |
validUntil | string (ISO 8601) | No | Expiration timestamp for the proposal |
referenceId | string | No | Links to a previous message or external reference |
{
"proposalId": "prop_001",
"type": "terms",
"subject": "GPU compute procurement",
"terms": {
"gpuType": "A100",
"quantity": 4,
"pricePerHour": 3.50,
"sla": { "uptimePercent": 99.9 }
},
"validUntil": "2026-03-07T16:00:00.000Z"
}ACCEPT
Accepts a proposal, commitment, or other actionable message.
| Field | Type | Required | Description |
|---|---|---|---|
referenceId | string | Yes | The proposalId or commitmentId being accepted |
acknowledgment | string | No | Human-readable acknowledgment text |
conditions | object | No | Conditions attached to the acceptance |
{
"referenceId": "prop_001",
"acknowledgment": "Terms accepted as proposed"
}REJECT
Declines a proposal or commitment with a reason and optional retry guidance.
| Field | Type | Required | Description |
|---|---|---|---|
referenceId | string | Yes | The proposalId or commitmentId being rejected |
reason | string | Yes | Human-readable explanation for the rejection |
code | string | No | Machine-readable rejection code (see Error Codes) |
retryable | boolean | No | Whether the sender SHOULD attempt a modified proposal |
{
"referenceId": "prop_001",
"reason": "Price exceeds our budget ceiling",
"code": "budget_exceeded",
"retryable": true
}COUNTER
Rejects the current proposal and offers an alternative in a single message.
| Field | Type | Required | Description |
|---|---|---|---|
referenceId | string | Yes | The proposalId being countered |
rejectionReason | string | Yes | Why the original proposal was not acceptable |
counterProposalId | string | Yes | Unique identifier for the counter-proposal |
subject | string | Yes | Description of the counter-proposal |
terms | object | Yes | The alternative terms being offered |
validUntil | string (ISO 8601) | No | Expiration timestamp for the counter-proposal |
final | boolean | No | If true, this is a take-it-or-leave-it offer |
{
"referenceId": "prop_001",
"rejectionReason": "A100 costs are higher at current demand levels",
"counterProposalId": "prop_002",
"subject": "Revised GPU compute terms",
"terms": {
"gpuType": "A100",
"quantity": 4,
"pricePerHour": 4.00,
"sla": { "uptimePercent": 99.95 }
},
"final": true
}INFORM
Shares information, status updates, results, or errors.
| Field | Type | Required | Description |
|---|---|---|---|
informType | string | Yes | One of: status, progress, identity, fact, result, error |
subject | string | Yes | What the information is about |
data | object | Yes | The information payload (structure varies by informType) |
references | array of string | No | Message IDs or external references this information relates to |
{
"informType": "progress",
"subject": "GPU provisioning",
"data": {
"stage": "allocating",
"percentComplete": 60,
"details": "3 of 4 A100 instances allocated"
}
}QUERY
Requests specific information from another agent.
| Field | Type | Required | Description |
|---|---|---|---|
queryId | string | Yes | Unique identifier for this query |
subject | string | Yes | What is being queried |
queryType | string | Yes | One of: status, capability, price, availability, compliance, custom |
parameters | object | No | Query parameters (structure varies by queryType) |
responseSchema | object | No | JSON Schema describing the expected response format |
{
"queryId": "qry_001",
"subject": "A100 GPU availability",
"queryType": "availability",
"parameters": {
"gpuType": "A100",
"region": "us-east-1",
"minQuantity": 4
}
}CLARIFY
Requests clarification on a previous message with structured questions.
| Field | Type | Required | Description |
|---|---|---|---|
referenceId | string | Yes | The message ID requiring clarification |
questions | array | Yes | List of clarification questions |
questions[].field | string | Yes | Which field or aspect needs clarification |
questions[].question | string | Yes | The clarification question |
questions[].suggestedOptions | array of string | No | Possible answers to guide the response |
{
"referenceId": "prop_001",
"questions": [
{
"field": "terms.sla",
"question": "Does the 99.9% uptime SLA include scheduled maintenance windows?",
"suggestedOptions": ["yes", "no", "maintenance windows excluded"]
}
]
}COMMIT
Creates a binding commitment between participants.
| Field | Type | Required | Description |
|---|---|---|---|
commitmentId | string | Yes | Unique identifier for this commitment |
type | string | Yes | One of: agreement, action, resource-allocation, payment |
subject | string | Yes | Description of what is being committed to |
terms | object | Yes | The binding terms of the commitment |
obligations | object | No | Specific obligations for each party |
escrow | object | No | Escrow details: amount, currency, releaseCondition |
{
"commitmentId": "cmt_001",
"type": "resource-allocation",
"subject": "4x A100 GPU compute for 24 hours",
"terms": {
"gpuType": "A100",
"quantity": 4,
"durationHours": 24,
"pricePerHour": 3.75,
"totalCost": 360.00
},
"escrow": {
"amount": 360.00,
"currency": "USD",
"releaseCondition": "obligation-met"
}
}DELEGATE
Transfers responsibility or authority to another agent.
| Field | Type | Required | Description |
|---|---|---|---|
delegationId | string | Yes | Unique identifier for this delegation |
targetAgent | string | Yes | Agent URI receiving the delegation |
scope | object | Yes | What is being delegated (tasks, permissions, resources) |
context | object | No | Background information the delegate needs |
authority | string | Yes | One of: full, limited, advisory |
returnTo | string | No | Agent URI to return results to (defaults to sender) |
protocol | string | No | Sub-protocol the delegate SHOULD follow |
{
"delegationId": "del_001",
"targetAgent": "agent://verifyco.com/compliance/gamma",
"scope": "Verify SOC2 Type II certification for org:acme-industries",
"context": {
"claimedCertifications": ["SOC2-Type-II"],
"organization": "org:acme-industries"
},
"authority": "advisory",
"protocol": "asp"
}ESCALATE
Pauses the session and requests intervention from a higher authority or human.
| Field | Type | Required | Description |
|---|---|---|---|
escalationId | string | Yes | Unique identifier for this escalation |
reason | string | Yes | Why escalation is needed |
description | string | Yes | Detailed description of the situation |
urgency | string | Yes | One of: low, medium, high, critical |
context | object | No | Relevant context for the reviewer |
suggestedAction | string | No | What the escalating agent recommends |
timeout | integer | No | Seconds to wait before auto-resolving or failing |
{
"escalationId": "esc_001",
"reason": "Transaction exceeds autonomous approval threshold",
"description": "Commitment of $360.00 exceeds agent budget of $200.00",
"urgency": "medium",
"suggestedAction": "Approve the commitment or reduce the scope",
"timeout": 3600
}WITHDRAW
Retracts a previous message, optionally replacing it.
| Field | Type | Required | Description |
|---|---|---|---|
referenceId | string | Yes | The message ID being withdrawn |
reason | string | Yes | Why the message is being retracted |
replacementId | string | No | The message ID that replaces the withdrawn one |
{
"referenceId": "prop_001",
"reason": "Pricing data was outdated, revised proposal follows",
"replacementId": "prop_003"
}OBSERVE
Shares observations, patterns, or metrics without requiring action.
| Field | Type | Required | Description |
|---|---|---|---|
observationType | string | Yes | One of: pattern, metric, anomaly, learning, note |
subject | string | Yes | What is being observed |
data | object | Yes | The observation data |
confidence | number (0.0-1.0) | No | Confidence level in the observation |
visibility | string | No | One of: session, organization, public, private |
{
"observationType": "learning",
"subject": "Negotiation strategy for CloudPrime agents",
"data": {
"observation": "Opens at list price, concedes ~10% on counter",
"tags": ["negotiation-strategy", "gpu-provider"]
},
"confidence": 0.75,
"visibility": "private"
}CLOSE
Terminates the session.
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | Yes | One of: completed, timeout, failed, breach, mutual, unilateral |
summary | string | No | Human-readable summary of the session |
outcome | object | No | Structured outcome data (commitments fulfilled, results achieved) |
{
"reason": "completed",
"summary": "4x A100 GPUs provisioned successfully within deadline",
"outcome": {
"commitmentsFulfilled": ["cmt_001"],
"totalTransactionValue": 360.00,
"peerRating": 5
}
}Validation Rules
All ASP messages MUST conform to the following rules:
| Rule | Requirement |
|---|---|
| Required fields | All fields marked as required in the top-level schema MUST be present |
version | MUST match asp/{major}.{minor}. Current version: asp/0.1 |
messageId | MUST be a UUID v7 (time-ordered) |
timestamp | MUST be ISO 8601 format with Z suffix (UTC). Example: 2026-03-07T14:30:00.000Z |
sequenceNumber | MUST be a non-negative integer. Each sender maintains an independent sequence within a session, starting at 0 and incrementing by 1 |
performative | MUST be one of the 13 defined values |
sender.agentId | MUST match the pattern agent://{domain}/{path} |
integrity.hash | MUST be sha256: followed by the hex-encoded SHA-256 hash of the canonical content (sorted keys, no whitespace) |
integrity.previousHash | MUST match the integrity.hash of the previous message in the session. The first message MUST use sha256: followed by 64 hex zeros |
integrity.signature | MUST be ed25519: followed by the hex-encoded Ed25519 signature of the canonical fields |
Messages that fail validation MUST be rejected by the receiver. Implementations SHOULD respond with a REJECT performative including the appropriate error code.
Related
Was this page helpful?