Skip to content
Backstop
Esc
↑↓navigate↵open⌘Jpreview
On this page

Documentation

Backstop puts budgets, a circuit breaker and concurrency limits on AI agents, in the process that calls them.

The library is also a set of ideas worth understanding, whether or not you install it: what a hard limit actually is, what a circuit breaker is for, why a queue is better than a rejection, and how much a guardrail is allowed to cost.

Start here

If you want to Read
Stop a runaway agent in the next ten minutes Quickstart
Install it, including air-gapped Installing Backstop
See what it does before you install it The built-in dashboard
Understand how it fits together Architecture

How it works

  • Architecture — the transport, the gate and the ledger, and why the request path looks the way it does.
  • Dollar budgets — a ceiling in money, priced from the model you actually call.
  • The spend ledger — one priced, attributed record per completed request, and the charge-back export built on it.
  • Runaway-spend detection — four detectors that notice a spend pattern before it becomes an invoice.
  • Concurrency and scale limits — how many requests can be in flight, and what happens when there are more than that.

Reference

Operations

  • The built-in dashboard — a dependency-free view of the process you are already running.
  • Budget alerts — telling someone before the ceiling, not after.
  • Benchmarks — how the overhead numbers are measured, and the conditions they were measured under.
  • Benchmark results — the current committed snapshot.
  • Threat model — what Backstop trusts, what it does not, and where its limits are.

The short version

pip install backstop-ai
backstop verify

verify runs a real wrap against a local mock transport, blocks a runaway loop, and prints what it measured. No API key, no network, about thirty seconds.

Was this page helpful?