A complete payment infrastructure stack designed from the ground up for autonomous AI agents
AI Agents autonomously discover and evaluate on-chain registered AI services by category, price, and reputation.
Inspired by HTTP 402, agents automatically detect payment requirements and complete on-chain settlement seamlessly.
Smart contract wallets with daily spending limits and granular permission controls for autonomous AI agents.
Flexible payment models including per-call, subscription plans, and escrow-based conditional settlements.
Inspired by HTTP 402 Payment Required — seamless machine-to-machine payments
const agent = new AgentXPayClient({ rpcUrl, privateKey });
// Agent discovers AI services on-chain
const services = await agent.discoverServices({ category: "llm" });
// x402 auto-payment: request → 402 → pay → retry → success
const response = await agent.fetch("https://ai-service.com/api/chat", {
method: "POST",
body: JSON.stringify({ prompt: "Analyze this data..." }),
autoPayment: true, // Automatically handles 402 responses
});
console.log(await response.json()); // AI response received!Five independent smart contracts working together to power the full agent payment lifecycle