agenttrace
agenttrace is a local-first terminal TUI and report generator for AI coding-agent session history. It reads logs from multiple agents and helps you review cost, tokens, time, and diagnose slow runs. It is for developers who use AI coding agents and want to monitor and optimize their usage.
✨ Key features
- Reads logs from Claude Code, Codex CLI, Gemini CLI, and more.
- TUI and CLI report generation in JSON, Markdown, HTML.
- Compare sessions by cost, tokens, time, and health.
- Diagnose slow tasks with latency stats and retry loops.
- Governance reports: audit, recommendations, MCP, context trends.
- Local-first: no hosted backend, privacy-safe.
🎯 Use cases
- Track spending across multiple AI coding agents.
- Identify slow or hanging sessions for optimization.
- Generate governance reports for compliance and cost control.
- Compare current runs against a local baseline for regressions.
- Inspect session history privately without cloud upload.
📦 Installation
🧰 Requirements: Runs on macOS, Linux, Windows. Requires Node.js 18+ for npm install, or package managers like Homebrew, winget, or Cargo.
brew install luoyuctl/tap/agenttracenpm install -g @zack78/agenttraceWindows:
winget install --id Luoyuctl.AgentTrace --exact
Manual install:
curl -fsSL https://raw.githubusercontent.com/luoyuctl/agenttrace/master/install.sh | sh
cargo install --git https://github.com/luoyuctl/agenttrace agenttrace
iwr -useb https://raw.githubusercontent.com/luoyuctl/agenttrace/master/install.ps1 | iex
🚀 Usage
agenttrace
For governance reports, e.g., audit:
agenttrace --audit --range 30d -f json
⚠️ Good to know
Cost and delivery fields are estimates or heuristics, not provider billing or proof of commit delivery. Some features may be unavailable until release packages are published.
❓ FAQ
What agent logs does agenttrace support?
It reads logs from Claude Code, Codex CLI, Gemini 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.
Does agenttrace require an internet connection?
No, it is local-first and does not require a hosted backend. All processing happens on your machine.
How can I get governance reports?
Use flags like --audit, --recommend, --mcp-governance, --context-trends, and --delivery-evidence with a range, e.g., agenttrace --audit --range 30d -f json.
Can I customize pricing for cost estimates?
Yes, set the AGENTTRACE_PRICING_FILE environment variable to a JSON file with aliases and per-million-token prices.
📊 Repository
🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.