cool-solution — dev.blog
Technologies

Repo of the day: agentacct, what coding agents really cost

Anyone working daily with coding agents knows the feeling: by the end of the day the agent has “done things”, tokens have flown, but reconstructing what actually happened — which tasks, which files, which tests, at what cost — is an exercise in log archaeology. On July 24, 2026 agentacct, by mikehasa, appeared on GitHub and passed 450 stars in under a week: a local-first dashboard that calls this problem by name, “Agent Work Intelligence”. It reads the session logs Claude Code and Codex already write on your machine, joins them with the work the agent records as it goes, and shows the result on a dashboard that never leaves `127.0.0.1`. I picked it as repo of the day because the topic — knowing what agents cost and what they do — matters to the developer as much as to the company paying the bill, and because its philosophy boils down to one line from the README I fully subscribe to: better to show a gap than a guess dressed up as certainty.

AIHRMarketingAdminCustomer CareSalesOperations

🔍 What agentacct is

agentacct is a Python tool (>= 3.11, macOS and Linux; Windows only via WSL) installed with pipx that does one thing: it makes coding-agent work visible. It is not a proxy, it does not intercept API calls and it never asks for a provider key: it reads, read-only, the session files the clients already write locally, imports them into a plain-file store and serves a localhost dashboard with tokens per agent, model and day, pricing-table cost estimates and tasks reconstructed with their work steps.

The project's keyword is honesty. Tokens imported from the logs are labeled `client_reported`; costs are declared pricing-table estimates, never invoices; a passing test is `Verified` evidence, while the agent's own claim (“I fixed the bug”) stays labeled `Agent reported`. And when the link between usage and work cannot be proven, agentacct shows the gap instead of inventing the attribution.

The repo's identity card
repo       mikehasa/agentacct
what       local-first dashboard: what agents did and what it cost
how        Python >= 3.11 · pipx install agentacct · dashboard on 127.0.0.1:8765
sources    Claude Code and Codex session logs (read-only) + work over MCP
extra      no account, no cloud, no telemetry, no API keys
license    MIT · ~470 stars in under a week · early alpha

Official repo · mikehasa/agentacct

“Private by design”: state is plain local files, the dashboard binds to 127.0.0.1 and there is no phone-home.

⚙️ How to install it and try it safely

Installation is one pipx command plus a once-per-machine onboarding: `agentacct onboard` detects the coding-agent logs on the machine, sets up the global store, runs a first usage sync and starts the dashboard at `http://127.0.0.1:8765`. One well-documented detail: MCP servers and hooks bind at session start, so the first recorded task will come from the next agent session, not from the one that ran the onboarding.

If you want to look around before touching real data there's `agentacct demo`: a local walkthrough in a throwaway temporary store, with no keys and no paid API calls. The managed runtime is controlled with `start`, `status`, `stop` and `repair`, and if you prefer a per-repository install you can run `agentacct onboard --scope project`.

Install and first run
# Install (once per machine)
pipx install agentacct
agentacct onboard        # detects logs, sets up the store, starts the dashboard

# Dashboard: http://127.0.0.1:8765
# Then open a NEW agent session in any repo

# Just want to look around first? Safe walkthrough in a temporary store:
agentacct demo

Install runbook · INSTALL.md

The global onboarding writes zero files into your repo; the default store lives in ~/.local/state/agentacct/state.

🧭 How it works: two evidence streams and a labeled join

The architecture keeps two streams separate. The first is “usage truth”: tokens read from the clients' own session files, imported exactly as the clients report them. The second is “work meaning”: the sections and events the agent records over MCP while it works (`agentacct_record_section`, `agentacct_record_machine_check`), plus machine checks like test runs.

The join between the two streams does not guess: it goes through real session and transcript ids. For Claude Code, a hook installed at onboarding captures the ids at session start and on every tool call; for Codex, the link is evidenced from the client's own session logs at import time. Every attribution carries a confidence label — `exact`, `high`, `medium` or `low` — and when the proof isn't there, the dashboard shows the unattributed data instead of forcing the link.

From session log to dashboard
  1. 01
    Local logsClaude Code and Codex write their session files as usual
  2. 02
    Read-only importagentacct reads them and imports tokens as client_reported
  3. 03
    Work over MCPThe agent records work sections and machine checks as it goes
  4. 04
    Confidence-labeled joinUsage and work link on real ids: exact/high/medium/low
  5. 05
    Local dashboardTasks, tokens, estimated costs and evidence on 127.0.0.1:8765

Two evidence streams kept separate and a labeled join: missing attribution beats wrong attribution.

🏠 Local-first for real: privacy as architecture

The project's sharpest choice is that there is no hosted version of anything: no cloud dashboard, no account, no automatic sync, no telemetry. State is plain local files, the dashboard binds to `127.0.0.1` and the tool never asks for, stores or echoes provider API keys. Even the monitoring is explicitly non-silent: agentacct only reads the local session files of detected clients and never watches unrelated processes started outside its integrations.

