Knowledge Base Regulation Tracker Standards & Frameworks OSS Directory AI Incident Database Research Paper Library Case Studies Society Articles News Jobs About Charter Sign inBecome a Member
Home/OSS Directory/floe-guard

floe-guard

Drift and performance monitoring

The spend meter, cost/margin, & budget gate for AI voice agents. Meters STT + TTS + LLM + telephony per call, out of the box (Pipecat, LiveKit — Python & TypeScript). Hard-stops the next turn before it crosses your ceiling. Local, no account, no telemetry. Built by Floe.

ai-agentsai-agents-cliai-safetybland-aibudgetcost-trackingelevenlabslivekit

What floe-guard does

floe-guard tracks the real-time cost of AI voice agent interactions by measuring spend across all components of a call. It accounts for speech-to-text (STT), text-to-speech (TTS), large language model (LLM) usage, and telephony costs—all per call and in real time. The tool integrates with frameworks like Pipecat and LiveKit, providing visibility into expenses without requiring cloud accounts or telemetry. It enforces budget limits by halting subsequent calls before they exceed predefined ceilings, ensuring financial controls are applied proactively.

The system operates locally, meaning no vendor account or external dependencies are needed. Costs are calculated using a bundled rate map that includes public list prices for vendors, though users can override these with custom rate cards for accuracy. The tool also supports pre-call admission gates, which block calls that would exceed budgets before they execute.

For users who opt into the hosted Floe service, floe-guard syncs its ledger to provide a Coverage Score and a 7-day spend history. This feature offers an audit-grade breakdown of where funds are allocated, up to $2,000 per month, without requiring payment details. The hosted system acts as the primary record of spend, tying costs to specific clients or campaigns and enabling margin calculations per interaction. It also supports invoicing customers based on actual spend, with server-side enforcement of budget controls.

How it works

floe-guard operates by embedding itself in the call path of AI agents, rather than relying on passive monitoring. This design ensures that budget enforcement happens before a call is made, rather than after the fact. The tool uses two primary mechanisms: check() and record(). The check() function predicts the cost of the next call based on the last one and raises a BudgetExceeded error if the call would exceed the set ceiling.

The record() function, used after a call completes, prices the tokens consumed by the LLM and updates the running total of spend. This pricing is done offline using a bundled cost map, which includes rates for major vendors like OpenAI, Anthropic, and Gemini. The tool also supports adapters for voice frameworks such as Pipecat and LiveKit, allowing it to meter telephony, STT, and TTS costs alongside LLM usage. For paid tools, the reservetool() and settletool() functions ensure that budget checks occur before the tool is invoked, preventing overspend on external services.

The ledger maintained by floe-guard is persistent and can be shared across processes, such as cron jobs or serverless functions. This ensures that budget ceilings remain consistent even when multiple instances of an agent are running concurrently. The tool also handles concurrency by using atomic reservation and settlement operations, preventing race conditions where parallel calls might collectively exceed the budget. This is particularly useful for frameworks like CrewAI, where multiple agents may operate simultaneously.

Use cases

floe-guard is designed for organizations deploying AI voice agents at scale, where unchecked spend can quickly escalate. For example, a poorly designed agent might enter an infinite loop, repeatedly querying an LLM and incurring significant costs. floe-guard detects such patterns and halts the loop before it exceeds a predefined budget, such as $0.10 instead of $4,000. This is demonstrated in the included demo mode, which simulates a loop without requiring API keys or network access.

Another use case is pre-call cost estimation. Developers can use floe-guard to estimate the cost of a workload before execution, ensuring that budgets are set appropriately. For instance, a workload of 1,000 calls to gpt-4o with 800 input tokens and 300 output tokens per call can be priced offline, allowing the user to set a ceiling that matches the estimated total.

floe-guard also addresses the challenge of multi-vendor cost attribution in voice AI systems. Traditional token-level tools may only meter LLM costs, missing expenses associated with telephony, STT, and TTS. floe-guard provides a comprehensive breakdown of per-leg costs, such as Deepgram Nova-3 for STT, ElevenLabs Flash for TTS, and Twilio for telephony. This granularity helps organizations understand the true cost of each interaction and optimize their stack accordingly. For example, a single voice call might incur costs for STT ($0.001027), LLM ($0.003700), TTS ($0.009000), and telephony ($0.012750), totaling $0.026477.

For organizations using Floe’s hosted service, floe-guard enables advanced financial controls, such as per-client budgeting and margin tracking. Spend can be attributed to specific clients or campaigns, and invoices can be generated based on actual costs. The tool also enforces spend controls server-side, ensuring that budgets are respected even when agents operate independently.

Key features and capabilities

  • Real-time budget enforcement: floe-guard halts calls before they exceed predefined ceilings, preventing overspend in real time. This is achieved through pre-call checks and atomic reservation mechanisms.
  • Multi-vendor cost tracking: The tool meters costs for STT, TTS, LLMs, and telephony, providing a holistic view of spend per call. Adapters are available for major frameworks like Pipecat, LiveKit, Vapi, and Retell.
  • Offline cost estimation: Users can estimate the cost of workloads without executing them, using bundled rate maps or custom rate cards. This helps in setting accurate budgets before deployment.
  • Concurrency-safe budgeting: floe-guard handles parallel agent execution by using atomic operations to reserve and settle budgets, ensuring that concurrent calls do not collectively exceed limits.
  • Custom rate cards: Users can override bundled vendor rates with their own rate cards, accommodating negotiated discounts, volume tiers, or unpublished pricing. This ensures that cost tracking reflects actual expenses rather than list prices.
  • Local and hosted modes: floe-guard operates entirely locally by default, with no telemetry or account requirements. Users can optionally sync data to Floe’s hosted service for advanced features like Coverage Scores, 7-day histories, and server-side budget enforcement.
  • Integration with Floe’s agent skill: Developers can use the Floe agent skill to automate the deployment of floe-guard within AI agents, enabling self-onboarding and unattended setup. This is supported for coding agents like Claude Code or Cursor.
  • Demo and testing modes: floe-guard includes built-in demos for testing budget enforcement, such as simulating runaway loops or estimating costs without network access.
  • Compliance with financial controls: The tool supports per-client and per-campaign budgeting, margin calculations, and invoicing based on actual spend. This aligns with enterprise requirements for auditability and financial transparency.

Sources

Contribute

Spot an error, or know a record we should add? Members can propose additions and submit corrections.