← Back to Discover

agenttrace

Local-first terminal tool that reads the session logs AI coding agents already write and reports what runs cost, how many tokens they used, and why a task was slow.

Observability & evalsCommand-line tools

What it does

agenttrace is a Rust terminal interface and report generator for AI coding-agent session history. It reads the logs that agents such as Claude Code, Codex CLI, Qwen Code, Cline, Aider and OpenCode already write, along with Cursor exports and generic JSON or JSONL traces, and shows spend in cost, tokens and time across projects, agents and models. For slow or failing runs it points to long gaps, hanging sessions, retry loops, slow tool calls and context pressure. Sessions can be ranked and filtered by cost, duration, health, failures, anomalies, model or source, so you know what to inspect first. Reports can be exported as JSON, Markdown or self-contained HTML. Everything runs on your machine with no hosted backend. The cost figures are labelled as estimates rather than provider billing. It installs with a shell or PowerShell script, Homebrew, npm or cargo, and opens the terminal interface when run without a report flag.

Capabilities

  • Cost, token and time history grouped by project, agent and model
  • Slow-task diagnosis for gaps, hangs, retry loops and slow tools
  • Cost audit with local pricing overrides and prioritised recommendations
  • Sort and filter sessions by cost, health, failures, model or source
  • JSON, Markdown and self-contained HTML reports
  • Runs locally with no hosted backend

When to use it

  • You run several AI coding agents and want one view of what they spent
  • A task ran slowly and you want to see where the time went
  • You want to review agent sessions without sending logs to a hosted service