What was I working on — can I pick up where I left off?
$ agentmine sessions --root-only --since 1dThe recent sessions in this project, newest first — reopen one and continue with context.
Local-first agent-session corpus
Agentmine is long-term memory for your AI coding agents. It turns your local Claude Code, Cursor, Codex, Gemini CLI, Qwen Code, Cline, Kilo Code, Goose, and OpenCode sessions into one searchable SQLite corpus — resume prior work, recall how you solved something before, and reconstruct what a past session did.
$ npm i -g agentmineRequires Node 24+ · MIT licensed · no native build
$ agentmine similar "auth redirect loop"
{
"version": 1,
"status": "success",
"command": "agentmine similar",
"data": {
"mode": "fts",
"rows": [{
"session_id": "demo--auth-redirect",
"reconstruct_command": "agentmine session demo--auth-redirect --md"
}]
},
"traceId": "00000000-0000-7000-8000-000000000001",
"_meta": { "duration_ms": 18 }
}Queries
Every question is one command with a JSON envelope on stdout. Here are six you'll reach for.
What was I working on — can I pick up where I left off?
$ agentmine sessions --root-only --since 1dThe recent sessions in this project, newest first — reopen one and continue with context.
Have I solved a task like this before?
$ agentmine similar "auth redirect loop"Full-text by default; hybrid semantic search after you build a local index.
What did that past session actually do?
$ agentmine session <id> --turn-range 1:20Replay a prior session's messages and tool calls as JSON or markdown.
When did I change this — and in which session?
$ agentmine fts "checkout redirect"Full-text search across every session to trace a change or decision back to its source.
Which commands keep failing?
$ agentmine top commands --failedRanked shell failures, so you can fix the recurring ones.
Which skills actually get used?
$ agentmine top skillsAdoption of the reusable instructions you've set up.
Pipeline
For file-based sources, agentmine ingest runs steps 1–3. OpenCode, Kilo Code, and Goose start at normalize; the quick start lists each command. No LLM is called in the default path, and every step is safe to rerun.
syncCopies file-based transcript stores into Agentmine's data directory. Nothing leaves your machine.
normalizeTurns file or live SQLite source data into canonical sessions, messages, and tool calls — skipping anything unchanged by content hash.
extractRebuilds derived tables — files touched, shell commands, tool errors, corrections, skills — in transactions.
queryBrowse with stats, top, fts, similar, and workflows — every command already emits JSON for agents.
Principles
sync → normalize → extract path.SELECT, WITH, EXPLAIN.agentmine schema.Sources
Install the CLI, point it at your history, and query.
$ npm i -g agentmine
$ agentmine ingest --source claude-code
$ agentmine stats