
agtrace provides a unified timeline and analysis layer for fragmented AI agent logs. Use the CLI for instant visualization, or build custom monitoring tools with the SDK.
🌟 Core Value
- Universal Normalization: Converts diverse provider logs (Claude, Gemini, etc.) into a standard
AgentEventmodel. - Schema-on-Read: Resilient to provider updates. No database migrations needed.
- Local-First: 100% offline. Privacy by design.
- Zero-Instrumentation: Automatically detects and watches logs from standard locations (
~/.claude/projects,~/.codex/sessions,~/.gemini/tmp). No code changes required.
🚀 Quick Start (CLI)
The reference implementation of the agtrace platform.
🤖 AI-Native Observability (MCP)
New in v0.4.0: Enable AI agents to query their own execution history.
agtrace exposes a Model Context Protocol (MCP) server that allows AI assistants like Claude Desktop to:
- Browse session history and analyze failures
- Search event payloads across thousands of sessions
- Run diagnostic analysis (failures, loops, bottlenecks)
- Debug agent behavior without manual CLI commands
Setup with Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
After restarting Claude Desktop, ask questions like:
- "Show me sessions from the last 2 hours that had failures"
- "Search for all tool calls containing 'write_file'"
- "Analyze the most recent session for performance issues"
Available MCP Tools
list_sessions- Browse session history with filteringget_session_details- Get session overview, turns, or full detailsanalyze_session- Run diagnostic analysis (failures, loops)search_events- Search event payloads across sessionsget_project_info- List all indexed projects
See also: Run agtrace mcp serve --help for details.
🛠️ 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.