agentacct CLI
Local ledger of AI agent work: tokens, estimated cost, steps, changed files and checks per task for Claude Code, Codex and OpenCode
- 767 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- With your consent onboard writes hooks and MCP entries into client settings, and an environment variable for Claude Code
- Hooks fire on every tool call of the agent, while sync and the API stay running in the background on 127.0.0.1
- The tool reads agent session files, which can contain paths and commands from your projects
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/agentacctDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- With your consent onboard writes hooks and MCP entries into client settings, and an environment variable for Claude Code
- Hooks fire on every tool call of the agent, while sync and the API stay running in the background on 127.0.0.1
- The tool reads agent session files, which can contain paths and commands from your projects
This is third-party code. Review the repository files before installing.
What it does
agentacct gathers in one place what your agents did and what it cost. It installs through pipx, and `agentacct onboard` finds the agents on the machine once, creates a local store and starts background sync. Usage comes from each client's own session files: tokens are recorded as the client reported them, and cost is computed from a price table and marked as an estimate. The agent describes the work itself through an MCP server that records task sections, steps and check results. For Claude Code a hook is also installed that passes real session ids, and usage is then tied exactly to the task. Each task gets a receipt: the sessions involved, the outcome, estimated cost, the results and checks the agent reported, and an event timeline. An agent saying done is labeled Reported, and Verified is set only when current checks passed after the last change. You browse the result in the terminal interface `agentacct tui`, in the signed macOS app for macOS 14 and newer, or through a local JSON API at http://127.0.0.1:8765. The usage page filters by date, agent, model and provider, and work groups merge sessions of different agents in one project folder into a shared timeline.
Who it is for. For developers and team leads who run several agents across projects and want to see token use, task progress and evidence without sending data to a cloud.
Good fit when
- You want to know which tasks and models burn tokens and what Claude Code and Codex sessions cost over a week
- An agent reported done and you need to check whether real tests passed after its last edit
- Two agents worked in one project folder and you need a shared event timeline for them
- You need local tracking with no account and no cloud, for client projects for example
- You want remaining limits and quota window resets in one view
Not a fit when
- You need an exact figure for an invoice: cost here is a price-table estimate, and the tool has no access to provider billing
- You work on Windows without WSL: macOS and Linux are supported, and Python 3.11 or newer is required
- You only want a quick token report with no step recording or hooks: ccusage covers that
- Stability matters more than novelty: the project is in early alpha and changes fast
Example request
Show which tasks used the most tokens in Claude Code and Codex this week, and which of them the agent called done without any checksLimitations
Version 0.12.11 is listed as early alpha, and the author says it would rather show a gap than a guess.
Client support is uneven: Claude Code and Codex give the fullest receipts, while OpenCode, Hermes, Kimi Code, OpenClaw and Cursor are rated by capability in a separate coverage matrix. For Kimi Code and DeepSeek Harness the author marks the status experimental.
The link between usage and work carries a confidence label from exact to low. An unproven link shows as a gap, and daily totals follow the session's activity date, with multi-day sessions not split.
The MCP server and hooks bind when an agent session starts, so a new session is needed after installation. It requires Python 3.11 or newer on macOS or Linux, and on Windows only through WSL. MIT license.
How to disable. Run `agentacct stop`, and if you installed autostart, `agentacct uninstall-autostart`, then `pipx uninstall agentacct`. After that delete the store folder ~/.local/state/agentacct/state and the entries onboard added to your client settings; they are listed per client in the integrations document.
FAQ
Which agents does agentacct support?
The fullest receipts are for Claude Code and Codex. OpenCode, Hermes, Kimi Code, OpenClaw and Cursor are described in a coverage matrix by individual capability, and the same matrix is printed by `agentacct capabilities agents`.
Does agentacct send data to the internet?
By the author's description it does not: it reads only the local session files of detected clients, listens on 127.0.0.1, and neither stores nor requests API keys. No account is needed and there is no telemetry.
What does agentacct record about an agent's work?
Tool names and categories, touched files, commands with credentials scrubbed, exit codes, tokens and recorded steps. It does not save your prompts, the model's responses or conversation transcripts.
How is Reported different from Verified?
Reported means the agent itself named the result. Verified is set when current checks passed after the last recorded change. Claims and checks are stored separately, and a failed attempt stays in the history next to later results.
How do I install agentacct without pipx?
With `uv tool install agentacct`. The fallback is a dedicated virtual environment made with `python3 -m venv "$HOME/.agentacct"` and the package installed into it through pip. If the command is not on PATH, run it by its absolute path.
Why do I need a new agent session after onboard?
MCP servers and hooks attach when a session starts, so an already open session will not see the new tools. Until a real session of a recognized client appears, agentacct stays in a waiting state, and a demo row does not count.
Discussion
No questions or reviews yet.
Related
CLI toolsSelf-hosted system for a team of AI agents: org chart, tasks, budgets and oversight of Claude Code, Codex and OpenClaw
A terminal session manager for Claude Code, Codex, Gemini CLI, OpenCode and other agents: one list with statuses, git worktrees and control from a phone
A multi-agent harness that verifies results by artifacts: stop hooks, an independent judge and an event log for Claude Code, Codex, Cursor and more
A local real-time dashboard for Claude Code and Codex sessions: agent activity and tool calls
Local persistent memory for coding agents: hooks record every session, and Claude Code, Codex or Cursor recall past decisions through 54 MCP tools
A local-first AI agent running on your own machine via llama.cpp that drives a browser, edits files, runs approved commands and remembers context across session
Comparison with similar tools
Entries that share the main search query, and how they differ.
README in short
The repository has detailed documentation: a reference for commands and MCP tools, a per-agent coverage matrix, the architecture, safety boundaries, a table of what usage data can prove, and a privacy threat model. Separate examples show what happens when an agent says done and how to compare Claude Code and Codex on one task. It also holds the Swift source of the macOS app, tests, benchmarks and an install guide written for the agent itself.