agenttrace

by luoyuctlVerified

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

121
Stars
6
Forks
Rust
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/luoyuctl/agenttrace

Getting Started

Guides for using skills like agenttrace.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

agenttrace logo

AgentTrace

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

English | 简体中文

CI Release Rust License Homebrew tap npm WinGet

agenttrace running locally against real AI coding agent session logs


agenttrace is a local-first terminal TUI and report generator for AI coding-agent session history. It reads 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, 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
OverviewCritical sessions
agenttrace overview showing real local AI coding agent sessions, token cost, errors, and healthagenttrace critical session list from real local AI coding agent logs
Session detailDiagnostics
agenttrace detail view showing health, cost, tool failures, and next action from a real local sessionagenttrace diagnostics view showing latency, context window, and large parameter calls from real local logs

Install

Install the latest public release with your package manager. Check the installed version with agenttrace --version.

# macOS and Linux
brew install luoyuctl/tap/agenttrace

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

Windows:

winget install --id Luoyuctl.AgentTrace --exact

The package names above become available once the corresponding release has been published. Manual installs remain available without a package manager:

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

Quickstart

agenttrace

Governance reports

# Audit raw token components, normalized pricing, and fallback confidence.
agenttrace --audit --range 30d -f json

# Optional local model aliases and per-million-token price overrides.
AGENTTRACE_PRICING_FILE=pricing-overrides.json agenttrace --audit -f json

# Rank evidence-backed actions by severity and estimated impact.
agenttrace --recommend --range 30d -f json

# Inspect observed MCP invocations. Loaded-server coverage is intentionally
# reported as unavailable unless the source log actually records it.
agenttrace --mcp-governance --range 30d -f json

# Review cross-session context, cache, repeat-read, and read/write trends.
agenttrace --context-trends --range 30d -f json

# Correlate local Git commit timestamps with sessions (heuristic, read-only).
agenttrace --delivery-evidence --range 30d -f json

pricing-overrides.json accepts aliases plus per-million-token prices:

{"aliases":{"provider/raw-model":"my-model"},"prices":{"my-model":{"input":1,"output":2,"cw":0,"cr":0}}}

--overview now includes scope, parse and pricing confidence, cost audit, prioritized recommendations, MCP governance, context trends, and delivery signals in JSON, Markdown, and HTML output. All cost and delivery fields are explicitly estimates or heuristics; they are not provider billing or proof that a commit reached main.

What you get

Needagenttrace gives you
Historical spend reviewSessions grouped across projects, agents, and models with Today/7d/30d/All ranges
Data confidenceReport scope, per-source coverage, parse skips, cache hits, unknown sources/models, pricing fallbacks, and latest observed session
Cost audit and action planToken component rates, pricing source/status, estimated cost confidence, and prioritized, evidence-backed remediation suggestions
Governance trendsCanonical project grouping, observed MCP invocation governance, cross-session context/cache/read-write trends, and read-only Git delivery correlation
Honest capability levelsDetailed, Aggregate, or Limited per session so missing event-level evidence is never presented as a complete trace
Privacy-safe stepsTool-step metadata and duration when the source provides call IDs and timestamps; no prompt, response, result, or tool-argument body is stored in steps
Slow-task diagnosisLatency stats, long gaps, hanging sessions, retry loops, slow tools, large params, and context pressure
Regression evidenceLocal baseline comparison when supplied, incident timelines, and conservative tool authority categories in reports
First-session triageSort and filter by cost, duration, health, failures, anomalies, model, source, or text search
Shareable evidenceJSON, Markdown, and self-contained HTML reports
Local-first inspectionNo hosted backend required

Docs

Listed in these open source projects:

Contributing

Parser PRs are welcome. A good parser contribution usually includes:

  • a tiny redacted fixture or synthetic sample
  • format detection in crates/agenttrace-core/src/parser.rs
  • role, timestamp, model, token usage, tool call, and tool error extraction
  • tests for successful parsing and malformed input

Run before sending a PR:

cargo test
cargo build --release -p agenttrace
target/release/agenttrace --doctor

See CONTRIBUTING.md for the full contribution flow.

License

MIT © 2026 agenttrace contributors

Frequently Asked Questions

What is agenttrace?

agenttrace is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by luoyuctl. Local-first Rust TUI/CLI for auditing AI coding-agent sessions: cost, tokens, latency, failures, and health|本地优先 Rust TUI/CLI,审计 AI 编程 Agent 会话的成本、Token、延迟、失败与健康度. It has 121 GitHub stars.

Is agenttrace safe to use?

Yes. agenttrace passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install agenttrace?

Clone the repository with "git clone https://github.com/luoyuctl/agenttrace" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is agenttrace written in?

agenttrace is primarily written in Rust. It is open-source under luoyuctl on GitHub, so you can review or fork the full source.

Are there alternatives to agenttrace?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh agenttrace against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI Agents
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details