Moat holds USDG for your AI agent and checks every payment against your rules: a daily budget, a max per call, a list of allowed APIs and an off switch. The agent pays for what it needs. Never more.
Change the limits on the left, then make the agent pay for things on the right. Try an expensive call, an API that isn't on the list, or an agent stuck in a loop.
Put USDG into your Moat. It's yours: top up or take it out at any time.
Daily budget, max per call, the APIs the agent may pay, and an off switch.
The agent gets a spending key that can only pay through Moat. It can't send money anywhere else.
When an API answers with a 402, Moat checks the rules first. Pass: it pays. Fail: it refuses.
A hard limit per day. When it's used up, payments stop until tomorrow.
One payment can't be bigger than your cap. A surprise $40 call is refused.
The agent can only pay hosts on your list. Anything new needs your OK.
Pause all spending with one click. The agent keeps running, the money doesn't.
Get a message when the agent reaches 80% of its budget or gets blocked.
Every payment and every refusal, with the amount, the API and the transaction.
Write the rules, then point your agent's payments at Moat. Works with any x402 API.
moat.yaml
agent: research-agent budget: per_day: 5.00 USDG per_call: 0.25 USDG allow: - weather.example - prices.example - summarize.example alerts: at: 80% to: telegram
agent.js
import { moat } from "moat" // the key can only pay through Moat const pay = moat(process.env.MOAT_KEY) const res = await pay.fetch( "https://weather.example/now?city=Lisbon" ) // 402 → Moat checks rules → pays 2¢ → 200 OK // over a limit → refused, nothing paid
No. Its key can only make payments through Moat, and only inside your rules. It can't withdraw or send money to its own address.
Whoever has it can still only spend inside your rules, on your allowed APIs. Pause or replace the key with one click.
Yes, any time. Only you can withdraw from your Moat.
No. Payments go through x402: the agent's key signs a USDG transfer and the facilitator pays gas.
Any API that takes x402 payments in USDG on Robinhood Chain, including APIs behind a pay gate or from a paid-API directory.
No. Moat works with USDG only.
Your agent pays for what it needs, and not a cent more.