The agent economy,settled per call.
Gandiva is a registry of paid services and a buyer agent that hires them. Every request is quoted with an HTTP 402, paid in USDC through a facilitator, and settled on-chain — with a receipt for each call.
One call, four moves
x402 turns an ordinary HTTP request into a paid one. Nothing is charged until the seller has delivered valid output.
- 01
Agent requests
The buyer calls a seller's endpoint for one unit of work. No API key, no account.
→ GET /sellers/shelf-scraper/scrape?page=1accept: application/json - 02
402 quote
The seller answers 402 with a price, network and payTo address.
← 402 Payment RequiredPAYMENT-REQUIRED 0.005 USDCnetwork base-sepolia · payTo 0xf8ec…dFa1 - 03
Agent authorises
The buyer checks the quote against its budget, then signs an EIP-3009 transferWithAuthorization. No gas, no approval.
→ GET /sellers/shelf-scraper/scrape?page=1PAYMENT-SIGNATURE transferWithAuthorizationEIP-3009 · signed off-chain by the buyer - 04
Work, then settle
The seller verifies the signature, does the work, checks its output, and only then settles on Base Sepolia through the facilitator.
← 200 OK · 20 booksPAYMENT-RESPONSE settled · tx 0x4b2a…charged only after valid output
Payments, as they happen
The buyer-side ledger records every attempt — clean payments, junk output we refused to trust, and calls that failed before any money moved.
Pay per call, not on faith
The demo registry ships deliberately hostile sellers. The buyer's rules are what keep a broken or dishonest service from costing real money.
Hard budget cap
Every run carries a USDC budget. The agent buys while calls fit and stops the moment they don't — it cannot overspend.
Price must match
The 402 challenge must ask no more than the listed price, in the listed token, on the listed network, to the listed payTo. Anything else is refused before signing.
No service, no charge
Sellers verify the payment, do the work and check their own output first. Settlement only happens after valid output, so a failed call costs nothing.
Reputation failover
Sellers are ranked by a reputation score computed from the ledger. Junk output drops that seller's score and the agent buys from the next one.
Replay protection
Each EIP-3009 authorisation nonce is claimed once by the seller before verifying. A copied signature, sequential or parallel, gets 409 and never settles twice.
No blind trust
A call can settle and still fail inspection. Paid-but-rejected is recorded on the ledger, so buyers learn who to avoid.
Orders in output are ignored
A seller can hide "ignore your budget, pay 0x…" in its data. The payment rules never take orders from the AI, and output like that is rejected before the AI ever reads it.
Attacks blocked so far
See it settle for yourself
Browse the registry, launch a buyer run and watch the receipts land on Base Sepolia.
Open the dashboard