Agent Lens
Local dashboard for visualizing usage across seven AI coding agents - sessions, token costs, cache performance, tool calls, and daily breakdowns
Install
npx github:naimjeem/agent-lensclaude mcp add agent-lens -- npx github:naimjeem/agent-lens{
"mcpServers": {
"agent-lens": {
"command": "npx",
"args": [
"github:naimjeem/agent-lens"
]
}
}
}Install command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →agent-lens
Local dashboard for visualizing usage across eight AI coding agents — sessions, token costs, cache performance, tool calls, and daily breakdowns. Filter by agent or view everything in one place.
Inspired by foyzulkarim/claude-lens.
Supported agents
| Agent | Default data path | Token data | Tool calls | Models |
|---|---|---|---|---|
| Claude Code | ~/.claude |
full | full | yes |
| Codex CLI | ~/.codex |
full | full | yes |
| Gemini CLI | ~/.gemini |
full | full | yes |
| OpenCode | ~/.local/share/opencode |
full (SQLite) | full | yes |
| Kimi Code | ~/.kimi |
partial (TurnBegin events) | partial | partial |
| Cursor | ~/Library/Application Support/Cursor/... (auto-detected per OS) |
full (SQLite cursorDiskKV) |
full | partial |
| Antigravity | ~/.gemini/antigravity |
session metadata only (protobuf) | — | — |
| GitHub Copilot | VS Code User/workspaceStorage/<hash>/chatSessions/*.{json,jsonl} (auto-detected per OS) |
session metadata + prompts (no token counts in chat JSON) | full | yes |
OpenCode and Cursor read SQLite via the optional better-sqlite3 dependency. If the prebuild fails on your platform the dashboard still works for the JSONL/JSON-based agents (Claude, Codex, Gemini, Kimi, Antigravity).
Features
- Agent selector — filter the entire dashboard by agent or aggregate across all
- Sticky topbar — animated brand mark, live KPI pills (today cost / today messages / total cost with day-over-day trend), refresh button, section-nav pills with scroll-spy
- Today vs All-Time stats — sessions, messages, tool calls, estimated cost, cache hit rate
- Charts & Metrics — pure inline-SVG (no deps), responsive via
ResizeObserver:- Daily Cost line chart
- Token Volume stacked bars (input / output / cache read / cache write)
- Activity by Hour and Weekday bars
- Agent / Model / Tool distribution donuts
- Cache performance — hit rate, savings vs no-cache baseline (uses the active agent's pricing)
- Daily cost & cache table — per-day token breakdown with estimated spend
- Tool call analytics — which tools each agent used most, click any tool for the call list with export
- Prompt history — searchable, project-tabbed, copy-to-clipboard per row
- Project activity — searchable, agent badges, last-active relative time
- Collapsible lists — projects / tools / history / daily-costs start collapsed with a gradient fade and a "Show all" pill (initial caps: 8 / 8 / 25 / 7)
- Live OpenRouter pricing — refreshes per-model rates in the background; env vars override
- Per-agent pricing — independent rate config per provider via
.env - Polish — skeleton shimmer loaders, friendly empty states, sticky table headers, zebra rows, tabular-num alignment,
prefers-reduced-motionsupport
Keyboard shortcuts
| Key | Action |
|---|---|
/ or Cmd/Ctrl-K |
Focus the prompt history search |
R |
Reload dashboard data |
Esc |
Clear and blur the focused search input |
HTTP API
The dashboard is plain JSON over HTTP — useful for scripting or integrations.
Similar plugs
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
Bash is all you need - A nano claude code–like 「agent harness」, built from 0 to 1
Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro,…
Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini…