Skip to content

Agenttrace

Local-first Rust TUI/CLI for auditing AI coding-agent sessions: cost, tokens, latency, failures, and health|本地运行的 Rust TUI/CLI,审计 AI 编程 Agent 会话的成本、Token、延迟、失败与健康度

Install

$npm install -g @zack78/agenttrace

Install command taken from the project's README or registry entry. Always review code before running it.

AgentTrace

Local-first TUI and reports for AI coding-agent session history, cost, tokens, time, and slow-run diagnosis.

English | 简体中文


agenttrace is a local-first terminal TUI and report generator for AI coding-agent session history. It reads 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, then helps with two daily jobs: see what multiple agents spent across cost, tokens, and time; and diagnose why a task ran slowly.

One agenttrace binary provides both interfaces: run it without a report action to open the TUI, or pass flags such as --sessions and --overview for CLI output.

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.
  • Did a run regress? Compare against a local baseline when supplied, then inspect incident timelines and conservative tool authority categories in reports.
  • 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

agenttrace
Overview Critical sessions
Session detail Diagnostics

Install

macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/luoyuctl/agenttrace/master/install.sh | sh

Windows PowerShell:

irm https://raw.githubusercontent.com/luoyuctl/agenttrace/master/install.ps1 | iex

The install scripts download the release binary for your platform, verify its SHA-256 against the published checksum, and add the install directory to your PATH (~/.local/bin, or %LOCALAPPDATA%\agenttrace on Windows). To pin a release, set AGENTTRACE_VERSION:

curl -fsSL https://raw.githubusercontent.com/luoyuctl/agenttrace/master/install.sh | AGENTTRACE_VERSION=v0.9.1 sh
$env:AGENTTRACE_VERSION = "v0.9.1"; irm https://raw.githubusercontent.com/luoyuctl/agenttrace/master/install.ps1 | iex

Package managers:

# macOS and Linux
brew install luoyuctl/tap/agenttrace

# macOS, Linux, and Windows (requires Node.js 18+)
npm install -g @zack78/agenttrace

# From source
cargo install --git https://github.com/luoyuctl/agenttrace agenttrace

Check the installed version with agenttrace --version.

Update

Installed with Update command
Install script agenttrace update (--check to only look)
Homebrew brew upgrade luoyuctl/tap/agenttrace
npm npm install -g @zack78/agenttrace@latest
cargo cargo install --git https://github.com/luoyuctl/agenttrace agenttrace --force

agenttrace update verifies the release checksum before replacing the binary, and points package-manager installs back to their manager.

Quickstart

agenttrace

Similar plugs

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies

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…