gvnr.dev
Agent runtime governance

Economic control for autonomous agents

gvnr enforces budgets and rate limits in real time — before the call, not after the invoice.

One MCP endpoint, settled in USDC on Base. Compose budget_clear → rate_check → idempotency_check → call LLM → reconcile before every provider request, or hand off to request_approval when an agent needs a human.

Read the docs
Real-time enforcementchecked before the call
USDC-nativex402 on Base
Built for MCP& any agent

Everything you need to govern agents

MCP Tools

Spend cap

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 remaining governance-operation quota (one budget_clear = one op).

Rate limits

set_rate_envelope(agent_id, provider, model, requests_per_minute)
Allocate a per-(agent, provider, model) rate share. Fixed 60-second windows.
rate_check(agent_id, provider, model)
Approve or deny based on the agent's rate envelope. Returns retry_after_ms on denial.

Reconciler

reconcile(agent_id, actual_input_tokens, actual_output_tokens)
After the LLM responds, apply the drift between estimated and actual cost. Keeps the envelope honest.

Idempotency

idempotency_check(key, ttl_seconds?)
Dedupe retries on a caller-supplied key. Returns is_first_call=true the first time, false on replays within TTL.

Approval bridge NEW

request_approval(agent_id, action_summary, ttl_seconds?, channels?)
Pause for a human in the loop. Returns approval_id + a mobile-friendly URL the human taps to approve or deny. Email today; Telegram + SMS forward-compat.
check_approval(approval_id)
Poll the decision: pending / approved / denied / timeout. Compose with budget_clear — denial → request_approval → resume.

How it composes

Setup · once per agent
set_envelope
set_rate_envelope
Runtime · every LLM call
budget_clear
rate_check
idempotency_check
your LLM call
reconcile
Branch · on denial
request_approval
human taps approve
check_approval
resume the call

Every tool draws from one operation quota. Same auth, same endpoint, no extra infra. Any tool can be added or removed without re-integrating.

Quick start

Pick a recipe. Each one is independent — you can layer them as your agent grows.

Recipe 1 · Provision + top up
Get an API key and add credits. Required once per account.
curl -X POST https://gvnr.dev/v1/account
# → { "api_key": "bg_...", "account_id": "..." }

Then open the pay page in your browser (replace the key):

https://gvnr.dev/pay?usd=1&api_key=bg_YOUR_KEY
Recipe 2 · Spend cap
Set a daily ceiling per agent, clear before each call, reconcile after. The core loop.
# Set the envelope (once)
curl -X PUT https://gvnr.dev/v1/budget/envelope \
  -H "Authorization: Bearer bg_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"my-agent","limit_usd":5,"window":"daily"}'

# Before each LLM call
curl -X POST https://gvnr.dev/v1/budget/clear \
  -H "Authorization: Bearer bg_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"my-agent","model":"claude-sonnet-4-6","estimated_tokens":2000}'

# After the LLM responds
curl -X POST https://gvnr.dev/v1/budget/reconcile \
  -H "Authorization: Bearer bg_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"my-agent","actual_input_tokens":1800,"actual_output_tokens":2400}'
Recipe 3 · Rate limits
Coordinate RPM across multiple agents sharing the same provider quota.
# Set the rate envelope (once)
curl -X PUT https://gvnr.dev/v1/rate/envelope \
  -H "Authorization: Bearer bg_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"my-agent","provider":"anthropic","model":"claude-sonnet-4-6","requests_per_minute":30}'

# Before each LLM call
curl -X POST https://gvnr.dev/v1/rate/check \
  -H "Authorization: Bearer bg_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"my-agent","provider":"anthropic","model":"claude-sonnet-4-6"}'
Recipe 4 · Idempotency
Dedupe retries on a caller-supplied key. is_first_call=true the first time, false on replays.
curl -X POST https://gvnr.dev/v1/idempotency/check \
  -H "Authorization: Bearer bg_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"key":"job-abc-123","ttl_seconds":3600}'
Recipe 5 · Human-in-the-loop
When budget_clear denies (or for any sensitive action), hand off to a human via a mobile-friendly approval URL.
# Set your notification email (once)
curl -X POST https://gvnr.dev/v1/account/notification-email \
  -H "Authorization: Bearer bg_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com"}'

# Request approval (returns approval_url)
curl -X POST https://gvnr.dev/v1/approval/request \
  -H "Authorization: Bearer bg_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"my-agent","action_summary":"Spend $42 on Opus extraction over 30 docs","ttl_seconds":600}'

# Poll for the decision
curl https://gvnr.dev/v1/approval/check/APPROVAL_ID \
  -H "Authorization: Bearer bg_YOUR_KEY"
# → { "decision": "pending" | "approved" | "denied" | "timeout", ... }

Model pricing

claude-opus-4-8           $5.00 /  $25.00  per M tokens (in / out)
claude-opus-4-7           $5.00 /  $25.00
claude-opus-4-6           $5.00 /  $25.00
claude-sonnet-4-6         $3.00 /  $15.00
claude-haiku-4-5          $1.00 /   $5.00
gpt-4o-mini               $0.15 /   $0.60
gpt-4o                    $2.50 /  $10.00
gpt-4-turbo              $10.00 /  $30.00

text-embedding-3-small    $0.02 / M   (input-only)
text-embedding-3-large    $0.13 / M   (input-only)
gemini-embedding-001      $0.15 / M   (input-only)
gemini-embedding-2        $0.20 / M   (input-only)

These are provider list rates — they set your per-agent spend cap (the envelope), not gvnr's charge. gvnr bills a flat governance fee per operation (see the packs above); your LLM tokens are billed by your provider directly. budget_clear estimates the cap debit (output tokens for chat models, input tokens for embedding/input-only models); reconcile trues it to actual. Unlisted models fall back to the highest rate (fail-safe). Updated May 2026.

Top up

Pay-as-you-go in USDC on Base — no minimum, no subscription.
Any amount credits governance ops at 1,000 per $1. Try the whole live rail for $1. Works with Base MCP, AgentKit, and any x402 client. $19 ≈ a few weeks of typical agent governance.

Pick an amount (or name your own on the pay page). Ops cover governance operations (budget_clear, rate_check, idempotency_check…); your LLM tokens are billed by your provider, not by gvnr. Credited after on-chain settlement.

>_
Start governing in minutes
Add gvnr to your agent stack via one MCP endpoint or the REST API. Open source, developer-first, no account to create — just an API key.
MCP card