Trust-based budget system for multi-agent teams — daily token limits with automatic midnight resets, yellow/red/demotion thresholds, audit logging, and mesh privilege revocation. Use when running multiple AI agents that share API budgets and need spend controls. Works with any OpenClaw multi-agent setup.
防止多 Agent 系统中的 API 费用失控。每个 Agent 拥有每日输出 Token 预算。超出预算会收到警告。持续超出将失去网格生成权限。
Agent 完成任务 → Token 记录到 BUDGET.json
↓
心跳机制运行 budget_audit.py
↓
├── 低于 80%: ✅ 绿色 — 正常运行
├── 80-100%: 🟡 黄色 — 记录警告
├── 100-200%: 🔴 红色 — 向编排器发出警报
└── 200% 以上或连续 3 天超出: ⛔ 降级 — 撤销网格权限
每个 Agent 拥有 agents/
json
{
daily_limit: 50000,
today: 2026-03-01,
used_today: 23450,
consecutiveoverdays: 0,
demoted: false
}
bash
python3 scripts/budget_audit.py # 完整审计并发出警报
python3 scripts/budget_audit.py --json # 机器可读输出
python3 scripts/budget_audit.py --reset-only # 仅重置每日计数器
降级会移除 Agent 在 openclaw.json 中的 subagents.allowAgents 列表,阻止其生成其他 Agent。它们仍可由编排器生成。
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 agent-budget-governance-1776199035 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 agent-budget-governance-1776199035 技能
skillhub install agent-budget-governance-1776199035
文件大小: 6.48 KB | 发布时间: 2026-4-15 11:36