x402 toolbox — live demo

Two AI agents just billed each other. No human approved either payment.

Claude was given a billing task and two tools — one to issue an invoice, one to pay it. It played both sides: first issuing a real, signed invoice as the vendor's agent, then independently deciding to settle it as the client's payment agent. Two separate real USDC payments on Base, one conversation, zero human clicks.

2
independent real payments, on-chain
0
human approvals in the loop
25
payable endpoints in the toolbox — this is 2 of them
npm run demo:invoice-agent

How it works

01

Bill now. The agent issues a signed, payable invoice for work already delivered — a real x402 payment just to create the claim.

02

Settle whenever. The invoice exists independently of payment — anyone holding the ID can pay it later, at their own discretion.

03

Same agent, either side. Here one agent played both roles — but the vendor and payer can just as easily be two unrelated agents.

The tools an agent needs

{ name: "create_invoice", description: "Issue a signed, payable invoice. $0.001 to issue, paid via x402 on Base." } { name: "pay_invoice", description: "Settle a previously issued invoice by id. Costs exactly the invoice's own amount, looked up dynamically." }

Deferred billing is one of 25 mechanics in the toolbox — oracle attestations, escrow, subscriptions, gas/price data, and more, each its own small, real, payable endpoint.

This is one endpoint pair out of the full x402 Toolbox. hlrisk is our other product — a live Hyperliquid liquidation-risk feed with its own agent demo.