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.2.0.tar.gz (34.8 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.2.0-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agentabacus-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b1c203f1f6aef5a274254ad568aa431d58efe4982cecc2ac6c1bab787319b828
MD5 a4a6e24d5e556628043c4239681cfc1d
BLAKE2b-256 58cc2d7e1e14e1857af02efb6e390fc99ca529eb4c2ab1cbcb86a9f98476123f

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentabacus-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: agentabacus-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 34.1 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65c1e177d5b1c0fa41a2c6f71a462329d098036d655ddedeec4268169e80c054
MD5 a2387e3f354e8571766b20b1845e0591
BLAKE2b-256 e9b79a55d3a1d93c3d42d4e3ca7d863bb3e5ed0cbc0c4fd59f56ccd7cf8fd34f

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentabacus-0.2.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

0.3.0

2 files

This release

0.2.0 This release

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