← all repositories
Floe-Labs/floe-guard

A Kill Switch for Runaway AI Agent Bills

It hard-stops LLM, voice, and tool calls before they cross a USD ceiling you set, so a runaway loop dies at $0.10 instead of $4,000.

513 stars Python LLMOps · EvalAgents
floe-guard
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

floe-guard sits in the call path and raises BudgetExceeded before the next LLM, voice turn, or tool call can cross a USD ceiling you set. It prices calls offline from a bundled cost map and meters the whole voice stack—STT, LLM, TTS, and telephony—not just the tokens. Drop-in adapters are provided for common frameworks including OpenAI, Anthropic, LangChain, Pipecat, LiveKit, and Vercel AI SDK in both Python and TypeScript.

The interesting bit

The enforcement is atomic: it uses reserve() and settle() so concurrent fan-outs via CrewAI, asyncio, or Promise.all can’t race past the same limit by reading an outdated total. It also fails closed—if a model isn’t in the bundled price list, it refuses the call rather than silently treating it as free. That is the boring part that actually matters.

Key highlights

  • Hard-stops calls before they run, not after the fact.
  • Offline pricing via a bundled, dated cost map; no network calls to a billing service.
  • Atomic budget reservations handle concurrent agent fan-out without overshoot.
  • Meters full voice call legs (STT, LLM, TTS, telephony), not just tokens.
  • No account, no telemetry, no network required; runs fully in-process.

Caveats

  • The bundled cost map is a dated snapshot of public list prices and drifts as vendors change rates.
  • Cross-process budget sharing is Python-only and requires a shared SQLite file with reliable file locking; isolated serverless instances will not coordinate.
  • Generic open-weight model names (e.g., qwen3-32b) remain unpriceable unless scoped to a vendor or given a manual price.

Verdict

Worth wiring in if you are shipping voice or text agents to production and sleep better knowing a runaway loop dies at ten cents instead of four grand. Skip it if you already have provider-side spend caps you trust, or if your agents never loop.

Frequently asked

What is Floe-Labs/floe-guard?
It hard-stops LLM, voice, and tool calls before they cross a USD ceiling you set, so a runaway loop dies at $0.10 instead of $4,000.
Is floe-guard open source?
Yes — Floe-Labs/floe-guard is open source, released under the MIT license.
What language is floe-guard written in?
Floe-Labs/floe-guard is primarily written in Python.
How popular is floe-guard?
Floe-Labs/floe-guard has 513 stars on GitHub.
Where can I find floe-guard?
Floe-Labs/floe-guard is on GitHub at https://github.com/Floe-Labs/floe-guard.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.