Developers · Architecture
The architecture, in four parts.
The gateway decides, the records are linked, anchors can sit outside the operator’s control, and anyone can check the receipt. Each part has its own page, and the specification holds the normative text.
Follow a request
Five layers between a caller and a model.
Requests enter a hardened edge, pass an enforcement core, reach one guarded execution layer, and emit evidence on the way out. Choose a scenario and press Play, or select any component.
Use the arrow keys to move between components, Enter to open the details of one, and Escape to close them.
Callers
Gateway edge
Enforcement core
Execution
Trust and evidence
Foundation
A permitted request: every check passes, the provider is called and the evidence is written.
- 01Gateway edge
- 02Request validation
- 03Artifact verification
- 04Replay and anomaly
- 05Tenant and identity
- 06Consent and policy
- 07Semantic and DLP
- 08Intent evidence
- 09Provider call
- 10Output inspection
- 11Decision evidence
- 12Response
Read as a list
The same structure as the diagram: five layers between a caller and a model, the foundation under them, and the four scenarios step by step.
Callers
- Applications (stage 12) 3 related functions
- AI-enabled services 3 related functions
- SDK clients: JS · Python · Go · Java 53 related functions
- Operators: console · admin API · SSO 32 related functions
- Agents and tools: signed action requests 7 related functions
Gateway edge
- Hardened HTTP edge: Security headers · CORS, Proxy and host validation, Request ID · client IP, Kill switch, Admission control, Rate limiting · lockout, Strict body validation, Idempotency keys, Graceful shutdown drain, Health and metrics probes (stage 01, 02) 20 related functions
Enforcement core
- Artifact and replay: Signature · expiry · binding, One-time nonce (stage 03, 04) 14 related functions
- Identity and tenancy: RBAC · SSO · MFA · tenants (stage 05) 20 related functions
- Consent and policy: 11 rule types · tenant floor (stage 06) 34 related functions
- Semantic inspection: Rule engine + embedding gates (stage 07, 10) 55 related functions
- DLP and content rules: Redact · mask · block (stage 07, 10) 5 related functions
Execution
- Execution layer: Execution invariant, Token-bound dispatch (stage 09) 14 related functions
- Provider router: OpenAI · Anthropic · Gemini, Mistral · Azure OpenAI, Bedrock · Llama · Local, Breaker · retry · failover (stage 09) 24 related functions
- Action and tool gateway: Action artifacts, Approvals · delegations, MCP servers (HTTPS) 15 related functions
Trust and evidence
- Signing and keys: Ed25519 · KMS / HSM option (stage 11) 32 related functions
- Audit chain: Hash-chained · checkpoints (stage 08, 11) 19 related functions
- Evidence ledger: Packages and bundles 6 related functions
- Transparency log: Merkle roots · proofs (stage 08, 11) 11 related functions
Foundation
- State: PostgreSQL · row-level tenant isolation, Redis · replay, limits, revocation, File stores · keys, policies, audit log 76 related functions
- Key custody: Local · Vault · AWS · Azure, Google Cloud · PKCS#11 HSM 9 related functions
- Observability: Logs · metrics · traces, Health · alerts · dashboards 98 related functions
- Offline verification: Standalone verifiers · SDK helpers, Published public key sets 10 related functions
Follow a request
Allowed
- A scoped identity obtains a signed artifact and sends the request with it.
- Gateway edge: kill switch, rate limit and admission control, then strict schema, size and content-type checks.
- Artifact verified: signature, expiry, request binding and revocation, then a one-time nonce and burst check in one atomic step.
- Tenant, organisation and signing identity are still active.
- Consent is active and the rules pass, in priority order.
- Inspection: the prompt is screened and an email address is redacted.
- Intent evidence: the intent is written to the audit chain and the transparency log before the provider is called.
- Provider call: an execution token is minted and the router dispatches, with retry and failover.
- Output inspection: size cap, semantic check and DLP on the response, then it is released.
- Decision evidence: an audit entry, a transparency leaf and a signed receipt.
- Response: EXECUTE returns with artifact, key and proof references, and an optional signed receipt.
Refused
- The same request arrives, now with an injected instruction in the prompt.
- Gateway edge: kill switch, rate limit and admission control, then strict schema, size and content-type checks.
- Artifact verified: signature, expiry, request binding and revocation, then a one-time nonce and burst check in one atomic step.
- Tenant, organisation and signing identity are still active.
- Consent and policy pass.
- Inspection finds the injected instruction. BLOCK: this is the deciding gate, and nothing goes on to the provider.
- The refusal is still recorded: a block entry and a transparency leaf are written, so it can be verified later.
- A BLOCK with a reason code is returned. The provider was never called.
Refusals at the enforcement stages leave a block entry and a transparency leaf. Pre-authentication rejects are never audited (catalogue API-013).
Streaming
- A streaming request is sent with its signed artifact.
- Stages 01 to 07 run as for any request: edge, artifact, tenant and identity, consent and policy, then inspection.
- Intent evidence is written before the provider is called.
- Provider call: the router dispatches the streaming request.
- Streaming requests release checked output in batches: each batch is checked before it goes on, and no unchecked byte is released.
- When the stream ends, the audit entry and the transparency leaf are written.
Agent action
- An agent sends a signed action request.
- The request enters through the hardened HTTP edge.
- Action and tool gateway: approvals and delegations are checked and a signed action artifact is issued. Delegation only narrows.
- The tool is called through the MCP gateway: HTTPS JSON-RPC with a pinned server identity.
- Executed once: each action artifact is one-shot and its hash is recomputed before the tool runs.
- Recorded: ACTION_INTENT and COMMIT entries are written to the audit chain.
- EXECUTE returns to the agent with a receipt.
The twelve stages describe an AI chat request, so the progress rail stays idle for an agent action.
Where each part is explained.
This page links to the diagrams and documents that already exist. It adds nothing to them.
How it works
An interactive map of the execution boundary, drawn as dynamic diagrams.
Follow one requestGateway
What the open-source gateway does, how to run it, and its stated limits.
Open the gateway pageAnchors
How checkpoints can be anchored outside the operator’s control.
Open anchorsSpecification
The normative documents, including the Reference Architecture and the System Boundary and Trust Model.
Browse the specification