It's a stance that flips the industry default, where agent-observability tools are almost always born as SaaS. Here the question “where do the data about my development sessions end up?” has a short answer: nowhere, they stay on the machine.

SaaS observability vs agentacct

Typical hosted dashboard

  • Account and session data in the vendor's cloud
  • Often needs your API key or a proxy on the calls
  • Telemetry and retention decided by the vendor
  • Aggregate numbers, provenance rarely explicit

agentacct (local-first)

  • Everything on 127.0.0.1, state in readable local files
  • Read-only over logs the clients already write; never API keys
  • No telemetry, no account, no cloud sync
  • Every number labeled: explicit provenance and confidence

Privacy isn't a feature but the architecture: session data never leaves the machine.

🏢 Why it's interesting, for developers and SMBs

For developers, agentacct turns a feeling into numbers: how many tokens that subagent-heavy workflow really burns, how a long session compares to many short ones, which model is eating the week's budget. And the notion of evidence is precious day to day: the difference between “the agent says it fixed it” and “the test passed, and it's on record” is exactly the control you need when delegating a lot of work to the machine.

For an SMB bringing agents into its development processes, this is about cost governance and accountability. Usage-based plans make agent spend a real budget line, but without visibility it's impossible to see what drives it; a dashboard that stays in-house also avoids shipping to a third-party SaaS the metadata of development sessions — which say a lot about the code being worked on. With one honest caveat: agentacct shows pricing-table estimates, not invoices; for contractual spend, the provider's portal is the source of truth.

⚠️ Limits and caveats before adopting it

The project is explicitly early alpha and interfaces may change. Support is “per capability, not per logo”: Claude Code and Codex have the most complete observation paths today, while other clients (Cursor, OpenCode and the like) have narrower, explicitly scoped paths — the per-client matrix in INSTALL.md and `agentacct capabilities agents` tell the truth for your machine.

Transparency cuts the other way too: costs remain local estimates (there is no access to subscription invoices), tokens are whatever the clients report in their own logs, and onboarding touches the clients' user configuration — hooks and MCP in `~/.claude`, `~/.codex/config.toml` — all documented in detail together with the uninstall procedure, but worth knowing before running it on a work machine.

  • Early alpha: interfaces and store may change between releases; the store has already moved path once historically.
  • Estimates, not invoices: costs come from a local pricing table and are labeled as estimates; real spend is certified by the provider.
  • Per-capability support: Claude Code and Codex well covered; other clients have narrower paths, declared in the matrix.
  • Requirements: Python >= 3.11, macOS or Linux; Windows only via WSL.
  • Touches client config: onboarding installs hooks and an MCP server in the user configuration; removal is documented.

✅ Where to start

The path I suggest has three steps. First: `agentacct demo`, to understand what the dashboard shows without touching real data. Second: the real onboarding on a development machine, followed by a few days of normal work with Claude Code or Codex — that's when tasks start filling up with work steps and evidence. Third, the most interesting read for anyone designing tools: the truth table in `docs/usage-truth-table.md`, which documents precisely what each observation path can and cannot prove.

The broader signal is that the agent ecosystem is entering its accounting phase: after the race to make agents work, comes the question of what they produce and at what cost. That one of the first serious tools to answer it is local, read-only and obsessed with data provenance is good news for how this category is taking shape.

Frequently asked questions about agentacct

What is agentacct and what is it for?

It's a local-first dashboard for coding agents: it reads the session logs Claude Code and Codex already write on your machine, joins them with the work the agent records over MCP and shows tokens, estimated costs, tasks and evidence at http://127.0.0.1:8765. It answers, with data, the question “what did the agents do and what did it cost”, with no account, cloud or telemetry.

Does agentacct need my API keys?

No, never: it does not store, request or echo any provider key. It works read-only over the clients' local session files, and the costs it shows are estimates computed from a local pricing table, labeled as such — not provider invoices.

How reliable are the numbers it shows?

Every figure declares its provenance: tokens imported from logs are labeled client_reported, costs are pricing-table estimates, and every link between usage and work carries a confidence label (exact, high, medium, low). A passing test is Verified evidence; the agent's own claim stays Agent reported. When a link cannot be proven, the dashboard shows the unattributed data instead of guessing.

Which agents and operating systems does it support?

The most complete observation paths today cover Claude Code and Codex; other clients such as Cursor and OpenCode have narrower, explicitly scoped paths, declared in the capability matrix in INSTALL.md (the agentacct capabilities agents command prints it for your machine). It requires Python 3.11 or newer on macOS or Linux; Windows is supported only via WSL.

Let's talk

If this topic is relevant to you, write to me: comparing notes on code and AI is always time well spent.

All articles

More articles from the blog

claude-code-github-actions-pr-review-2026.mdJuly 30, 2026semantic-caching-llm-dotnet-redis.mdJuly 27, 2026tips-claude-claude-md-luglio-2026.mdJuly 24, 2026