Agentic API Economy
Machine-to-Machine Micropayments for AI Agents
A full-stack agentic economy demo that makes machine-to-machine micropayments feel like a conversation — type a request, and an agent plans, pays and answers autonomously.

- lablab.ai — Agent Builder track
- Hackathon
- The Internet of Agents
- Track
Demo
A natural-language request planned, paid for via Circle Gateway and x402, and answered — with the full execution trace visible.
Problem
Traditional on-chain gas fees (~$0.005/tx) would consume 40%+ of a sub-cent API call, which makes per-action pricing economically impossible. Without a way to make each nanopayment cheap enough, AI agents can't pay for API access one call at a time — they're stuck with flat subscriptions instead of paying only for what they use.
Why I built it
Nanopayments are the only viable pricing model for per-action AI commerce, and I wanted to prove it end to end rather than argue it in the abstract. Built this at the second lablab.ai hackathon I took part in, on the Agent Builder / Internet of Agents track.
What I built
A user types a natural-language request — "get the latest tweets from @elonmusk" or "compare ETH and BTC this week" — and the system does the rest autonomously: an LLM planner routes the request to the right paid API skill, OmniClaw's policy engine enforces spending guards (budget, rate limit, recipient allowlist), the selected endpoint is inspected for its x402 payment requirements, Circle Gateway signs an EIP-3009 off-chain authorization and settles the nanopayment on Arc, and the raw API response is streamed back through an LLM that formats it into a clean, readable answer. Every step is visualised in a real-time execution trace in the UI. Circle Gateway batches EIP-3009 authorizations into amortised on-chain settlements, cutting effective per-payment overhead to under $0.0001 and unlocking genuine per-query pricing at scale. Skills supported at launch: Twitter Autopilot, Multi-Source Search, YouTube SERP, Crypto Market Data, Prediction Markets, and MarketPulse — all monetised at the API level via x402 on Arc Testnet.
How it works
- User types a natural-language request
- LLM planner routes it to the right paid API skill
- OmniClaw's policy engine enforces spending guards — budget, rate limit, recipient allowlist
- Endpoint inspected for its x402 payment requirements
- Circle Gateway signs an EIP-3009 off-chain authorization
- Nanopayment settles on Arc
- Raw API response streamed back through an LLM and formatted into a clean answer
What I did
- Built with a teammate at the lablab.ai Agent Builder hackathon
- Payment policy and nanopayment integration — OmniClaw, Circle Gateway, x402, Arc
- Real-time execution trace UI
Technology
- Next.js 15
- React
- TypeScript
- TailwindCSS
- shadcn/ui
- Featherless
- Qwen3
- OmniClaw
- Circle Gateway
- x402
- Arc
- EIP-3009
Challenges
Making per-action pricing real, not just plausible. Gas fees alone would eat almost half of a sub-cent API call, so the whole design has to route through Circle Gateway's batched EIP-3009 authorizations instead of naive per-call settlement, or the economics never work.
What I learned
The interesting part isn't the LLM planning — it's the payment layer underneath it. Per-action AI commerce lives or dies on whether the settlement cost is negligible next to the price of the action itself.