Budget Governor

Hard spend cap for autonomous AI agents — one call, before the LLM request.

Stop runaway billing before it starts. Set a $5/day cap per agent, get approved or denied in one MCP call.

Live  ·  Base mainnet
Top up credits →

Credit packs

Pay with USDC on Base mainnet. Credits added immediately after on-chain verification.

MCP Tools

budget_clear(agent_id, model, estimated_tokens)
Approve or deny a spend request. Deducts estimated cost from the agent's envelope.
set_envelope(agent_id, limit_usd, window?)
Create or update an agent's daily or session spend cap.
get_balance()
Return the current account credit balance in USD.

Quick start

# 1. Provision an account
curl -X POST https://budget-governor.billowing-glade-3692.workers.dev/v1/account
# → { "api_key": "bg_...", "account_id": "..." }

# 2. Top up credits — open in your browser

https://budget-governor.billowing-glade-3692.workers.dev/pay/starter?api_key=bg_YOUR_KEY
# 3. Set an envelope for your agent
curl -X PUT \
  -H "Authorization: Bearer bg_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"my-agent","limit_usd":5,"window":"daily"}' \
  https://budget-governor.billowing-glade-3692.workers.dev/v1/budget/envelope

# 4. Call before each LLM request
curl -X POST \
  -H "Authorization: Bearer bg_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"my-agent","model":"claude-sonnet-4-6","estimated_tokens":2000}' \
  https://budget-governor.billowing-glade-3692.workers.dev/v1/budget/clear

Model pricing

claude-opus-4-7      $15.00 / $75.00  per M tokens (in / out)
claude-sonnet-4-6     $3.00 / $15.00
claude-haiku-4-5      $0.80 /  $4.00
gpt-4o                $2.50 / $10.00
gpt-4o-mini           $0.15 /  $0.60
gemini-1-5-pro        $1.25 /  $3.50
(unknown model)      $15.00 / $15.00  conservative default

budget_clear deducts estimated output cost. Unused tokens are not charged.