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.2.tar.gz (30.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.1.2-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentabacus-0.1.2.tar.gz
  • Upload date:
  • Size: 30.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.1.2.tar.gz
Algorithm Hash digest
SHA256 377b069292943928b1ae2cdfdf8cf6d81a6ce9e42aa9001471c7a94b42eed06a
MD5 17692cd028444df9ef0bcea82211033d
BLAKE2b-256 feecf07f8e9e8b1a44ea508c327e6cf330374d1da16761b5ed7b5ac809418a25

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: agentabacus-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 32.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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a60779f46c7469ce85af6614602a9644cc0701a914971b4eb02e940d36459b5d
MD5 1c9413143065dd0e898ae78d6b6f20a7
BLAKE2b-256 2f481301bcc3f683fa4fb804bfa36651a169d01dbc59bce9314d4c962c9fe00b

See more details on using hashes here.

Provenance

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

0.2.0

2 files

0.1.3

2 files

This release

0.1.2 This release

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