agenttrace is a local-first terminal TUI and report generator for auditing the session history of AI coding Agents. The project is written in Rust and can provide both TUI and CLI interaction interfaces from the same binary: run it directly to enter the TUI, or pass flags such as --sessions and --overview to output CLI reports.
[Purpose] AI coding Agents now behave like small build systems: they call tools, retry, stall, and consume Tokens, while users usually only see the final answer. agenttrace reads the logs these Agents have already written, ranks expensive or slow-running sessions first, and helps answer several kinds of questions: how much did my Agent spend; why was this task slow; did a regression occur in a certain run; which session should be checked first; and can the check be completed entirely locally.
[Main Capabilities]
- Supports multiple sources: Claude Code, Codex CLI, Qwen Code, Cline, Aider, Cursor exports, Hermes Agent, OpenCode, OpenClaw, Pi, Oh My Pi, Kimi CLI, Copilot-style logs, and generic JSON/JSONL traces.
- Cost and resource comparison: compare historical sessions by Agent source, model, input/output/cache Token, estimated cost, and wall-clock time.
- Slow-run diagnosis: discover long gaps, stuck sessions, retry loops, slow tool calls, large arguments, and context pressure.
- Regression detection: compare against a local baseline when provided, then view the event timeline and conservative tool permission classification.
- Sorting and retrieval: sort sessions by cost, duration, turns, health, failures, anomalies, model, source, or text search.
- Governance reporting: --overview includes scope, parsing and pricing confidence, cost audit, priority recommendations, MCP governance, context trends, and delivery signals in JSON, Markdown, and HTML output.
[Usage] Installation: install scripts are provided for macOS and Linux, and a PowerShell script for Windows. The install scripts download the release binary for the corresponding platform, verify its SHA-256 against the release checksum, and add the install directory to PATH (~/.local/bin, or %LOCALAPPDATA%\agenttrace on Windows). You can pin a release version by setting AGENTTRACE_VERSION. Package manager installation is supported. Use agenttrace --version to view the installed version. agenttrace update verifies the release checksum before replacing the binary, and for package manager installations directs you back to the corresponding manager.
Language: reports, help, and error messages follow --lang en|zh (default en; the TUI also remembers the language switched with L). Machine-readable fields such as JSON keys, code, and the --sessions TSV header always remain in English.
Pricing overrides: pricing-overrides.json accepts aliases as well as per-million-Token prices.
[Documentation and Contributions] See docs/README.md for the documentation index; see docs/guides/ci-integration.md for CI setup; see docs/guides/governance-reports.md for governance reports; see docs/guides/usage-over-time.md for usage over time (daily/weekly/monthly, 5-hour blocks); see docs/guides/cursor-import.md for Cursor import; see docs/guides/parser-guide.md for the parser guide; see docs/maintainers/distribution.md for the maintainer distribution guide. The project is listed by antigravity-awesome-skills and awesome-claude-skills. Parser PRs are welcome and usually include: a small redacted sample or synthetic sample; format detection in crates/agenttrace-core/src/parser.rs; extraction of roles, timestamps, models, Token usage, tool calls, and tool errors; and tests for successful parsing and malformed input.
[Limitations] All cost and delivery fields are explicitly estimates or heuristics, are not provider bills, and cannot prove that a certain commit has entered the main branch. MIT © 2026 agenttrace contributors.