Observed since 20 Oct, 23:32 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Real-time cost tracking for AI coding agents with budget limits, kill switch, and TUI dashboard.
Real-time cost tracker for AI coding agents. Wrap any CLI agent, see a live cost ticker while it runs, and enforce budgets with an automatic kill switch.
pip install agent-tally
# Track a Claude Code session
agent-tally run claude "refactor auth module"
# Set budgets
agent-tally budget set --daily 5.00 --session 1.00
# Watch costs live
agent-tally dashboard
Output while your agent runs:
$ agent-tally run claude "fix the login bug"
⠋ Running claude... $0.42 │ 2.1k tokens │ 14s elapsed
agent-tally dashboard for a live overview of all tracked sessions| Command | Description |
|---|---|
agent-tally run <command> [args...] | Wrap and track an agent |
agent-tally budget set --daily 5.00 --session 1.00 | Set budget limits |
agent-tally budget show | Show current budget and usage |
agent-tally dashboard | Live TUI cost dashboard |
agent-tally summary [--by-agent|--by-model] [--since 7d] | Usage summary |
agent-tally export [--format json|csv] | Export cost data |
agent-tally agents | List supported agents |
┌─────────────────────────────────────────────────────┐
│ agent-tally │
│ │
│ ┌──────────┐ ┌──────────────┐ ┌─────────────┐ │
│ │ CLI run │──▶│ Wrapper │──▶│ Subprocess │ │
│ │ command │ │ intercepts │ │ (agent CLI) │ │
│ └──────────┘ │ stdout/err │ └──────┬───────┘ │
│ └──────┬───────┘ │ │
│ │ │ │
│ ▼ │ │
│ ┌──────────────┐ │ │
│ │ Token parser │◀─────────┘ │
│ │ counts tokens│ (reads agent │
│ │ from output │ output stream) │
│ └──────┬───────┘ │
│ │ │
│ ┌──────────┴──────────┐ │
│ ▼ ▼ │
│ ┌──────────────┐ ┌────────────────┐ │
│ │ Live ticker │ │ Budget checker │ │
│ │ $X.XX ████ │ │ warn @ 80/95% │ │
│ └──────────────┘ │ kill @ 100% │ │
│ └───────┬────────┘ │
│ ▼ │
│ ┌────────────────────┐ │
│ │ Webhook alerts │ │
│ │ Discord / Slack │ │
│ └────────────────────┘ │
└─────────────────────────────────────────────────────┘
agent-tally wraps your agent command as a subprocess. It parses the agent's output stream to count tokens in real-time, calculates cost using model-specific pricing, and displays a live ticker. If spending hits your budget limit, it kills the process automatically.
| Agent | Status |
|---|---|
| Claude Code | ✅ Supported |
| Codex CLI | ✅ Supported |
| Gemini CLI | ✅ Supported |
| OpenClaw | ✅ Supported |
| Cursor | ✅ Supported |
| Any CLI agent | ✅ Generic support |
| agent-tally | tokscale | |
|---|---|---|
| Approach | Active — wraps commands in real-time | Passive — reads session logs after the fact |
| Live cost display | ✅ Ticker updates as the agent runs | ❌ Post-hoc only |
| Budget enforcement | ✅ Kill switch at budget limit | ❌ No enforcement |
| Kill switch | ✅ Auto-terminates runaway agents | ❌ Not possible (after the fact) |
| Setup | Wrap your command, done | Parse exported logs |
tokscale is great for retroactive analysis. agent-tally is for when you want to control spend while it's happening.
git checkout -b feat/my-featurepytestBug reports and feature requests welcome in Issues.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.9.0 | 14 Apr 2026 | 5 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 23:32 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:ad5ed540d999d52d40ba02b9f26115275a1d8961c2be189750bab41b06b4e765