AgentLog
CLI flight recorder for AI coding agents. Capture every file change, command, and diff as a replayable timeline.
Installation
Or download pre-built binaries from GitHub Releases.
Quick Start
# Initialize in your project
# Run an AI agent with capture
# Review what changed
Commands
agentlog init
Initialize AgentLog in the current directory. Creates .agentlog/ directory with SQLite database and config.
agentlog run <agent>
Run an AI agent with full session capture. File changes are monitored in real-time.
agentlog search
Search and filter sessions by date, agent, or files touched. Perfect for finding context when debugging issues.
# Find sessions from last 2 weeks
# Find Claude sessions that touched auth files
# Find sessions from specific date range
# Find sessions affecting specific file
agentlog timeline
Display all captured sessions with duration, files changed, and line statistics.
agentlog replay <session-id>
Replay a specific session step-by-step. Shows each file change with timestamps and diffs.
agentlog blame <path>
Show which AI session last modified each line of a file.
agentlog status
Check AgentLog status and health for the current project.
agentlog export
Export events to JSONL format for sharing or backup.
agentlog watch
Start background file watcher without wrapping an agent. Useful for monitoring manual edits.
agentlog policy
Manage security policies to block or warn on sensitive file modifications.
Workflow Example
Scenario: QA reports a bug in the auth feature from 2 weeks ago.
# 1. Find sessions from last 2 weeks that touched auth files
# 2. Found session abc123de - view full details
# 3. Export context for sharing with team
Policy Enforcement
AgentLog includes built-in policies to protect sensitive files:
| Pattern | Action |
|---|---|
.env* |
Block |
auth/**/* |
Block |
*.key, *.pem |
Block |
*.tfstate* |
Block |
migrations/**/* |
Require confirmation |
Storage
Events are stored locally in .agentlog/events.db as a SQLite database:
- Fast queries: Indexed for O(log n) lookups
- Scalable: Handles millions of events efficiently
- Local only: No cloud, no external dependencies
- Exportable: Export to JSONL anytime with
agentlog export - Git-friendly: Add
.agentlog/to.gitignore
Direct SQL Access
Advanced users can query the database directly:
Requirements
- Rust 1.93+
- Linux, macOS, or Windows
License
MIT