Skip to main content
Circuit breakers prevent cascading failures by stopping calls to a failing service. When too many calls fail, the circuit “opens” and blocks further calls until the service recovers.

The Circuit Breaker Pattern

Basic Usage

Circuit States

Circuit Breaker Registry

Manage multiple circuit breakers:

Global Stop (Emergency)

Stop everything immediately:

Per-Agent Breakers

Different agents can have different breakers:

Monitoring Circuits

Handling Circuit Open

Integration with Workflow

Best Practices

Not just LLM providers - any external service can fail.
Too short = circuit never recovers. Too long = downtime persists. 30-60 seconds is a good starting point.
If circuits are opening frequently, investigate the root cause.
What happens when a circuit opens? Have a plan.