Skip to main content

agentabacus

agentabacus — local-first analytics for AI coding agents

PyPI CI Python License

Local-first analytics for AI coding agents.

AI coding agents generate session logs, but each agent stores them differently. agentabacus brings those logs into one local database so you can see:

  • What did I spend?
  • Which models are doing the work?
  • Which projects or sessions cost the most?
  • How much of the usage comes from subagents?
  • Where are tokens being spent?

No server. No account. No telemetry. Your data stays on your machine.

Install

Try it without installing:

uvx agentabacus report

Or install it permanently:

pipx install agentabacus

Then check what agentabacus can find:

agentabacus doctor

Collect your agent logs:

agentabacus collect

Collection is incremental, so you can safely run it again as new sessions are created.

To collect from one agent only, name it:

agentabacus collect --claude

With no agent flag, collect reads every supported agent found on your machine.

Reports

Get a cost and usage report:

agentabacus report

Filter by time:

agentabacus report --since 30d

Group the results:

agentabacus report --by model

Available groupings include:

source
project
branch
model
day
effort
speed
thread

For example, --by thread separates your main agent from its subagents.

Other commands

Find expensive sessions

agentabacus top --limit 10

Understand cache usage

agentabacus cache

Analyse tool calls

agentabacus tools

Export your data

Export to Parquet for use with your own analytics tools:

agentabacus export --format parquet

Query the data directly

The underlying data is stored in DuckDB:

agentabacus sql "SELECT * FROM turns LIMIT 10"

Supported agents

Agent Status
Claude Code ✅ Supported
Codex CLI Open for contribution
Gemini CLI Open for contribution
OpenCode Open for contribution
Cursor Open for contribution
Cline Open for contribution
Aider Open for contribution

agentabacus doctor detects every agent on this list that is installed on your machine, whether or not it is supported yet:

Supported agents
  Claude Code    163 log file(s)  /Users/you/.claude

Detected, not supported yet
  Codex CLI      /Users/you/.codex
  Gemini CLI     /Users/you/.gemini

  These agents keep logs on this machine, but agentabacus has no
  adapter for them yet, so nothing from them is collected.
  Adding an adapter is a single file:
  https://github.com/tripleaceme/agentabacus/blob/main/CONTRIBUTING.md

Nothing from an unsupported agent is ever parsed, stored, or counted. An adapter is either finished and trusted or it is not there — there is no half-supported state producing numbers you would have to decide whether to believe.

If one of these is yours, adding it is a single file.

How it works

agentabacus discovers session logs on your machine, parses them into a common schema, and stores the results in DuckDB.

Agent logs
    ↓
Discovery
    ↓
Adapters
    ↓
Normalized schema
    ↓
DuckDB
    ↓
Reports / SQL / Parquet

It also handles a few problems that can make agent usage data misleading:

  • Duplicate usage records in agent transcripts
  • Different cache pricing tiers
  • Subagent transcripts stored separately from the main session
  • Model pricing that changes over time

Data & privacy

Everything stays local.

By default, the database is stored at:

~/.agentabacus/agentabacus.duckdb

You can change the location with:

export AGENTABACUS_HOME=/path/to/data

agentabacus does not upload your prompts, responses, code, or usage data.

Prompt and response text is not stored. The database only keeps metadata such as hashes, counts, tokens, costs, and session information.

Claude Code auto-collection

Claude Code transcripts can be archived automatically when a session ends.

Install the plugin:

/plugin marketplace add tripleaceme/agentabacus
/plugin install agentabacus@agentabacus

Make sure agentabacus is available on your PATH:

pipx install agentabacus

No daemon or cron job is required.

For contributors

Agent logs are not stable APIs, so adapters are designed to tolerate format changes.

A new adapter generally needs:

  1. A parser
  2. Discovery support
  3. Registration in the adapter package

See the existing adapters for examples.

Install the development dependencies and run the tests with:

pip install -e ".[dev]"
python -m pytest

Roadmap

  • More agent adapters
  • Local dashboard
  • Edit-survival metrics
  • Warehouse exports
  • dbt integration
  • GitHub Actions for usage rollups

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentabacus-0.3.0.tar.gz (37.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentabacus-0.3.0-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

Details for the file agentabacus-0.3.0.tar.gz.

File metadata

  • Download URL: agentabacus-0.3.0.tar.gz
  • Upload date:
  • Size: 37.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agentabacus-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ead340b80f44951aa884539c0127b0e346313a13def026f747d006d2c8b238d1
MD5 7f2c3b1da9d156481a1359c57f4b0f13
BLAKE2b-256 823d416ad34f8b3367c2cf74e0e8ea47ce53dce983a83303a66884c0ebafaa63

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentabacus-0.3.0.tar.gz:

Publisher: release.yml on tripleaceme/agentabacus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentabacus-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: agentabacus-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agentabacus-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1d7cfb280c6787642ad9ff2142d5d061e2333a7f8c4b587f2e6b7244adc2024
MD5 c806107dd4d865721cb028886a86958f
BLAKE2b-256 5027ea51d83a157c141cec493fd663d3eeb6ffe6248eaae28d37b6967347cb70

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentabacus-0.3.0-py3-none-any.whl:

Publisher: release.yml on tripleaceme/agentabacus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page