# Why your agent needs it (/docs/why)



AI agents spend money on every step, and they don't stop on their own. A prompt tweak, a
flaky tool, or one abusive user can turn a normal feature into a bill you only notice once
it has already landed.

## A story you've probably lived [#a-story-youve-probably-lived]

You ship a support agent. It answers a question, calls a tool, reads the result, and calls
the model again to decide what to do next. Normal.

Then one conversation goes sideways. The tool returns something the agent doesn't expect, so
it retries. The retry doesn't help, so it reasons about it — another model call. It loops:
call, tool, call, tool, hundreds of times on a single thread. No error is thrown. Nothing
crashes. The agent is *working exactly as written* — it just never decides to stop.

You find out three days later, on the provider invoice.

## Why "watch it on a dashboard" isn't enough [#why-watch-it-on-a-dashboard-isnt-enough]

Cost dashboards and usage exports are all **after the fact**. By the time a chart turns red,
the tokens are bought and the money is gone. Rate limits help with volume, but they don't
know that *this user* is on the free tier, or that *this workflow* just cost 50× its normal
run.

<Callout type="warn">
  The failure mode isn't a bug you can catch in review. It's an agent behaving normally on
  an input you didn't anticipate — a loop, a retry storm, or a single account hammering an
  expensive path.
</Callout>

## What TokenPolice does instead [#what-tokenpolice-does-instead]

It sits in front of the provider call and checks it *first*. You set the limits that matter
to you — a per-user cap, a per-workflow budget, "stop after N identical steps" — and when a
call would cross one, TokenPolice can block it before the spend happens.

You don't have to trust it blindly, either: it starts in **dry-run**, where it watches and
records what it *would* have done, so you can flip on enforcement once the limits look right.

Next: go straight to [getting started](/docs/get-started/choose-your-path), or read what
leaves your servers on [Data & privacy](/docs/concepts/data-privacy).
