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.

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
Cursor Open for contribution
Aider Open for contribution
Cline Open for contribution

More adapters are being added.

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.1.1.tar.gz (492.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.1.1-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentabacus-0.1.1.tar.gz
  • Upload date:
  • Size: 492.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.1.1.tar.gz
Algorithm Hash digest
SHA256 a657255704774619cf06fc7bfc1b39851adb039382ad856a05c8133ceb56b2a9
MD5 11451f1a62ca31cd2e4a0eb6d11998f9
BLAKE2b-256 d8ec23919b8ed9dfe55f4c91cde6d0a2323afb7c5d09d14429508adfe4008247

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: agentabacus-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 29.3 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90f3c6cd29c84fe7f7d067141a72b942b4e6407403649c05601eddf18d1b33e0
MD5 a6cbc4ed021326cafdf727f88d888dfe
BLAKE2b-256 963bf08a5fc5176471818abf8c1303c72243d7ff5a78d944e74683e3ac5b8ba8

See more details on using hashes here.

Provenance

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

Supported by

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