Definition
Circuit Breaker
A circuit breaker stops an agent stuck in a loop from burning tokens: a tool errors, the agent retries, same error, twenty iterations later the user is staring at a spinner. The book's defaults are three retries per tool call, ten tool calls per turn, twenty LLM calls per conversation, and breaking if the same tool is called twice with identical arguments. Pair them with token budgets.
Explained in
Chapter 13: Production AI: Deployment, Monitoring, and Evaluation
The reality of running AI agents. It's nothing like the demo.
Related terms