能力标签
Floe-Guard AI 账单卫士
⚙️
Agent工作流

Floe-Guard AI 账单卫士

基于 Python · 无代码搭建完整 AI 自动化流程
英文名:floe-guard
⭐ 42 Stars 🍴 6 Forks 💻 Python 📄 MIT 🏷 AI 8.2分
8.2AI 综合评分
AI安全预算控制AI Agent
✦ AI Skill Hub 推荐

经 AI Skill Hub 精选评估,Floe-Guard AI 账单卫士 获评「强烈推荐」。这款Agent工作流在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.2 分,适合有一定技术背景的用户使用。

📚 深度解析

Floe-Guard AI 账单卫士 是一套完整的 AI Agent 自动化工作流方案。随着 AI 能力的不断提升,基于 Agent 的自动化工作流正在成为提升个人和团队效率的核心方式。区别于传统的 RPA 自动化(模拟鼠标键盘操作),AI Agent 工作流通过理解任务意图、动态规划执行路径,能够处理更复杂的非结构化任务。

Floe-Guard AI 账单卫士 工作流的设计遵循"最小配置,最大复用"原则:核心逻辑已经封装好,用户只需配置自己的 API Key 和业务参数即可快速上手。工作流内置错误处理和重试机制,在网络波动或 API 限速等情况下仍能稳定运行,适合作为生产环境的自动化基础设施。

在实际部署时,建议先在测试环境中运行 3-5 次,验证各个环节的输出结果符合预期,再部署到生产环境。AI Skill Hub 评分 8.2 分,是同类 Agent 工作流中的精选推荐。

📋 工具概览

一个为AI Agent设计的开源统一计费护栏工具。它能为AI工作流提供硬性预算限制,在费用失控前强制停止运行,防止因Agent陷入死循环或过度调用而导致账单爆炸,非常适合开发者和企业级AI应用部署。

Floe-Guard AI 账单卫士 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。

GitHub Stars
⭐ 42
开发语言
Python
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
MIT
AI 综合评分
8.2 分
工具类型
Agent工作流
Forks
6

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

一个为AI Agent设计的开源统一计费护栏工具。它能为AI工作流提供硬性预算限制,在费用失控前强制停止运行,防止因Agent陷入死循环或过度调用而导致账单爆炸,非常适合开发者和企业级AI应用部署。

Floe-Guard AI 账单卫士 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。

📌 核心特色
  • 可视化 Agent 工作流编排,无需编写复杂代码
  • 支持多步骤自动化任务链,实现全流程无人值守
  • 与外部 API、数据库和第三方服务无缝集成
  • 内置错误处理与自动重试机制,保障稳定运行
  • 提供可复用的自动化模板,快速在同类场景部署
🎯 主要使用场景
  • 自动化日常重复性工作,将精力集中于创造性任务
  • 构建数据采集 → 处理 → 输出的完整自动化管线
  • 实现跨平台、跨系统的数据流转和业务协同
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一: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('安装成功')"
📋 安装步骤说明
  1. 访问 GitHub 仓库获取工作流文件
  2. 在对应平台(Dify / Flowise / Make 等)中找到「导入工作流」功能
  3. 上传工作流文件
  4. 按照提示配置必要的环境变量和 API Key
  5. 运行测试确认流程正常后投入使用
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 命令行使用
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"
📑 README 深度解析 真实文档 完整度 52/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

floe-guard

PyPI version npm version Downloads Python versions CI License: MIT

Know what every AI call really costs. Your agent spends across a dozen vendors on every call — carrier, speech-to-text, model, voice, tools. floe-guard costs each call the moment it ends and keeps a live ledger of your agent's real spend. In-process, no account, no signup, no telemetry by default.

Connect free (one key) for your Coverage Score and 7-day history — the audit-grade picture of where every dollar went, up to $2K/month tracked, no card. And it hard-stops a runaway loop before it crosses your ceiling: $0.10 instead of $4,000.

Python (pip install floe-guard): plain check() / record() or adapters for OpenAI · Anthropic · Gemini · CrewAI · LiteLLM · LangChain · LangGraph; voice adapters for Pipecat · LiveKit · Vapi · Retell; pre-call admission gates.

TypeScript (npm i floe-guard): Vercel AI SDK middleware, native LiveKit · Vapi · Retell voice adapters. See the adapter matrix for what ships in Python vs TypeScript.

Reading this on PyPI? The docs/… and examples/… links resolve on the GitHub README, not on the PyPI page.

