经 AI Skill Hub 精选评估,Floe-Guard AI 账单卫士 获评「强烈推荐」。这款Agent工作流在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.2 分,适合有一定技术背景的用户使用。
一个为AI Agent设计的开源统一计费护栏工具。它能为AI工作流提供硬性预算限制,在费用失控前强制停止运行,防止因Agent陷入死循环或过度调用而导致账单爆炸,非常适合开发者和企业级AI应用部署。
Floe-Guard AI 账单卫士 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
一个为AI Agent设计的开源统一计费护栏工具。它能为AI工作流提供硬性预算限制,在费用失控前强制停止运行,防止因Agent陷入死循环或过度调用而导致账单爆炸,非常适合开发者和企业级AI应用部署。
Floe-Guard AI 账单卫士 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:pip 安装(推荐)
pip install floe-guard
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install floe-guard
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/Floe-Labs/floe-guard
cd floe-guard
pip install -e .
# 验证安装
python -c "import floe_guard; print('安装成功')"
# 命令行使用
floe-guard --help
# 基本用法
floe-guard input_file -o output_file
# Python 代码中调用
import floe_guard
# 示例
result = floe_guard.process("input")
print(result)
# floe-guard 配置文件示例(config.yml) app: name: "floe-guard" debug: false log_level: "INFO" # 运行时指定配置文件 floe-guard --config config.yml # 或通过环境变量配置 export FLOE_GUARD_API_KEY="your-key" export FLOE_GUARD_OUTPUT_DIR="./output"
A local budget guardrail for AI agents. It hard-stops your agent before its next LLM call when it would cross a spend ceiling — so a runaway loop dies at $0.10 instead of $4,000. No account, no signup, no network, no telemetry. Runs in your process.
Works with CrewAI · LiteLLM · LangChain · OpenAI · Anthropic · Vercel AI SDK — or any stack, via plain check() / record().
pip install floe-guard # Python
npm i floe-guard # TypeScript (Vercel AI SDK) — see js/
from floe_guard import BudgetGuard
guard = BudgetGuard(limit_usd=5.00) # your ceiling
guard.check() # before each LLM call — raises if it'd cross
response = call_your_llm(...) # your existing call
guard.record("gpt-4o", response.usage.prompt_tokens, response.usage.completion_tokens)
When the next call would cross the ceiling, the guard raises BudgetExceeded and prints:
BUDGET EXCEEDED — call blocked
spent so far: $5.001250 | ceiling: $5.000000
The next call would cross your budget; floe-guard stopped your agent before it ran.

Run it yourself: python examples/runaway_loop.py — no API key, no account, no network.
floe-guard is a local, estimate-based guardrail. It prices tokens from a vendored cost map inside your process:
- The cost map can drift as vendors change prices — refresh it like any snapshot. - It only sees the vendors you instrument. - A determined agent or a bug could route around an in-process check. - Under heavy or cold-start concurrency it bounds steady-state spend, not the first parallel wave. Reservations size from the last call's cost (0 until the first record()), so the opening fan-out has nothing to estimate from. Pass a known per-call max to reserve() to bound it, or use hosted Floe for a hard cap under arbitrary concurrency.
It's genuinely useful on its own, and it's honest about its limits. No inflated metrics, no "zero defaults" claims — it's a free local stop, not a vault.
python examples/runaway_loop.py
This rigs a loop against a stub LLM — no real API key, no account, no network. It prices each fake gpt-4o call offline and the guard halts the loop after a few iterations. This is the reproducible "stop the loop" demo.
The Vercel AI SDK is TypeScript-only, so it ships as a separate npm package that lives in js/. It works with both AI SDK v4 and v5.
npm i floe-guard ai @ai-sdk/openai
import { wrapLanguageModel } from "ai";
import { openai } from "@ai-sdk/openai";
import { BudgetGuard, budgetGuardMiddleware } from "floe-guard";
const guard = new BudgetGuard(5.0); // your ceiling, in USD
const model = wrapLanguageModel({
model: openai("gpt-4o"),
middleware: budgetGuardMiddleware(guard), // throws before crossing
});
The middleware check()s before each call (throwing BudgetExceeded to halt the run) and record()s priced usage after — same semantics as the Python guard. See js/README.md.
aiskill88点评:解决了Agent落地最痛的成本失控问题,逻辑简单且实用,是AI工程化不可或缺的安全组件。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:Floe-Guard AI 账单卫士 的核心功能完整,质量优秀。对于自动化工程师和运维人员来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | floe-guard |
| 原始描述 | 开源AI工作流:Open-source unified billing guardrail for AI agents — hard-stop before a runaway。⭐42 · Python |
| Topics | AI安全预算控制AI Agent |
| GitHub | https://github.com/Floe-Labs/floe-guard |
| License | MIT |
| 语言 | Python |
收录时间:2026-07-10 · 更新时间:2026-07-10 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端