WeSearch

Show HN: Circuit Breaker – runtime cost ceilings for AI agents

·6 min read · 0 reactions · 0 comments · 12 views
#ai#technology#software
Show HN: Circuit Breaker – runtime cost ceilings for AI agents
⚡ TL;DR · AI summary

Circuit Breaker is a minimal wrapper designed to manage the execution of AI agents by enforcing runtime cost ceilings. It offers two modes: budget-guard, which caps token usage, and loop-killer, which detects repeated states. The tool is framework-agnostic and allows for easy integration with various AI frameworks.

Key facts
Original article
GitHub
Read full at GitHub →
Opening excerpt (first ~120 words) tap to expand

@monetisebg/circuit-breaker One wrapper between you and runaway execution. Minimal circuit breaker for AI agents. Wrap any supported agent and pick a mode — the breaker cuts the run short once provider-reported usage crosses a limit, and (optionally) refuses an oversized prompt before it is even sent. Zero-config: defaults work out of the box. Two modes, pick one: budget-guard (token caps) and loop-killer (state-repeat detection). Post-hoc enforcement by default: token tripping happens after each call or turn boundary, so the call that crosses the limit still counts. Use the optional estimateInputTokens preflight (see below) to reject oversized initial inputs before any provider work happens. Visible: emits CircuitBreakerEvents as the run progresses.

Excerpt limited to ~120 words for fair-use compliance. The full article is at GitHub.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from GitHub