Skip to main content

ai-agents-metrics

CI PyPI Downloads License Python

Analyze your AI agent work history. Track spending. Optimize your workflow.

AI is writing more of your code. You still don't know:

  • How many attempts each task actually takes
  • Where the process breaks down and why
  • Whether your workflow is getting faster or generating more rework

ai-agents-metrics extracts these signals from your existing Claude Code or Codex history — no manual setup required. Point it at your history files and see what's happening: retry pressure, token cost, session timeline. For richer tracking, add explicit goal boundaries and outcome labels on top.

HTML report preview — 5 charts over 25 goals, 243 practice events, 16 days

Running this on 6 months of Claude Code + Codex history (3.85B tokens, 160 threads) surfaced:

  • 100% of Claude "retries" are subagent spawns, not user retries — attempt_count > 1 is structural, not a failure signal (F-001)
  • Subagent delegation halves main-session tokens within-thread — median 2.05× compression, p = 0.000456 (F-007)
  • Per-skill compression ranking — Explore 2.63×, code-reviewer 3.25×, commit 0.72× (F-008)

Full index: docs/findings/. N=1 developer; the mechanisms generalize because they come from the tools, not the data.


Quick start

pipx install ai-agents-metrics

ai-agents-metrics history-update     # reads ~/.codex + ~/.claude by default
ai-agents-metrics show               # retry pressure, cost, session timeline
ai-agents-metrics render-html        # interactive HTML report

Non-default history paths, full command list, and manual goal tracking (optional): CLI reference.


What you get

  • History extraction — retry pressure, token cost, model usage from existing session files. No setup.
  • HTML report — one self-contained file, summary strip + 5 trend charts, opens in any browser.
  • Optional manual tracking — add goal boundaries and outcome labels on top of history for per-task breakdowns.

Not a benchmark, not an eval framework, not a model comparison tool. It is a local analysis tool for real engineering work done with AI.


Privacy

All data stays local. Writes only to:

  • .ai-agents-metrics/warehouse.db — local SQLite warehouse used by the history pipeline
  • metrics/events.ndjson — append-only event log for manual goal tracking (opt-in)
  • docs/ai-agents-metrics.md — optional markdown export (regenerated on demand)

No data is sent to any remote service.


Metadata

Release files for ai-agents-metrics 0.2.2

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

Source distribution (sdist)

Source distribution for ai-agents-metrics 0.2.2
File Size Uploaded
ai_agents_metrics-0.2.2.tar.gz 470.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ai-agents-metrics 0.2.2
File Interpreter ABI Platform
ai_agents_metrics-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 621.8 kB

Release files / ai_agents_metrics-0.2.2.tar.gz

Download URL ai_agents_metrics-0.2.2.tar.gz
Size 470.5 kB
Tags Source
SHA-256 checksum
How to use checksums
228b290c8f5c2c525a68dfa19bb4632a3590ec912f7ed43675950a2aae3acbc7
BLAKE2b-256 checksum
How to use checksums
884fe10873076e25e85826c279e632f28788b0a854317d2692fad4f9cd7b6f39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 21, 2026.

Transparency log

Release files / ai_agents_metrics-0.2.2-py3-none-any.whl

Download URL ai_agents_metrics-0.2.2-py3-none-any.whl
Size 151.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
994a50360a5d702de0e02cf199575cef01a4bd0a120efa54f83fd0ced4c21603
BLAKE2b-256 checksum
How to use checksums
e09298c72ec0ad1f6024048c161ea3c8b2388c5a1a8d0fea8f86f5b0739bbf91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

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