This walks you from a fresh install to real value in a few commands: pull your agent history into a local database, search it, drill into a session, and jump back into the exact conversation. Everything here runs locally and needs no account. If you have not installed yet, start with Install.
1. Sync your history
Pull every supported source into the local database. The first run reads everything; later runs are incremental and only read new bytes.
ai-hist syncThis imports Claude Code, Codex CLI, Cursor, OpenCode, Agent Relay (when configured), and compacted trajectory runs. See Sources for exactly what is read and from where.
2. Search across everything
Full-text search runs over all sources at once:
ai-hist search "authentication bug"Results come back with entry IDs in the form #NNN. Those IDs are your handle for drilling deeper. Narrow the search with filters when you need to:
ai-hist search "refactor" --source claude --limit 10
ai-hist search "deploy" --project relaySee Search for the full filter set.
3. Drill into an entry
Take an entry ID from your search results and look at the full prompt, its session, and the exact command to resume it:
ai-hist show 4521To see what else was happening around that moment — the same session plus nearby entries — use context:
ai-hist context 4521
ai-hist context 4521 --window 15 # widen to a 15-minute windowTo browse an entire conversation, use session with the session ID:
ai-hist session abc-1234-def
ai-hist session abc-1234-def --full # no truncation4. Resume the conversation
ai-hist show <id> prints the exact resume command for the tool that recorded the session. Run it to pick the conversation back up where it left off:
cd /path/to/project && claude --resume <session_id> # Claude Code
codex resume <session_id> # Codex
cd /path/to/project && cursor-agent --resume=<session_id> # CursorCopy the resume command straight from ai-hist show <id> rather than hand-building it — it already has the right project directory and session ID filled in.