Detect Reasoning Loops
Before They Burn Your Budget
Runaway AI agents rapidly consume API credits through loops and inefficient retries.
Open-source detection system with 6 production detectors and 2 more in development - from embedding similarity and exact token repeats to information theory. Runs on Supabase free tier.
Real stories from the community:
Science Based Detection Methods
From embedding similarity and exact repeats to information theory
Semantic Similarity
Embedding-based cosine similarity. Catches paraphrased repetition and semantic attractors - circular reasoning in vector space.
Token Repeat
Exact repeated token spans, within a response and across steps. The verbatim loop Antidoom targets at training time, caught here at runtime.
Action Cycles
Detects when agents call the same tools repeatedly: search→search→search. Implements state machine reasoning's Stop signal.
N-gram Overlap
Fast text pattern matching using DeRep's 20-pattern repetition taxonomy. Catches repeated phrases before embeddings notice.
Compression (NCD)
Information-theoretic similarity via Normalized Compression Distance. Derived from Kolmogorov complexity - zero API cost.
Edit Distance Decay
Directly implements the Mirror Loop paper's delta_I metric. A 55% edit distance decline signals an agent converging on a fixed point.
CUSUM Drift
Cumulative embedding drift detection. 89% of Long-CoT failures show prefix-dominant deadlocks - CUSUM catches the trajectory early.
Entropy Collapse
Text-level vocabulary diversity monitoring. When output vocabulary collapses across steps, the loop has set in.
Verifier Models
GPT-4 audit for critical agents. Full semantic understanding as a last-resort check for high-stakes pipelines.
See It In Action
A real agent loop detected and halted in the terminal

Integrate in Minutes
Add loop detection to any agent in 3 lines of code
from inferencebrake import InferenceBrake
guard = InferenceBrake(api_key="ib_key")
for step in agent.run():
status = guard.check(step.reasoning, session_id="agent-1")
if status.should_stop:
print("Loop detected!")
breakSimple, usage-based pricing
Scale with the number of agent steps you monitor. Cancel anytime.
Free
5,000 checks/month. No credit card required.
- ✓ All 6 production detectors
- ✓ 7-day log retention
- ✓ Email support
Growth
100,000 checks/month for production agents.
- ✓ All 6 production detectors
- ✓ Slack + webhook alerts
- ✓ Est. dollars-saved dashboard
- ✓ 30-day log retention
Pro
500,000 checks/month and priority latency.
- ✓ All 6 production detectors
- ✓ Custom voting thresholds
- ✓ Priority API latency
- ✓ 90-day log retention