How I track what my coding agents actually cost
For the last few months I've been using Pi and Claude Code for real work. The speed is great. The problem is that after a week I had two questions I couldn't answer:
- Is this actually done? An agent would say "fixed" and the next day I'd find a skipped test or a broken type check.
- What did this feature cost? Five sessions spread across Pi and Claude Code, and I had no idea if the total was $2 or $20.
So I built agent-kit, a small, provider-agnostic setup that solves both.
What it looks like
The two ideas
1. One command decides "done"
Every project gets an AGENTS.md with the development cycle, definition of done, stop-and-ask list, and hand-off format. Then there is one verification script:
scripts/verify The agent runs it after every change. A pre-push hook runs it before every push. CI runs the same thing.
No more "I think it's done". It's done when scripts/verify says PASS.
2. One ledger tracks cost across agents
A Pi extension and a Claude Code hook write to the same ledger file, ~/.agent-kit/ledger.jsonl. Each line is a delta of spend since the last write, tagged with project, branch, and a cost bucket (usually a ticket id).
Then you can ask:
agent-cost --projects Or see what a single ticket cost across multiple sessions and tools:
agent-cost --bucket PROJ-123 Why I built it this way
I didn't want another dashboard. I wanted something that:
- Works in any directory, with or without a project.
- Doesn't force a specific agent. Pi and Claude Code are supported today; Codex can follow the same
AGENTS.mdrules. - Keeps the gate simple: one script, not a CI pipeline nobody runs locally.
- Stores data locally by default, in plain JSONL.
Quick start
git clone https://github.com/acs195/agent-kit.git cd agent-kit ./install.sh --user ./install.sh /path/to/your/project Then fill in the Project section of AGENTS.md, set the STEPS in scripts/verify, and run it until it passes.
What's included
-
AGENTS.md/CLAUDE.mdtemplates -
scripts/verify+scripts/lib/verify-runner.sh .githooks/pre-push- Pi extension with cost bucket picker
- Claude Code ledger hooks
-
agent-costreport - TypeScript preset and example project
- GitLab and GitHub CI templates
- 36 tests
Try it or tear it apart
The repo is open source under MIT:
👉 https://github.com/acs195/agent-kit
I'd especially love feedback on the AGENTS.md format and what other presets would be useful (Python is next on my list).





