Hasty Briefsbeta

Bilingual

Show HN: AI Circuit Breaker – Reverse proxy to stop agent infinite loops

14 hours ago
  • Circuit Breaker is a drop-in reverse proxy that catches infinite tool loops and enforces hard spend caps on API usage.
  • It operates with sub-35ms overhead and zero payload retention, ensuring low latency and privacy.
  • Loop detection uses prompt hash matching and a sliding deque; it blocks after three repeated attempts, stopping runaway agents.
  • Spend caps are enforced against hourly and daily account budgets before requests are forwarded upstream.
  • In a simulated failure scenario, it prevented a $680+ cost overrun caused by an agent retrying a SQL write at 120 attempts per minute.
  • The system is built in Python and FastAPI by Roan de Jager in Norway.