Who it is forA developer or team lead who pays for coding-agent usage and wants to compare agents and models over a set period.
The problemUsage is split across each client's own records, so comparing agents, models, and periods takes manual work.
The outcomeA usage page that totals tokens and estimated cost by agent and model for a chosen range, with cache tokens shown separately and estimates labeled.
What you need first
- Python 3.11 or newer on macOS or Linux, or Windows through WSL, with pipx available (or the signed macOS app from the latest release on macOS 14+)
- At least one supported coding agent with local session logs on this machine, such as Claude Code or Codex
- Permission to open a new agent session after setup, because hooks and MCP servers bind at session start
Steps
- Run
agentacct tuiand open the usage view - Set the date range, then filter by agent, model, or provider
- Read the totals by agent and by model for the selected range
- Check the freshness stamp in the top bar before trusting the numbers
Prompt for your agent
Use the agentacct repo at https://github.com/mikehasa/agentacct to report token totals and estimated cost by agent and by model for the last 7 days on this machine. Verify that cost figures are labeled as estimates and that the local data freshness stamp is shown.
Caveat. Dates show session totals by activity date, so sessions that span several days are not split into exact daily spend.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for mikehasa/agentacct and "Review token use and cost by agent and model"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer