x0 protocol
x0 is open infrastructure for autonomous agent commerce on Solana. Policy-enforced spending, conditional escrow, on-chain reputation, and HTTP 402 payment negotiation — so AI agents can transact safely at internet scale.
1import { X0Client, PolicyConfig } from "@x0protocol/sdk";2import { Connection, Keypair } from "@solana/web3.js";34// Initialize client5const client = new X0Client(6 new Connection("https://api.devnet.solana.com"),7 yourWallet8);910// Create agent with spending policy11const policy: PolicyConfig = {12 maxAmount: 100_000_000, // 100 USDC13 allowedDomains: ["api.openai.com"],14 expiresAt: Date.now() + 86400000, // 24hr15};1617const agent = await client.createAgent(policy);1819// Agent makes HTTP 402 payment automatically20const response = await agent.fetch(21 "https://api.openai.com/v1/chat/completions",22 {23 method: "POST",24 body: JSON.stringify({25 model: "gpt-4",26 messages: [{ role: "user", content: "Hello!" }]27 })28 }29);3031console.log(await response.json());7
On-Chain Programs
402
HTTP Status Code
<1s
Payment Finality
0.8%
Protocol Fee
What's x0?
Agent payments are fundamentally broken. LLMs hold raw private keys with unlimited spending power. There are no enforceable limits, no escrow guarantees, no reputation signals. x0 fixes this with on-chain policy enforcement, conditional escrow, and reputation-weighted trust — built natively for autonomous agents on Solana.
Solana-native. Built for agents.
Seven modular programs enforcing policy, escrow, and reputation at the protocol level — no middleware, no off-chain trust.