https://github.com/luoyuctl/agenttrace
đ AI Agent Session Performance Analyzer â find hanging, token waste, thinking redaction, and quality regressions in your AI coding sessions.
https://github.com/luoyuctl/agenttrace
Last synced: 3 days ago
JSON representation
đ AI Agent Session Performance Analyzer â find hanging, token waste, thinking redaction, and quality regressions in your AI coding sessions.
- Host: GitHub
- URL: https://github.com/luoyuctl/agenttrace
- Owner: luoyuctl
- Created: 2026-05-01T04:29:32.000Z (22 days ago)
- Default Branch: master
- Last Pushed: 2026-05-01T11:08:56.000Z (21 days ago)
- Last Synced: 2026-05-01T11:35:35.538Z (21 days ago)
- Language: Go
- Size: 1.67 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-claude-code-and-skills - luoyuctl/agenttrace - square) (Productivity Tools / Monitoring & Observability)
- Awesome-AI-Agents - agenttrace - Local-first TUI observability for AI coding agent sessions, with cost, token, tool failure, latency, anomaly, health score, diff, and CI gate views.  (Applications / Tools)
- awesome-x-ops - agenttrace - first TUI for inspecting AI coding agent cost, tokens, latency, failures, and reports. (LLM and Agent Observability)
- awesome-ai-engineering - agenttrace - first TUI and CLI for inspecting AI coding agent logs, token usage, cost, latency, and session health (LLM Development and Optimization / LLM Testing and Evaluation)
- awesome-openclaw - agenttrace - agent session history, with cost, token, latency, anomaly, and slow-run diagnostics. | (Community Projects / Monitoring & Tools)
- awesome-ai - luoyuctl/agenttrace - agent session history â`36` (AI Coding Agents / Claude Code)
- awesome-ai-testing - agenttrace - Local-first TUI and CLI for evaluating AI coding agent sessions with cost, token, latency, and failure regression gates. (Test Analytics and Triage)
- awesome-observability - agenttrace - TUI observability for AI coding agents. Tracks cost, tokens, tool failures, anomalies, health, and CI gates across Claude Code, Codex, Gemini CLI, Aider, and Cursor exports. (10. LLM & AI Observability / Cost & Usage Tracking)
- awesome-codex-workflows - luoyuctl/agenttrace - Local-first session audit tool for Codex and other coding agents, turning run logs into operational evidence for post-run review, baseline comparison, and CI gates across spend, token use, timing, health, and tool failures. (Workflow Infrastructure & Design)
- awesome-llm-cost - agenttrace - Local-first TUI and CLI that turns AI coding agent trace logs into cost, token, latency, and health regression reports. (Cost Tracking, Observability, and Budgets / Open source)
- awesome-ai-tools - agenttrace - source observability and audit trail for AI coding agent sessions | (đ ī¸ Developer Productivity & Workflow)
- awesome-claude-code-toolkit - agenttrace
- awesome-gemini-cli - agenttrace - Local-first TUI for Gemini CLI and AI coding agent session observability. Parses local logs for cost, tokens, tool failures, latency, anomalies, health gates, and diffs across Gemini CLI, Claude Code, Codex CLI, Aider, Cursor exports, OpenCode, and more. (Development Tools & Utilities)
- awesome-AI-driven-development - agenttrace - Local-first TUI observability for AI coding agent sessions across Claude Code, Codex CLI, Gemini CLI, Aider, Cursor exports, and more. (Code Analysis & Search / Other IDEs)
- awesome-vibe-coding-resources - agenttrace - Local TUI for inspecting AI coding-agent session logs, usage, cost, latency, tool failures, diffs, and CI gates. (Command Line Tools)
- awesome-ChatGPT-repositories - agenttrace - TUI observability for AI coding agents: trace cost, tokens, tool failures, latency, anomalies, health, diffs, and CI gates across Claude Code, Codex CLI, Gemini CLI, Aider, Cursor exports, and more. (CLIs)
- awesome-ai-dev-tools - agenttrace - A local-first TUI for inspecting AI coding agent sessions across Claude Code, Codex CLI, Gemini CLI, Aider, Cursor exports, Hermes, OpenCode, Kimi, and Copilot-style logs, surfacing cost, cache usage, failures, latency, anomalies, health gates, and diffs. (đ Tools / đ What You'll Find Here:)
- awesome-cli-tui-software - luoyuctl/agenttrace - TUI observability for AI coding agents: trace cost, tokens, tool failures, latency, anomalies, health, diffs, and CI gates across Claude Code, Codex CLI, Gemini CLI, Aider, Cursor exports, and more. (<a name="monitoring"></a>monitoring)
- awesome-go-tools - agenttrace - Local TUI for inspecting AI coding-agent session logs, token/cost usage, tool failures, latency, diffs, and CI gates. (DevOps Tools / Contents)
- charm-in-the-wild - agenttrace - TUI observability for AI coding-agent sessions. (_built with Bubbles, Bubble Tea and Lip Gloss_) (Applications / AI)
- awesome-codex-cli - agenttrace - Local TUI for inspecting AI coding-agent session logs, usage, cost, latency, tool failures, diffs, and CI gates. (Tools / Stat)
README
AgentTrace
Review AI coding agent history across cost, tokens, and time, then find why a run was slow.
English | įŽäŊ䏿
---
**agenttrace** is a local TUI and report generator for AI coding agent session history. It reads Claude Code, Codex CLI, Gemini CLI, Qwen Code, Cursor, Aider, OpenCode, OpenClaw, Hermes Agent, Kimi CLI, and Copilot-style logs, then helps with two daily jobs: see what multiple agents spent across cost, tokens, and time; and diagnose why a task ran slowly.
## Why agenttrace?
AI coding agents now behave like small build systems: they call tools, retry, stall, and spend tokens while you only see the final answer.
**agenttrace** reads the logs your agents already write and puts cost-heavy or slow sessions first.
It helps you answer:
- **What did my agents spend?** Compare historical sessions by agent source, model, input/output/cache tokens, estimated cost, and wall-clock time.
- **Why was this task slow?** Catch long gaps, hanging sessions, retry loops, slow tool calls, large parameters, and context pressure.
- **What should I inspect first?** Rank sessions by cost, duration, turns, health, failures, anomalies, model, source, or text search.
- **Can I inspect this privately?** Everything runs locally; prompts, code, and logs do not need to leave your machine.
## Real local run
These screenshots were captured from a local run against real session logs. They are not `--demo` output and not test fixtures.
```bash
agenttrace
```
| Overview | Critical sessions |
|---|---|
|
|
|
| Session detail | Diagnostics |
|---|---|
|
|
|
That local run found:
```text
AGENTTRACE v0.4.5
```
| Signal | What agenttrace found |
|---|---:|
| Analyzed sessions | 1,761 |
| Total tokens | 9.13B |
| Estimated cost | $5,037.26 |
| Tool failure rate | 1.1% |
| Critical sessions | 16 |
| Average health | 91% |
## Install
```bash
curl -sL https://raw.githubusercontent.com/luoyuctl/agenttrace/master/install.sh | sh
```
Other install paths:
```bash
brew install luoyuctl/tap/agenttrace
go install github.com/luoyuctl/agenttrace/cmd/agenttrace@latest
```
Windows:
```powershell
iwr -useb https://raw.githubusercontent.com/luoyuctl/agenttrace/master/install.ps1 | iex
```
The npm wrapper is also available as `agenttrace` after each release is published.
## Common workflows
```bash
# Open the local TUI
agenttrace
# Check detected agent directories and cache state
agenttrace --doctor
# Generate machine-readable evidence
agenttrace --overview -f json
# Create a self-contained report for CI artifacts or issue links
agenttrace --overview -f html -o agenttrace-overview.html
# Fail CI on unhealthy agent runs
agenttrace --overview \
--fail-under-health 80 \
--fail-on-critical \
--max-tool-fail-rate 15
```
## Supported logs
agenttrace supports local sessions from:
Claude Code, Codex CLI, Gemini CLI, Qwen Code, Cline, Aider, Cursor exports, Hermes Agent, OpenCode, OpenClaw, Oh My Pi, Kimi CLI, Copilot-style logs, and generic JSON/JSONL traces.
## What you get
| Need | agenttrace gives you |
|---|---|
| Historical spend review | Sessions grouped across agents with token totals, model pricing, estimated cost, and elapsed time |
| Slow-task diagnosis | Latency stats, long gaps, hanging sessions, retry loops, slow tools, large params, and context pressure |
| First-session triage | Sort and filter by cost, duration, health, failures, anomalies, model, source, or text search |
| Shareable evidence | JSON, Markdown, and self-contained HTML reports |
| Local-first inspection | No hosted backend required |
## Docs
- Site: https://luoyuctl.github.io/agenttrace/
- Sample HTML report: https://luoyuctl.github.io/agenttrace/demo-report.html
- CI setup: [docs/ci-integration.md](docs/ci-integration.md)
- Cursor import: [docs/cursor-import.md](docs/cursor-import.md)
- Parser guide: [docs/parser-guide.md](docs/parser-guide.md)
- Launch notes: [docs/launch-kit.md](docs/launch-kit.md)
Listed in [Awesome Gemini CLI](https://github.com/Piebald-AI/awesome-gemini-cli), [Charm in the Wild](https://github.com/charm-and-friends/charm-in-the-wild), and [Awesome Claude Code and Skills](https://github.com/GetBindu/awesome-claude-code-and-skills).
## Contributing
Parser PRs are welcome. A good parser contribution usually includes:
- a tiny redacted fixture or synthetic sample
- format detection in `DetectFormat`
- role, timestamp, model, token usage, tool call, and tool error extraction
- tests for successful parsing and malformed input
Run before sending a PR:
```bash
go test ./...
go build -o agenttrace ./cmd/agenttrace/
./agenttrace --doctor
```
See [CONTRIBUTING.md](CONTRIBUTING.md) for the full contribution flow.
## License
[MIT](LICENSE) Š 2026 agenttrace contributors