axp-spec

April 11, 2026 · View on GitHub

Normative source of truth for all AXP protocol and public API contracts.

Alpha License

axme · Docs · Conformance


AXP is the open wire protocol behind AXME. This repo defines the normative contracts - everything else (runtime, SDKs, conformance suite) derives from or validates against these schemas.


What Lives Here

axp-spec/
├── schemas/
│   ├── protocol/              # AXP wire protocol definitions (envelope, frames, versioning)
│   └── public_api/            # Public REST API contracts (request/response/error schemas)
├── docs/
│   ├── diagrams/              # Schema-level visualizations
│   ├── ADR-001-protocol-name.md
│   ├── ADR-004-synapse-no-modification-policy.md
│   ├── ADR-005-matrix-transport-e2ee-rollout.md
│   ├── ADR-006-intent-lifecycle-v1.md
│   ├── idempotency-correlation-rules.md
│   ├── intent-lifecycle-v1.md
│   ├── protocol-error-status-model.md
│   ├── public-api-schema-index.md
│   └── schema-versioning-rules.md
└── scripts/
    └── validate_schemas.py

Note on ADRs: ADR-001, ADR-004 through ADR-006 live here. ADR-002 (service boundaries) and ADR-003 (trust/consent model) are hosted in axme-docs as they span the full platform rather than schema contracts specifically.


Intent Lifecycle

Every intent follows a durable lifecycle with explicit states:

CREATED -> ACCEPTED -> PROCESSING -> COMPLETED
                          |
                          v
                       WAITING (human / agent / time / tool)
                          |
                          v
                       PROCESSING -> COMPLETED
                                        |
                                     FAILED
  • CREATED - intent submitted, validated, persisted
  • ACCEPTED - routed to handler agent
  • PROCESSING - agent is working on it
  • WAITING - paused for human approval, timeout, external signal, or sub-intent
  • COMPLETED - terminal success with result
  • FAILED - terminal failure with error

Waiting states are first-class. An intent can wait for hours or days and resume exactly where it left off.


Delivery Bindings

Five ways to deliver an intent to an agent:

BindingHow it worksUse case
streamSSE persistent connection - agent stays connected, intents pushed in real-timeLow-latency, always-on agents
pollAgent pulls on its own schedule via GET /v1/intents?status=pendingBatch processing, cron jobs
httpPlatform pushes to agent's URL (webhook with HMAC signature)Serverless functions, existing APIs
inboxHuman-facing task queue - tasks appear in CLI (axme tasks list) or emailHuman-in-the-loop workflows
internalRuns inside the platform runtime - no external agent neededTimeouts, reminders, approvals

Runtime Steps

Internal steps (no agent needed)

These run inside the AXME runtime without any external agent:

StepWhat it does
human_approvalPause workflow, wait for human to approve/reject via CLI, email magic link, or web form
timeoutFail the intent if not completed within a deadline
reminderSend a reminder after N seconds of waiting
delayPause workflow for a fixed duration before continuing
escalationChain of reminders with increasing urgency
notificationSend a one-way notification (email, webhook) without waiting

Human task types

Eight structured task types for human-in-the-loop workflows:

TypePurpose
approvalYes/no gate - deploys, budgets, agent actions
formStructured input with required fields - config, onboarding data
reviewApprove, request changes, or reject with comments - code review, document sign-off
overrideBypass a policy gate with mandatory justification (audit-logged)
confirmationConfirm a real-world action was completed - deployment verified, payment sent
assignmentRoute work to a person or team with structured fields
clarificationRequest missing context - comment required before proceeding
manual_actionComplete a physical task and attach evidence - hardware swap, site inspection

ScenarioBundle

The simplest way to run a workflow - one JSON file:

{
  "agents": [{"address": "my-service", "delivery_mode": "stream"}],
  "workflow": {"steps": [{"step_id": "process", "assigned_to": "my-service"}]},
  "intent": {"type": "task.v1", "payload": {"data": "..."}}
}
axme scenarios apply scenario.json --watch

This provisions agents, compiles the workflow, submits the intent, and streams lifecycle events - all in one command.


Protocol Envelope

The AXP envelope wraps every intent. It carries the payload, sender identity, schema version, idempotency key, and a cryptographic signature applied at the gateway boundary.

AXP Protocol Envelope

Each field in the envelope is normatively defined here. The runtime and all SDKs must conform to these field names, types, and validation rules.


RepositoryRelationship
axme-docsDerives OpenAPI artifacts and narrative docs from these schemas
axme-conformanceValidates runtime and SDK behavior against these contracts
Control-plane runtime (private)Runtime implementation must conform to schemas defined here
axme-sdk-pythonPython client - API surface derived from these contracts
axme-sdk-typescriptTypeScript client
axme-sdk-goGo client
axme-sdk-javaJava client
axme-sdk-dotnet.NET client

Schema Governance (for contributors)

Schema Versioning and Deprecation

Schemas follow a three-phase lifecycle: stable -> deprecated -> removed. Breaking changes require a new major schema version. Additive changes are backward-compatible.

Versioning and Deprecation Flow

A schema version enters deprecation with a minimum 90-day notice period. Clients targeting a deprecated version receive Deprecation response headers. Removal is announced in the migration guide.

Schema Governance and Compatibility

All schema changes go through a governance review before landing. The compatibility matrix ensures no existing consumer breaks across patch and minor versions.

Schema Governance and Compatibility

Governance steps: proposal -> impact analysis -> compatibility check -> reviewer sign-off -> merge -> changelog entry -> docs sync.

Intent Payload Extensibility

Intent schemas are typed by intent_type. The payload field is a structured JSON object defined per type - not a free-form blob.

Intent Payload Extensibility and Semantic Schemas

Public API Error Model

All error responses follow a uniform model: HTTP status + machine-readable error code + retriability hint.

Public API Error Model and Retriability

Integration Rule

A contract family is considered complete only when it is aligned across all five layers:

  1. axp-spec - normative schema definition (this repo)
  2. axme-docs - OpenAPI artifact and narrative documentation
  3. SDK clients - implemented and tested method in each of the five SDKs
  4. axme-conformance - conformance check covering the contract
  5. Runtime - axme-control-plane behavior matches the schema

Validation

python -m pip install -e ".[dev]"
python scripts/validate_schemas.py
pytest

Contributing

  • Schema proposals and breaking-change requests: open an issue with label schema-proposal
  • Contribution guidelines: CONTRIBUTING.md

contact@axme.ai · @axme_ai · Security · License