Skip to main content

agentacct

tests PyPI Python License: MIT

See what your coding agents actually did — and what it cost — in a live terminal dashboard that never leaves your machine.

agentacct is local-first Agent Work Intelligence for coding agents. It reads the session logs that Claude Code and Codex already write on your machine, joins them with the work each session records as it goes, and shows the result — usage, estimated cost, provider limits, and the work itself — in agentacct tui, a live terminal dashboard. No browser, no server, no account.

agentacct tui — live usage, cost, provider rate-limit bars, and recent sessions with per-session weekly-plan-cost estimates

Private by design. Everything stays on your machine: state is plain local files, nothing binds a network port, and there is no phone-home telemetry, no account, no cloud sync. agentacct never stores or requests a provider API key.

Screenshots show a synthetic demo workspace; your dashboard renders your machine's real local data.

What you get

Run agentacct tui for a live, in-terminal view — usage windows, provider rate-limit bars with reset countdowns, and your recent sessions. Press s to drill into the sessions, u for the usage screen, q to quit.

  • Honest usage and cost. Tokens per agent, model, and day — read from the clients' own local session files and labeled client_reported; costs are clearly marked pricing-table estimates, never invoices.

  • The work, not just the tokens. Every session rolls up its recorded work steps and machine checks — a passing test is Verified evidence, an agent's own claim stays labeled Agent reported. Open a session to see each step, its status (in progress / handed off / done / blocked), and its check results with exit codes:

    agentacct tui session detail — the per-step work ledger with pass/fail check evidence and a weekly-plan-cost estimate

  • Attribution you can trust. Every join between usage and recorded work carries a confidence label (exact/high/medium/low). Missing attribution beats wrong attribution: when agentacct cannot prove a link, it shows the gap instead of a guess. Press s for the honest per-session roll-up — tokens, cost, and steps, joined to the session that actually ran them:

    agentacct tui sessions list — per-session tokens, cost, status, and step counts

  • Plan-cost estimate (beta). From your own recorded usage-limit history, agentacct estimates what fraction of your weekly Claude subscription each task consumed — the plan column on the home panel and the ≈ X% of your weekly plan line on the session detail. Because different models burn the plan at very different rates, it weights per model from a measured baseline and self-calibrates to your account as more limit history accrues (works from Codex and the Claude CLI status-line too, not just the desktop app). Always labeled an estimate.

Install

Requires Python >= 3.11 on macOS or Linux; Windows is supported only via WSL.

pipx install agentacct
agentacct onboard   # once per machine (global by default)
agentacct tui       # the live terminal dashboard

No pipx yet? Install it first with brew install pipx (macOS) or python3 -m pip install --user pipx — or skip pipx entirely and use uv tool install agentacct. See INSTALL.md for a plain-venv fallback.

onboard installs agentacct once per machine (global by default, writing zero files into your repo): it detects your local coding-agent logs, sets up a global store, and runs a first usage sync. Then run agentacct tui for the live terminal dashboard (onboarding also starts an optional browser dashboard at http://127.0.0.1:8765). Open a new agent session in any repo — MCP servers and hooks bind at session start, so the session that ran onboarding cannot become the first recorded Task. (Prefer a per-repo install? Run agentacct onboard --scope project instead.)

Prefer to let the agent do it? Paste this into your coding agent:

Install and set up agentacct — a local-first dashboard that reads my
coding-agent logs read-only and shows honest token usage and cost.

Run `pipx install agentacct`
(or `pipx install git+https://github.com/mikehasa/agentacct`),
then `agentacct onboard` (installs once per machine, global by default, zero
files written into the repo), then tell me the dashboard URL.

Observe-only: never store, request, or echo any API key; all state stays local
on this machine. Don't modify my global client config without showing the exact
command first.

The agent then follows INSTALL.md, the canonical runbook: the global install, the manual per-client setup, and the full per-client capability matrix. agentacct setup prompt --agent <client> prints the same prompt.

Want to look around before touching your real data? agentacct demo runs a safe local walkthrough in a throwaway temporary store — no provider keys, no paid API calls.

The managed runtime is controlled with agentacct start / status / stop / repair; all state lives in the global store (by default ~/.local/state/agentacct/state; older global stores under ~/.agent-sentinel-global/state are still recognized). A --scope project install keeps its state in the repo's .agent-sentinel/ directory instead (gitignored; the directory keeps its pre-rename spelling for data compatibility).

Uninstall

agentacct stop                 # stop the managed sync + dashboard (owned processes only)
agentacct uninstall-autostart  # only if you installed autostart
pipx uninstall agentacct

Then remove what onboarding added. For a global install (the default): delete the global store (~/.local/state/agentacct/state — keep it if you want the history) and the agentacct entries in your user config (~/.claude.json, the merged blocks in ~/.claude/settings.json, the ~/.claude/hooks/ wrapper, and ~/.codex/config.toml). For a --scope project install: delete that repo's .agent-sentinel/ directory (that project's local ledger) and the agentacct entries onboarding added to .mcp.json / .claude/settings.local.json / ~/.codex/config.toml. If you installed the standing instruction block, remove it first with agentacct setup instructions --agent <client> --user --remove.

