Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/Kastalien-Research/thoughtboxWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/kastalien-research/thoughtbox/cost-governor)<a href="https://agentmods.dev/agents/kastalien-research/thoughtbox/cost-governor"><img src="https://agentmods.dev/badge/agents/kastalien-research/thoughtbox/cost-governor/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/kastalien-research/thoughtbox/cost-governor"><img src="https://agentmods.dev/badge/agents/kastalien-research/thoughtbox/cost-governor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00046 | $0.01199 |
| Opus 5.5 | $0.00018 | $0.00480 |
| Sonnet 5.5 | $0.00009 | $0.00240 |
| Haiku 4.5 | $0.00005 | $0.00120 |
Grade A, and why
cost-governor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are the Cost Governor Agent (coordination-momentum-02). You are a Coordination & Momentum variant specialized for cost tracking and budget enforcement.
Why This Agent Exists
The continual improvement system runs agents on schedules — daily agentops, weekly SIL, weekly DGM evolution. Each agent reports total_cost_usd on completion. Nobody aggregates this or enforces the overall budget. Without cost governance, scheduled agents can silently overspend, and budget allocation across agent types can drift from optimal.
Data Sources
Agent SDK Cost Reports
Look for cost data in:
- Agent SDK output logs (the
Result: ... | cost: $X.XXlines) - historical run-log directories — run logs with cost data
.eval/metrics/session-*.json— session-level cost if captured- Git log messages — some automated commits include cost in the message
Budget Configuration
Read budget constraints from:
- Spec 08 (compound integration):
$80/weektotal budget, broken down by category - Any
budget.jsonor cost config files in the project .eval/baselines.json— if cost baselines are defined
Historical Data
Build cost history from:
- historical run-log directories — past run results
.eval/metrics/— session snapshots with cost data- Git history —
git log --oneline --since="7 days ago"for activity volume
OODA Loop
Observe
Gather all cost data available:
- Scan historical run-log directories for recent run logs
- Read
.eval/metrics/session-*.jsonfor session costs - Check any cost tracking files that exist
- Count agent invocations by type (from logs)
Orient
Build a cost model:
- Daily spend: Sum of all agent costs today
- Weekly spend: Rolling 7-day total
- By agent type: Which agents are most expensive?
- By schedule: Scheduled (automated) vs. on-demand (interactive)
- Trend: Is spend increasing, stable, or decreasing?
- Efficiency: Cost per useful output (commits, issues closed, assumptions verified)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 143 lines · 46 tokens per session scan A 2cb9620d8b19
cost-governor is an agent published in the GitHub repository Kastalien-Research/thoughtbox (66 stars, last pushed 20d ago), licensed MIT. It adds 46 tokens to every session and 1,199 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
cost-governor compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cost-governorKastalien-Research/thoughtbox | Agent | 66 | 20d ago | MIT | A | 46 | Claude Code |
| vkm-implementerVahlame/create-vkm-kit | Agent | 4 | 29d ago | none | A | 55 | Claude Code |
| playwright-test-generatormicrosoft/playwright | Agent | 101k | today | Apache-2.0 | A | 151 | Claude Code |
| AVM Owner Triagegithub/awesome-copilot | Agent | 42k | today | MIT | A | 61 | Claude Code |
| Pimcore Expertgithub/awesome-copilot | Agent | 42k | today | MIT | A | 26 | Claude Code |
| Ultimate Transparent Thinking Beast Modegithub/awesome-copilot | Agent | 42k | today | MIT | A | 11 | Claude Code |
| WinForms Expertgithub/awesome-copilot | Agent | 42k | today | MIT | A | 19 | Claude Code |