{"id":49501738,"url":"https://github.com/luoyuctl/agenttrace","last_synced_at":"2026-05-20T01:03:46.255Z","repository":{"id":354996743,"uuid":"1226187070","full_name":"luoyuctl/agenttrace","owner":"luoyuctl","description":"🔍 AI Agent Session Performance Analyzer — find hanging, token waste, thinking redaction, and quality regressions in your AI coding sessions.","archived":false,"fork":false,"pushed_at":"2026-05-01T11:08:56.000Z","size":1751,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-01T11:35:35.538Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luoyuctl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-01T04:29:32.000Z","updated_at":"2026-05-01T11:07:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/luoyuctl/agenttrace","commit_stats":null,"previous_names":["luoyuctl/agenttrace"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/luoyuctl/agenttrace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luoyuctl%2Fagenttrace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luoyuctl%2Fagenttrace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luoyuctl%2Fagenttrace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luoyuctl%2Fagenttrace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luoyuctl","download_url":"https://codeload.github.com/luoyuctl/agenttrace/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luoyuctl%2Fagenttrace/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32497815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-01T13:00:53.661Z","updated_at":"2026-05-10T06:17:57.942Z","avatar_url":"https://github.com/luoyuctl.png","language":"Go","funding_links":[],"categories":["Applications","Go","Community Projects","10. LLM \u0026 AI Observability","Workflow Infrastructure \u0026 Design","Cost Tracking, Observability, and Budgets","🛠️ Developer Productivity \u0026 Workflow","Ecosystem","Development Tools \u0026 Utilities","Monitoring and Observability","AI Coding Agents","⚙️ Agent Operations","Code Analysis \u0026 Search","Command Line Tools","CLIs","📚 Tools","Productivity Tools","\u003ca name=\"monitoring\"\u003e\u003c/a\u003emonitoring","Continuous Monitoring","Integrations \u0026 Features","Logging","Agent Infrastructure","评估观测","DevOps Tools","Tools","LLM Development and Optimization","LLM and Agent Observability","Test Analytics and Triage"],"sub_categories":["Tools","Monitoring \u0026 Tools","Cost \u0026 Usage Tracking","Open source","GateGuard — Fact-Forcing PreToolUse Gate","Claude Code","📊 Evaluation","Other IDEs","🌟 What You'll Find Here:","Monitoring \u0026 Observability","Container Orchestration","Monitoring \u0026 Dashboards","Usage Analytics \u0026 Cost Tracking","Contents","AI","Stat","LLM Testing and Evaluation"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo-icon.png\" alt=\"agenttrace logo\" width=\"256\" height=\"256\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eAgentTrace\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  Review AI coding agent history across cost, tokens, and time, then find why a run was slow.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  English | \u003ca href=\"README.zh-CN.md\"\u003e简体中文\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/luoyuctl/agenttrace/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/luoyuctl/agenttrace/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://luoyuctl.github.io/agenttrace/\"\u003e\u003cimg src=\"https://img.shields.io/badge/site-agenttrace-54ff00.svg\" alt=\"Site\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/luoyuctl/agenttrace/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/luoyuctl/agenttrace?color=00ADD8\" alt=\"Release\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pkg.go.dev/github.com/luoyuctl/agenttrace\"\u003e\u003cimg src=\"https://pkg.go.dev/badge/github.com/luoyuctl/agenttrace.svg\" alt=\"Go Reference\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/luoyuctl/agenttrace\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/luoyuctl/agenttrace\" alt=\"Go Report Card\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/go-1.25+-00ADD8.svg\" alt=\"Go\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/license-MIT-green.svg\" alt=\"License\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Homebrew-v0.4.5-2bbc8a.svg\" alt=\"Homebrew\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/readme-real-run.gif\" alt=\"agenttrace running locally against real AI coding agent session logs\" width=\"100%\"\u003e\n\u003c/p\u003e\n\n---\n\n**agenttrace** is a local TUI and report generator for AI coding agent session history. It reads Claude Code, Codex CLI, Gemini CLI, Qwen Code, Cursor, Aider, OpenCode, OpenClaw, Hermes Agent, Kimi CLI, and Copilot-style logs, then helps with two daily jobs: see what multiple agents spent across cost, tokens, and time; and diagnose why a task ran slowly.\n\n## Why agenttrace?\n\nAI coding agents now behave like small build systems: they call tools, retry, stall, and spend tokens while you only see the final answer.\n\n**agenttrace** reads the logs your agents already write and puts cost-heavy or slow sessions first.\n\nIt helps you answer:\n\n- **What did my agents spend?** Compare historical sessions by agent source, model, input/output/cache tokens, estimated cost, and wall-clock time.\n- **Why was this task slow?** Catch long gaps, hanging sessions, retry loops, slow tool calls, large parameters, and context pressure.\n- **What should I inspect first?** Rank sessions by cost, duration, turns, health, failures, anomalies, model, source, or text search.\n- **Can I inspect this privately?** Everything runs locally; prompts, code, and logs do not need to leave your machine.\n\n## Real local run\n\nThese screenshots were captured from a local run against real session logs. They are not `--demo` output and not test fixtures.\n\n```bash\nagenttrace\n```\n\n| Overview | Critical sessions |\n|---|---|\n| \u003cimg src=\"assets/readme-real-overview.png\" alt=\"agenttrace overview showing real local AI coding agent sessions, token cost, errors, and health\" width=\"100%\"\u003e | \u003cimg src=\"assets/readme-real-critical.png\" alt=\"agenttrace critical session list from real local AI coding agent logs\" width=\"100%\"\u003e |\n\n| Session detail | Diagnostics |\n|---|---|\n| \u003cimg src=\"assets/readme-real-detail.png\" alt=\"agenttrace detail view showing health, cost, tool failures, and next action from a real local session\" width=\"100%\"\u003e | \u003cimg src=\"assets/readme-real-diagnostics.png\" alt=\"agenttrace diagnostics view showing latency, context window, and large parameter calls from real local logs\" width=\"100%\"\u003e |\n\nThat local run found:\n\n```text\nAGENTTRACE v0.4.5\n```\n\n| Signal | What agenttrace found |\n|---|---:|\n| Analyzed sessions | 1,761 |\n| Total tokens | 9.13B |\n| Estimated cost | $5,037.26 |\n| Tool failure rate | 1.1% |\n| Critical sessions | 16 |\n| Average health | 91% |\n\n## Install\n\n```bash\ncurl -sL https://raw.githubusercontent.com/luoyuctl/agenttrace/master/install.sh | sh\n```\n\nOther install paths:\n\n```bash\nbrew install luoyuctl/tap/agenttrace\ngo install github.com/luoyuctl/agenttrace/cmd/agenttrace@latest\n```\n\nWindows:\n\n```powershell\niwr -useb https://raw.githubusercontent.com/luoyuctl/agenttrace/master/install.ps1 | iex\n```\n\nThe npm wrapper is also available as `agenttrace` after each release is published.\n\n## Common workflows\n\n```bash\n# Open the local TUI\nagenttrace\n\n# Check detected agent directories and cache state\nagenttrace --doctor\n\n# Generate machine-readable evidence\nagenttrace --overview -f json\n\n# Create a self-contained report for CI artifacts or issue links\nagenttrace --overview -f html -o agenttrace-overview.html\n\n# Fail CI on unhealthy agent runs\nagenttrace --overview \\\n  --fail-under-health 80 \\\n  --fail-on-critical \\\n  --max-tool-fail-rate 15\n```\n\n## Supported logs\n\nagenttrace supports local sessions from:\n\nClaude Code, Codex CLI, Gemini CLI, Qwen Code, Cline, Aider, Cursor exports, Hermes Agent, OpenCode, OpenClaw, Oh My Pi, Kimi CLI, Copilot-style logs, and generic JSON/JSONL traces.\n\n## What you get\n\n| Need | agenttrace gives you |\n|---|---|\n| Historical spend review | Sessions grouped across agents with token totals, model pricing, estimated cost, and elapsed time |\n| Slow-task diagnosis | Latency stats, long gaps, hanging sessions, retry loops, slow tools, large params, and context pressure |\n| First-session triage | Sort and filter by cost, duration, health, failures, anomalies, model, source, or text search |\n| Shareable evidence | JSON, Markdown, and self-contained HTML reports |\n| Local-first inspection | No hosted backend required |\n\n## Docs\n\n- Site: https://luoyuctl.github.io/agenttrace/\n- Sample HTML report: https://luoyuctl.github.io/agenttrace/demo-report.html\n- CI setup: [docs/ci-integration.md](docs/ci-integration.md)\n- Cursor import: [docs/cursor-import.md](docs/cursor-import.md)\n- Parser guide: [docs/parser-guide.md](docs/parser-guide.md)\n- Launch notes: [docs/launch-kit.md](docs/launch-kit.md)\n\nListed in [Awesome Gemini CLI](https://github.com/Piebald-AI/awesome-gemini-cli), [Charm in the Wild](https://github.com/charm-and-friends/charm-in-the-wild), and [Awesome Claude Code and Skills](https://github.com/GetBindu/awesome-claude-code-and-skills).\n\n## Contributing\n\nParser PRs are welcome. A good parser contribution usually includes:\n\n- a tiny redacted fixture or synthetic sample\n- format detection in `DetectFormat`\n- role, timestamp, model, token usage, tool call, and tool error extraction\n- tests for successful parsing and malformed input\n\nRun before sending a PR:\n\n```bash\ngo test ./...\ngo build -o agenttrace ./cmd/agenttrace/\n./agenttrace --doctor\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for the full contribution flow.\n\n## License\n\n[MIT](LICENSE) © 2026 agenttrace contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluoyuctl%2Fagenttrace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluoyuctl%2Fagenttrace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluoyuctl%2Fagenttrace/lists"}