The hard-stop is contract-based: adapters gate LLM calls automatically; for paid tools, reserve_tool() / settle_tool() block before the call runs (record_tool() alone meters after the fact — it can't stop a call already made).

Honest about what this is

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 default to the last call's cost (0 until the first record()) — size them to the real request with estimate_call() (the LiteLLM adapter does this for you), or use hosted Floe for a hard cap under arbitrary concurrency. - Mid-stream enforcement (guard_stream) prices chunks by a ~4 chars/token heuristic unless you supply a tokenizer, so the cut-off point is approximate; the final accrual reconciles to provider-reported usage.

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.

On the very first call, check() has no historical usage to predict cost with.

Examples

All runnable examples live in examples/. Use python examples/<file> from the repo root.

ExampleDescriptionExtraAPI key / network
[runaway_loop.py](examples/runaway_loop.py)The canonical hard-stop demo — a stub loop halted before it crosses $0.10nonenone
[streaming_guard.py](examples/streaming_guard.py)Pre-flight block on an oversized first call + mid-stream cut-off via guard_stream()nonenone
[budget_aware.py](examples/budget_aware.py)Context-aware tapering: agent downshifts to a cheap model when advisory().near_limit tripsnonenone
[budget_retry.py](examples/budget_retry.py)Budget-aware retry / graceful degradation with with_budget_retry()nonenone
[context_size.py](examples/context_size.py)Context size adapts to budget: history trimmed and max_tokens capped near the ceilingnonenone
[plan_complexity.py](examples/plan_complexity.py)Plan complexity adapts: optional sub-tasks dropped and reasoning depth reduced near the capnonenone
[retrieval_depth.py](examples/retrieval_depth.py)RAG top_k shrinks in two steps (20→12→5) as budget drainsnonenone
[step_budget.py](examples/step_budget.py)Per-step token caps for a sequential loop: one runaway step blocked without stopping the runnonenone
[tool_budget.py](examples/tool_budget.py)Tool spend (Apollo lookups, Exa searches) as a first-class citizen of the same USD ceilingnonenone
[openai_adapter.py](examples/openai_adapter.py)guarded_completion against a duck-typed stub — exercises the real pre-flight hard-stopnonenone
[anthropic_adapter.py](examples/anthropic_adapter.py)Anthropic adapter with native prompt-cache pricing (cache write vs. cache read vs. uncached)nonenone
[langgraph_budget_aware.py](examples/langgraph_budget_aware.py)LangGraph guarded_node fan-out with an advisory-driven router that tapers before the cappip install floe-guard[langgraph]none
[langchain_groq_example.py](examples/langchain_groq_example.py)LangChain callback handler on ChatGroq (Llama-3): call 1 succeeds, call 2 is hard-stoppedpip install floe-guard[langchain] langchain-groqGROQ_API_KEY + network
[voice_turn_budget.py](examples/voice_turn_budget.py)Pipecat pipeline with FloeBudgetGuardProcessor: multi-turn voice conversation halted mid-runpip install floe-guard[pipecat]none
[voice_call_cost_pipecat.py](examples/voice_call_cost_pipecat.py)Full per-leg call cost (STT + LLM + TTS + telephony) via Pipecat, priced from the bundled mappip install floe-guard[pipecat]none
[voice_call_cost_livekit.py](examples/voice_call_cost_livekit.py)Full per-leg call cost (STT + LLM + TTS + telephony) via LiveKit, priced from the bundled mappip install floe-guard[livekit]none
[voice_call_cost_vapi.py](examples/voice_call_cost_vapi.py)Full per-leg call cost (STT + LLM + TTS + telephony) via the Vapi custom-LLM proxy, priced from the bundled mappip install floe-guardnone
[voice_call_cost_retell.py](examples/voice_call_cost_retell.py)Full per-leg call cost (STT + LLM + TTS + telephony) via the Retell custom-LLM WebSocket, priced from the bundled mappip install floe-guardnone

Framework adapters (optional extras)

See it stop a loop (no API key needed)

Straight from the install — no repository checkout needed:

pip install floe-guard
floe-guard demo

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, before it can cross the $0.10 ceiling. This is the reproducible "stop the loop" demo. Cloned the repo? The same demo is examples/runaway_loop.py (a thin wrapper around floe_guard.demo.run_demo).

Vapi (voice)

pip install floe-guard            # the Vapi adapter is framework-free — no extra

The custom-LLM proxy sees only the model leg, so VapiBudgetGuard guards the /chat/completions turn and admits the call via the assistant-request webhook. guard_completion (JSON) and guard_stream (SSE) reserve the estimated cost before the upstream call, settle on Vapi's real OpenAI usage afterwards, and release the hold on error/abort — so an over-budget turn gets a 402 instead of reaching your LLM. Set stream_options={"include_usage": True} on the upstream streaming request or guard_stream fails loudly (the SSE omits usage without it).

```python from floe_guard import BudgetGuard from floe_guard.errors import BudgetExceeded from floe_guard.integrations.vapi import VapiBudgetGuard

guard = BudgetGuard(limit_usd=1.00) budget = VapiBudgetGuard( guard, stt_model="deepgram-nova-3", # $/sec from the voice map tts_model="elevenlabs-flash-v2.5", # $/1k-chars from the voice map telephony="twilio-us-inbound-local", # $/min from the voice map )

POST /chat/completions — the custom-LLM endpoint Vapi calls each turn.

completion = await budget.guard_completion( lambda: openai_client.chat.completions.create(model=model, messages=messages), model=model, )

Vapi assistant-request webhook — respond within ~7.5s:

gates.vapi(guard, assistant_id="asst_…")

Vapi custom-LLM proxy — wrap the /chat/completions turn

from floe_guard.integrations.vapi import VapiBudgetGuard

budget = VapiBudgetGuard(guard, stt_model="deepgram-nova-3", tts_model="elevenlabs-flash-v2.5", telephony="twilio-us-inbound-local") completion = await budget.guard_completion( # reserve → run → settle on real usage lambda: openai_client.chat.completions.create(model=model, messages=body["messages"]), model=model, )

Guard your first real workflow

You've watched it stop a stub loop — the real payoff is protecting a real one, where the local ceiling earns its keep. Pick your stack; each is a drop-in adapter, a few lines, no rearchitecting:

See the adapter matrix for what ships in Python vs TypeScript.

🎯 aiskill88 AI 点评 A 级 2026-07-10

aiskill88点评:解决了Agent落地最痛的成本失控问题,逻辑简单且实用,是AI工程化不可或缺的安全组件。

📚 实用指南(长尾问题)
适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • 本地部署优先选 GGUF 量化模型,节省显存并保持响应速度
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • 显存不足直接 OOM — 优先降低 context 或换更小的量化模型
  • Python 依赖冲突:建议用 venv / uv 隔离环境
部署方案
  • 本地部署:CPU 8GB 起,GPU 推荐 16GB+ 显存
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
floe-guard 中文教程floe-guard 安装报错怎么办floe-guard MCP 配置floe-guard Agent 工作流floe-guard 与同类工具对比floe-guard 最佳实践floe-guard 适合谁用

⚡ 核心功能

👥 适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
⭐ 最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • 本地部署优先选 GGUF 量化模型,节省显存并保持响应速度
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • 显存不足直接 OOM — 优先降低 context 或换更小的量化模型
  • Python 依赖冲突:建议用 venv / uv 隔离环境

👥 适合人群

自动化工程师和运维人员项目经理和业务分析师希望减少重复性工作的专业人士数字化转型团队

🎯 使用场景

  • 自动化日常重复性工作,将精力集中于创造性任务
  • 构建数据采集 → 处理 → 输出的完整自动化管线
  • 实现跨平台、跨系统的数据流转和业务协同

⚖️ 优点与不足

✅ 优点
  • +MIT 协议,可免费商用
  • +大幅减少重复性人工操作
  • +可视化流程,清晰直观
  • +可扩展性强,支持复杂场景
⚠️ 不足
  • 初始配置和调试需投入一定时间
  • 强依赖外部服务的稳定性
  • 复杂场景需具备一定技术基础
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。

🔗 相关工具推荐

📚 相关教程推荐
📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

floe-guard 是一款Python开发的AI辅助工具。开源AI工作流:Open-source unified billing guardrail for AI agents — hard-stop before a runaway。⭐42 · Python 主要应用场景包括:防止AI Agent死循环导致的高���扣费、多租户AI应用的额度管理。
💡 AI Skill Hub 点评

AI Skill Hub 点评:Floe-Guard AI 账单卫士 的核心功能完整,质量优秀。对于自动化工程师和运维人员来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。

⬇️ 获取与下载
⬇ 下载源码 ZIP

✅ MIT 协议 · 可免费商用 · 直接从 aiskill88 服务器下载,无需跳转 GitHub

📚 深入学习 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
🔗 原始来源
🐙 GitHub 仓库  https://github.com/Floe-Labs/floe-guard 🌐 官方网站  https://dev-dashboard.floelabs.xyz/

收录时间:2026-07-10 · 更新时间:2026-07-11 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。

📺 订阅 AI Skill Hub Daily Telegram 频道
每天 8 条精选 AI Skill、MCP、Agent 与自动化工具推送
加入频道 →