Track the cost, usage, and ROI of your AI coding agents across every tool.
Project description
Agent-ROI
Track the cost, usage, and ROI of your AI coding agents — across every tool.
What is Agent-ROI?
When you use multiple AI coding tools — Claude Code, Codex CLI, GitHub Copilot, Cursor, and others — your token spend is scattered everywhere and impossible to evaluate. Agent-ROI unifies all of it.
It reads the local session logs each tool already writes, uses a model-free semantic classifier to discover what topic / task each session was about, and then shows you how many tokens each topic consumed — so you can measure the return on investment of your agents, not just raw token counts.
The core question Agent-ROI answers: "For this feature / bug / topic, how many tokens did my agents burn — and was it worth it?"
Features
- 🔌 Tool-agnostic collectors — parse local logs from Claude Code, Codex CLI, GitHub Copilot, and Gemini CLI (no proxy, no workflow change).
- 🧠 Topic classification — a model-free semantic classifier groups sessions by topic so you see cost per subject, not per request. Runs fully offline, costs nothing, requires no external service.
- 💰 Cost & ROI tracking — token usage mapped to per-model pricing, aggregated by topic, tool, or model, over a custom time window.
- 🔎 Drill-down & trust — click any topic to see which tools and models its tokens came from; every figure is backed by a viewable pricing table, and estimated numbers are clearly badged vs exact ones.
- 🖥️ CLI —
report, per-topic drill-down, and apricingcommand straight from the terminal. - 🌐 Web UI — a modern React dashboard with dimension/time controls, breakdowns, and drill-downs.
- 🗄️ Local-first — everything stays on your machine (SQLite); fully offline; classification never sends data anywhere.
Architecture
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Collectors │──▶│ Classifier │──▶│ Storage │
│ (parse logs) │ │ (semantic) │ │ (SQLite) │
└──────────────┘ └──────────────┘ └──────┬───────┘
│
┌──────────────────┼──────────────────┐
▼ ▼
┌────────────┐ ┌────────────┐
│ CLI │ │ REST API │──▶ Web UI (React)
└────────────┘ └────────────┘
See docs/architecture.md for details.
Install
One line (macOS / Linux / WSL). Installs uv if needed, then the agent-roi command:
curl -LsSf https://raw.githubusercontent.com/Agent-ROI/agent-roi/main/scripts/install.sh | sh
Other ways to install
# With pipx
pipx install agent-roi
# With uv
uv tool install agent-roi
To install the latest from source before a release is published, set
AGENT_ROI_FROM_GIT=1 before running the install script.
Quick Start
# Ingest logs from all detected tools
agent-roi ingest
# Discover topics from your sessions (model-free, fully local)
agent-roi classify
# Cost breakdown — group by topic, tool, or model, over a time window
agent-roi report --by tool --since 7d
# Drill into one topic: which tools/models did its tokens come from?
agent-roi topic "auth refactor"
# Inspect the pricing table behind every cost figure
agent-roi pricing
# Launch the web dashboard (API + React UI), then open http://127.0.0.1:8000
agent-roi serve
Developing Agent-ROI itself? See CONTRIBUTING.md — local dev uses
uvand runs the frontend on a separate Vite dev server.
Configuration
Agent-ROI looks for config at ~/.config/agent-roi/config.toml. See docs/configuration.md.
[classifier]
similarity_threshold = 0.18 # higher = more, smaller topics
label_terms = 3 # words used to name each topic
[collectors]
enabled = ["claude_code", "codex", "copilot", "gemini"]
Documentation
| Doc | English | 繁體中文 |
|---|---|---|
| Architecture | architecture.md | architecture.zh.md |
| Configuration | configuration.md | configuration.zh.md |
| Collectors | collectors.md | collectors.zh.md |
| Contributing | CONTRIBUTING.md | CONTRIBUTING.zh.md |
Contributing
Contributions are welcome! Please read CONTRIBUTING.md and our Code of Conduct.
License
MIT © Agent-ROI contributors
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_roi_tracker-0.1.0.tar.gz.
File metadata
- Download URL: agent_roi_tracker-0.1.0.tar.gz
- Upload date:
- Size: 216.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d87414b8466f9a961030421cb3431498c3995b989f34fa5ab9be3ee88cf2901
|
|
| MD5 |
db77e02ceae588d1553b713d3f66aef1
|
|
| BLAKE2b-256 |
ba799ecf054ddabd40a4cef402559ab93d9015c97c394bdf1366a115deb1a535
|
File details
Details for the file agent_roi_tracker-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agent_roi_tracker-0.1.0-py3-none-any.whl
- Upload date:
- Size: 43.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65153481a6ee296be58627c6b67dd37c1bfe7719875635b3333f057fb0a428ab
|
|
| MD5 |
bc30e779b197b1c28eb8761d62cd1e79
|
|
| BLAKE2b-256 |
18165f0c34748db865e4612d037f065682ce7b38f1054e0d48c7fafe57f4fe5e
|