Observability that runs on localhost
A local flight recorder for your AI coding agents.
It reads the session logs your coding agents already write — ten of them, from Gemini CLI and Cursor to Claude Code and Codex, plus the autonomous Hermes Agent — and replays every token, dollar, tool call and reasoning step in one dashboard. No SDK to wire up, no account, nothing uploaded.
Install from the command line:
$curl -fsSL https://tokenanalytics.app/install.sh | bash
MIT · runs offline · needs Node 18+ and Python 3.9+
The whole setup is a single command
It reads what your agents already record.
No instrumentation, no wrapper SDK, no API keys. Your agents write session logs to disk as they run — TokenAnalytics just learns to read them.
Install once
Run one script — install.sh. It sets up the reader and a local dashboard in about a minute. No config files to edit.
Keep working
Use Claude Code, Codex or Cursor exactly as before. They log to ~/.claude, ~/.codex and friends. TokenAnalytics watches those files — strictly read-only, never touched.
Open the dashboard
Visit localhost:3000. Sessions, tokens, cost and full traces are already there, refreshing every fifteen seconds.
Three surfaces, one source of truth
From a number on a card to a single reasoning token.
Start at the fleet view, drill into where the budget went, then replay a single session move by move. Every screen below is the real app — the close-ups are real readings.
Your whole agent fleet, at a glance.
One live screen for every tool you run, refreshing on its own. The numbers move as your agents work.
- Live count of active traces across every detected agent, with a 15-second heartbeat.
- Totals for sessions, token burn and estimated spend — no spreadsheet required.
- Agent and model leaderboards so you see who's doing the work and what it costs.
126 sessions · 596.4M tokens — the live KPI strip, refreshing every 15 seconds.
Every agent counted: Claude Code 70, Codex 29, Cursor 24…
Where the budget actually goes.
Tokens by agent, by model, by day — and the cache efficiency that quietly decides your bill.
- A daily token chart that shows exactly which days got expensive.
- A per-model breakdown — tokens, cache and dollar cost side by side, ranked by usage.
- All of it computed on your machine — the analysis never phones home.
48.2M in · 34.4M out · 88.5% served from cache — your spend after the discount.
Per-agent cost, line by line — Codex $294.23, Claude Code $2,752.98.
Replay any session, step by step.
Scrub through a run like a recording: every prompt, tool call, result and reasoning block, in order.
- Step-by-step playback with kind-aware highlighting — reasoning, tool calls and responses each read differently.
- Tool calls paired with their results and timing as a waterfall.
- Encrypted reasoning is labeled honestly — never faked, never invented.
322 steps · 75 tools · 451,741 output · 331,500 cached on this run.
Every move in order — reasoning, tool calls and responses — a replayable step index.
One reading, every agent
Ten coding agents — and one that breaks the mold.
Each agent keeps its own identity colour throughout the app, so a glance tells you who did what. Hermes Agent is autonomous, not a coding CLI, so it gets a dashboard of its own.
Not another SaaS dashboard
Built for coding agents — and only your machine.
Langfuse, LangSmith and Helicone are excellent platforms for instrumenting an app you're shipping. TokenAnalytics is for the agents on your own laptop: no SDK to add, no account, no cloud.
| TokenAnalytics | Langfuse | LangSmith | Helicone | |
|---|---|---|---|---|
| Runs locally with zero setup | ✓ | — | — | — |
| Reads logs your agents already write | ✓ | — | — | — |
| No SDK, no code changes | ✓ | — | — | — |
| No account required | ✓ | — | — | — |
| Purpose-built for coding agents | ✓ | — | — | — |
| Free & open source (MIT) | ✓ | Freemium | Freemium | Freemium |
Nothing leaves the instrument
Your code, prompts and costs stay yours.
Local by construction
The reader opens local files and serves a UI on localhost. There's no server to upload to.
Read-only access
Log files are read, never modified. Your agents don't know it's there.
One optional ping
An hourly GitHub update check — version only, no usage data. Turn it off with TT_NO_UPDATE_CHECK=1.
leaves_machine: { "update_check": "GET github.com /releases", "version_only": true } never_leaves: { "source_code": blocked, "prompts": blocked, "file_paths": blocked, "token_counts": blocked, "dollar_costs": blocked }
Before you install
Questions worth answering up front.
What exactly is TokenAnalytics?
How does it track Claude Code without any setup?
~/.claude/ as it runs. TokenAnalytics watches that folder, parses each session and shows it at localhost:3000. You don't instrument anything — just keep coding.Does any of my data go to the cloud?
TT_NO_UPDATE_CHECK=1.Which agents are supported?
/hermes.How is this different from Langfuse or Helicone?
Why does Hermes Agent get its own page?
Point it at your machine.
See where the tokens went.
One command to install, then it just sits there reading. Free, open source, and offline by default.
macOS · Linux · Windows — one command, no account