What it is honest about

agentacct is early alpha, and it would rather show you a gap than a guess:

  • No hosted anything. No hosted dashboard, no phone-home telemetry, no automatic cloud account sync. agentacct can receive telemetry locally when you explicitly point an OTLP exporter at it.
  • Estimates are labeled as estimates. There is no exact Claude Code/Codex subscription invoice access; costs come from a local pricing table and are labeled accordingly. See docs/usage-truth-table.md for what each path can and cannot prove.
  • No silent monitoring. agentacct only reads the local session files of detected clients and never watches unrelated processes started outside agentacct/integrations. Hard stops apply only to runs agentacct itself launched or the opt-in proxy path.
  • Support is per-capability, not per-logo. Claude Code and Codex have live-observed usage paths today; other clients (Hermes, OpenCode, OpenClaw, Cursor) have narrower, explicitly-scoped paths. The per-client claims are pinned in the capability matrix in INSTALL.md and docs/reference.md, and agentacct capabilities agents prints the same truth for your machine.

Interfaces may change while agentacct is alpha.

How it works

agentacct keeps two evidence streams separate and joins them on real client ids instead of guessing:

  • Usage truth comes from the client's own local session files: imported tokens are labeled client_reported, and costs are pricing-table estimates — never provider invoices.
  • Work meaning comes from 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 links the two through session/transcript ids and labels every attribution exact, high, medium, or low. For Claude Code, an installed hook bridge captures real session/transcript 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.

The per-client join mechanics, confidence-label glossary, daily workflow, MCP tool list, and optional enforcement extras are in docs/reference.md.

Documentation

Development

See CONTRIBUTING.md for contribution scope, safety principles, and PR expectations.

Run tests from a clone (the pipx install above ships no test tooling):

python3 -m venv .venv
.venv/bin/python -m pip install -e .
.venv/bin/python -m pip install pytest
.venv/bin/python -m pytest tests/ -q --tb=short

Feedback

agentacct is early alpha. Useful feedback:

  • Which agent or tool do you use?
  • What runaway, cost, or observability issue did you hit?
  • Which join/attribution result looked wrong or missing?
  • What report would help you trust a run?
  • Which integration should be supported next?

Open an issue with a bug report, feature request, or integration request. Please scrub any provider API keys or private paths from logs before sharing them.

Metadata

Release files for agentacct 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentacct 0.7.0
File Size Uploaded
agentacct-0.7.0.tar.gz 1.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentacct 0.7.0
File Interpreter ABI Platform
agentacct-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.1 MB

Release files / agentacct-0.7.0.tar.gz

Download URL agentacct-0.7.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
26dc30320a5f51f47310953287490d3cbeb808b9adf9b5144dd95cdd977df7a8
BLAKE2b-256 checksum
How to use checksums
d3ae824d6dcd151eba4f4d3182cd752dbc0bba1fddde708ac6230b5eada104ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / agentacct-0.7.0-py3-none-any.whl

Download URL agentacct-0.7.0-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4c5d2c747d61b9a89dd98b4f8fe41e4b3d29f9db666d9a7784365b4ca3690086
BLAKE2b-256 checksum
How to use checksums
03e888606589c3e052d556eb61c7cdb37f09cb5d74320ab03b690c03521dcc2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release history Release notifications | RSS feed

0.12.9

2 release files

0.12.8

2 release files

0.12.7

2 release files

0.12.6

2 release files

0.12.5

2 release files

0.12.4

2 release files

0.12.3

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.9

2 release files

0.10.8

2 release files

0.10.7

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

This release

0.7.0 This release

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page