
agtrace is an observability platform for AI agent execution traces. Local-first, privacy-preserving, and zero-instrumentation.
Two Ways to Use agtrace
1. 🔍 Live Monitoring with watch
Real-time TUI dashboard for agent sessions. Like top + tail -f for AI agents.
- 100% local and offline — Privacy by design, no cloud dependencies
- Auto-discovery — Finds logs from Claude Code, Codex, and Gemini automatically
- Zero instrumentation — No code changes or configuration needed
- Universal timeline — Unified view across all providers
2. 🤖 Agent Self-Reflection via MCP
Connects to AI coding assistants via Model Context Protocol, enabling agents to query their own execution history.
- Query past sessions — "Show me sessions with failures in the last hour"
- Search across traces — Find specific tool calls, events, or patterns
- Analyze performance — Detect loops, failures, and bottlenecks
- Debug behavior — Inspect reasoning chains and tool usage
Supported MCP clients: Claude Code, Codex (OpenAI), Claude Desktop Note: Gemini CLI support is planned (requires Content-Length framing implementation)
🚀 Quick Start
🔌 MCP Integration
Enable agent self-reflection in your AI coding assistant:
Claude Code:
Codex (OpenAI):
Claude Desktop:
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Example queries after setup:
- "Show sessions from the last hour with failures"
- "Search for tool calls containing 'write_file'"
- "Analyze the most recent session for performance issues"
For detailed setup instructions and troubleshooting, see the MCP Integration Guide.
🛠️ Building with the SDK
Embed agent observability into your own tools (vital-checkers, IDE plugins, dashboards).
[]
= "0.3"
use ;
let client = connect_default.await?;
let sessions = client.sessions.list?;
if let Some = sessions.first
See also: SDK Documentation | Examples | SDK README
📚 Documentation
- Why agtrace? - Understanding the problem and solution
- Getting Started - Detailed installation and usage guide
- Architecture - Platform design and principles
- SDK Documentation - Building custom tools
- Full Documentation - Commands, FAQs, and more
🔌 Supported Providers
- Claude Code (Anthropic)
- Codex (OpenAI)
- Gemini (Google)
📦 Architecture
graph TD
CLI[agtrace-cli] --> SDK[agtrace-sdk]
YourApp[Your Tool] --> SDK
SDK --> Core[Core Engine & Providers]
- Core SDK:
agtrace-sdk,agtrace-engine,agtrace-providers - Applications:
agtrace-cli(Reference Implementation)
License
Dual-licensed under the MIT and Apache 2.0 licenses.