What is x0?
x0 is a suite of eight interoperating Solana programs and a TypeScript SDK that enables autonomous AI agents to transact with programmable guardrails. Every transfer is policy-enforced at the Token-2022 level via transfer hooks, ensuring agents can never exceed their configured spend limits — even if their signing keys are compromised. The protocol employs the HTTP 402 Payment Required flow for machine-to-machine commerce: an agent discovers a service, negotiates price on-chain, pays via policy-gated transfer, and receives a cryptographic receipt — all without human intervention.Protocol Specifications
Deep technical reference for all eight on-chain programs, state accounts, instructions, and cryptographic primitives.
SDK for Developers
TypeScript SDK with instruction builders, PDA derivation, Blink generation, x402 helpers, and confidential transfer support.
Security Analysis
Threat model, attack vector mitigations, formal invariants, and audit status.
Architecture at a Glance
The protocol consists of three layers:Policy Enforcement Layer
x0-guard acts as a Token-2022 transfer hook. Every token transfer is intercepted and validated against the agent’s
AgentPolicy — checking daily spend limits, rolling window budgets, whitelist membership, and privacy mode. Transfers that violate policy are rejected at the Solana runtime level.Service Layer
x0-escrow, x0-registry, x0-reputation, and x0-wrapper provide the transactional infrastructure: conditional escrow with dispute resolution, agent discovery with capability metadata, on-chain reputation scoring, and a 1:1 USDC-backed stablecoin wrapper (x0-USD) with timelocked governance.
Program Map
| Program | Address | Purpose |
|---|---|---|
| x0-guard | 2uYGW3fQUGfhrwVbkupdasXBpRPfGYBGTLUdaPTXU9vP | Policy enforcement via transfer hook |
| x0-token | EHHTCSyGkmnsBhGsvCmLzKgcSxtsN31ScrfiwcCbjHci | Token-2022 mint with transfer fees + confidential transfers |
| x0-escrow | AhaDyVm8LBxpUwFdArA37LnHvNx6cNWe3KAiy8zGqhHF | Conditional escrow with dispute resolution |
| x0-registry | Bebty49EPhFoANKDw7TqLQ2bX61ackNav5iNkj36eVJo | Agent discovery and capability registry |
| x0-reputation | FfzkTWRGAJQPDePbujZdEhKHqC1UpqvDrpv4TEiWpx6y | On-chain reputation oracle |
| x0-wrapper | EomiXBbg94Smu4ipDoJtuguazcd1KjLFDFJt2fCabvJ8 | USDC → x0-USD 1:1 wrapper with governance |
| x0-zk-verifier | zQWSrznKgcK8aHA4ry7xbSCdP36FqgUHj766YM3pwre | On-chain zero-knowledge proof verification |
| x0-common | (library) | Shared constants, errors, events, state types |
Read the Whitepaper
Full formal specification with mathematical proofs, security analysis, and protocol economics.