Agent Budget Governance
/install agent-budget-governance
Agent Budget Governance
Prevent runaway API spending in multi-agent systems. Each agent gets a daily output token budget. Exceed it and you get warnings. Keep exceeding it and you lose mesh spawn privileges.
How It Works
Agent completes task → tokens logged to BUDGET.json
↓
Heartbeat runs budget_audit.py
↓
├── Under 80%: ✅ Green — business as usual
├── 80-100%: 🟡 Yellow — warning logged
├── 100-200%: 🔴 Red — alert to orchestrator
└── 200%+ or 3 consecutive days over: ⛔ Demotion — mesh privileges revoked
Budget File Format
Each agent has agents/\x3Cname>/BUDGET.json:
{
"daily_limit": 50000,
"today": "2026-03-01",
"used_today": 23450,
"consecutive_over_days": 0,
"demoted": false
}
Running the Audit
python3 scripts/budget_audit.py # Full audit with alerts
python3 scripts/budget_audit.py --json # Machine-readable output
python3 scripts/budget_audit.py --reset-only # Just reset daily counters
Governance Rules
- Daily reset at midnight (configurable timezone)
- Yellow at 80% — logged, no action
- Red at 100% — logged, orchestrator alerted
- Demotion at 200% OR 3 consecutive days over budget
- Rehabilitation — demoted agent must go 7 clean days, then orchestrator manually restores privileges
Demotion Mechanics
Demotion removes an agent's subagents.allowAgents list in openclaw.json, preventing them from spawning other agents. They can still be spawned by the orchestrator.
Files
scripts/budget_audit.py— Audit script (run from heartbeat or cron)references/GOVERNANCE.md— Full governance framework documentation
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install agent-budget-governance - 安装完成后,直接呼叫该 Skill 的名称或使用
/agent-budget-governance触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Agent Budget Governance 是什么?
Trust-based budget system for multi-agent teams — daily token limits with automatic midnight resets, yellow/red/demotion thresholds, audit logging, and mesh... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 301 次。
如何安装 Agent Budget Governance?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-budget-governance」即可一键安装,无需额外配置。
Agent Budget Governance 是免费的吗?
是的,Agent Budget Governance 完全免费(开源免费),可自由下载、安装和使用。
Agent Budget Governance 支持哪些平台?
Agent Budget Governance 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Agent Budget Governance?
由 Nissan Dookeran(@nissan)开发并维护,当前版本 v1.0.0。