Financial circuit breaker for AI agents
$4,200

One agent. One loop. One weekend. No cap.

Set a cap.
Never see a bill
like this.

A drop-in LLM proxy with a hard, atomic per-run budget cap. Set $0.10 or $50: the first call that would exceed it gets a 402. The loop dies. The bill stops. No code changes required.

1,000 runs / month free  •  no credit card required.

agent.py  ·  loop-001
Live demo

See the cap enforce. Live.

Live calls to the Anthropic API, real enforcement. Not a staged demo. A rogue agent hits the cap and dies, then 50 parallel sub-agents share one budget with zero overspend.

Burnbreaker is a safety tool, not a guarantee.

Integration

Your existing SDK.
Two new headers.

Point your Anthropic or OpenAI client at the Burnbreaker endpoint. Add X-Gateway-Key and X-Budget-Cap. Every call on that run is pre-checked before the request reaches the provider.

No SDK wrappers. No instrumentation. No infrastructure to manage. If you can set an HTTP header, you’re protected.

anthropic
openai
import anthropic client = anthropic.Anthropic( base_url="https://burnbreaker.com", api_key="sk-ant-...", # forwarded, never stored ) message = client.messages.create( model="claude-sonnet-4-6", max_tokens=1024, messages=[{"role": "user", "content": "..."}], extra_headers={ "X-Gateway-Key": "gw_...", # from API Keys page "X-Budget-Cap": "0.10", # hard cap in USD "X-Run-Id": "agent-run-001",# unique per run }, )
Shared budget  •  atomic reserve
AGENT #01
$0.18 reserved
AGENT #02
$0.18 reserved
AGENT #03
$0.18 reserved
AGENT #04
$0.18 reserved
AGENT #05
$0.18 reserved
AGENT #06
$0.18 × BLOCKED
Shared budget  •  $1.00
committed$0.72
reserved$0.18
remaining$0.10
agent #06 needs$0.18, blocked
Concurrency safety

50 sub-agents.
One atomic budget.
Zero overspend.

When your orchestrator fans out to 50 parallel agents, a naive counter lets them all read “budget available” at the same instant and collectively spend 50× what you allowed.

Burnbreaker uses an atomic Redis Lua script to reserve budget before the provider call, not tally after. The first agent to exhaust the cap is blocked; all others proceed within their reserved slices. The cap is a hard ceiling, not a guideline.

Burnbreaker is a safety tool, not a guarantee.

The race condition

“Just track spend in Redis” doesn’t work.

A concurrent read-then-write is a TOCTOU race. All agents read the same balance, all pass the check, all commit, leaving you far over cap before any single call completes. Burnbreaker closes the gap with a single atomic operation: check and reserve happen as one indivisible step.

✗  Naive: TOCTOU race
# All 50 agents read $0.00 at t=0 spent = await redis.get(run_id) # $0.00 cost = estimate(request) # $0.50 if spent + cost > cap: # 0.00+0.50 < 1.00 ✓ raise BudgetError() # ← 49 others pass the same check await redis.incrbyfloat(run_id, cost) # 50 commits → actual spend: $25.00 🔥
✓  Burnbreaker: atomic Lua
# Reserve and check are one operation SCRIPT = """ local s = tonumber( redis.call('GET', KEYS[1]) or 0) local c, cap = ARGV[1], ARGV[2] if s + c > cap then return -1 end return redis.call( 'INCRBYFLOAT', KEYS[1], c) """ result = await redis.eval( SCRIPT, 1, run_id, cost, cap) if result == -1: raise BudgetExceeded() # 402 pre-call
Pro: Smart Control

When budget pressure builds,
downgrade. Don’t die.

Pro accounts get three additional controls that fire transparently between the gateway and your provider. No agent code changes required.

Model Downgrade
Once committed spend crosses a threshold (e.g. 80% of cap), Burnbreaker silently rewrites the request to a cheaper fallback model. The run continues at reduced cost instead of hitting a hard stop.
X-Fallback-Model: claude-haiku-4-5-20251001 X-Downgrade-Threshold: 0.8
CALLS 1–16 claude-sonnet-4-6 $0.018/call
── 80% of budget reached ──
CALLS 17+ claude-haiku-4-5 $0.0008/call
Kill Rules
Set a maximum call count or error streak. If either threshold is crossed, Burnbreaker returns 402 before the next call fires, stopping runaway loops and retry spirals before they compound.
X-Max-Calls: 20 X-Max-Errors: 3
Webhook Alerts
Burnbreaker POSTs a structured JSON payload to your endpoint whenever a run hits its cap, a model downgrade fires, or a kill rule triggers. Wire it into PagerDuty, Slack, or your own pipeline.
X-Alert-Webhook: https://your.app/hook
Pricing

Simple. No usage fees.

Flat monthly rate. Your LLM costs go directly to Anthropic or OpenAI. Burnbreaker never touches or marks up what you spend with providers.

Free
$0
/ month
Get started
  • Hard atomic budget cap per run
  • Concurrency-safe enforcement
  • Run tracking & spend dashboard
  • Anthropic & OpenAI support
  • 1,000 runs / month
  • Model downgrade
  • Kill rules
  • Webhook alerts
Pro
$29
/ month
Start Pro
  • Everything in Free
  • Unlimited runs / month
  • Model downgrade on budget pressure
  • Custom kill rules (calls & error streak)
  • Webhook alerts on any event
  • Priority support

Your token costs flow directly to your Anthropic or OpenAI account. Burnbreaker only meters usage and enforces caps. We never route, hold, or mark up what you spend with providers.

Burnbreaker is a safety tool, not a guarantee. You remain responsible for monitoring your own provider spend.