agentmine
v0.7.2
Published
Long-term memory for your AI coding agents. Agentmine turns local Claude Code, Cursor, Codex, Copilot, Gemini & OpenCode session transcripts into a searchable SQLite corpus — resume prior work, recall how you solved something before, and reconstruct what
Maintainers
Keywords
Readme
Agentmine
Agentmine is long-term memory for your AI coding agents. It turns local session transcript archives into a searchable SQLite corpus, so you — or your agent — can resume prior work, recall how you solved something before, and reconstruct what a past session did.
It ingests session transcripts from tools such as Claude Code, Cursor, Codex, Gemini CLI, Qwen Code, Kilo Code, Goose, Cline, GitHub Copilot CLI, and OpenCode, normalizes them into a shared schema, extracts useful facts, and exposes the result through an agent-friendly JSON CLI.
Use it to answer questions like:
- What was I working on — can I pick up where I left off?
- Have I solved a task like this before?
- What did that past session actually do — its decisions and outcome?
- When did I change this, and in which session?
- What files and commands do my agents touch most, and which errors or corrections repeat?
- Which skills, MCP tools, or agent workflows are actually used?
- Which sessions were user-facing roots, delegated workers, nested workers, or automatic reviews?
Agentmine is local-first. It reads local transcript stores and writes local
SQLite data under the user data directory by default. It does not call an LLM
in the default sync -> normalize -> extract path.
Full documentation: agentmine.io.
Status
Agentmine is under active development. The core local corpus workflow is working
and covered by tests. The README is intentionally concise; the full guide lives in
guide/ and at agentmine.io.
Requirements
- macOS or Linux; Windows users can run Agentmine in WSL
rsyncfor transcript sync andtarfor backup/history imports- Node.js 24+ for the npm package, or no external runtime for a standalone executable
- pnpm and Bun 1.3.14 only when building both distributions from source
- SQLite through the selected runtime's built-in driver; no third-party native SQLite package
Optional:
- Ollama with
nomic-embed-textfor local semantic search
Install
Global CLI (requires Node.js 24+):
npm i -g agentmineOr download a standalone executable from
GitHub Releases. Choose one platform:
linux-x64, darwin-x64, or darwin-arm64. Each archive contains one executable named
agentmine; it does not require Node.js or a separate Bun installation.
With GitHub CLI installed, the following downloads the latest macOS arm64 asset and verifies its
immutable release attestation. Change PLATFORM for another target:
REPOSITORY=baranovxyz/agentmine
PLATFORM=darwin-arm64
TAG=$(gh release view --repo "$REPOSITORY" --json tagName --jq .tagName)
VERSION=${TAG#v}
ARCHIVE="agentmine-v${VERSION}-${PLATFORM}.tar.gz"
gh release download "$TAG" --repo "$REPOSITORY" --pattern "$ARCHIVE"
gh release verify "$TAG" --repo "$REPOSITORY"
gh release verify-asset "$TAG" "$ARCHIVE" --repo "$REPOSITORY"
tar -xzf "$ARCHIVE"
mkdir -p "$HOME/.local/bin"
install -m 0755 agentmine "$HOME/.local/bin/agentmine"
"$HOME/.local/bin/agentmine" versionThe final command reports bun-standalone, the platform target, Bun version, and public source
commit in Agentmine's JSON envelope. The macOS executables are not claimed to be Apple-notarized or
platform-signed.
Or from source:
pnpm install
pnpm build
alias agentmine="node $PWD/dist/cli.js"
# Standalone executable for this Mac (choose the matching explicit target)
pnpm build:standalone -- \
--target bun-darwin-arm64 \
--outfile ./agentmine \
--source-commit "$(git rev-parse HEAD)"Quick Start
Choose the source you have installed:
# Claude Code, Cursor, Codex, Gemini CLI, Qwen Code, or Cline (pick one)
agentmine ingest --source claude-code
agentmine ingest --source cursor
agentmine ingest --source codex
agentmine ingest --source gemini
agentmine ingest --source qwen
agentmine ingest --source cline
# Current OpenCode SQLite store
agentmine normalize --source opencode-db
agentmine extract
# Current Kilo Code SQLite store
agentmine normalize --source kilo
agentmine extract
# Current Goose SQLite store
agentmine normalize --source goose
agentmine extract
agentmine statsRun only one of the six source-specific ingest examples. An unfiltered agentmine ingest imports
every mirrored source and directly reads available OpenCode, Kilo Code, and Goose databases during
normalize, but expects the default Claude Code transcript directory to exist. For one live-DB
source, use its normalize --source ... command plus extract as shown above.
For Cline, the source directory follows Cline's own override precedence:
CLINE_SESSION_DATA_DIR, then CLINE_DATA_DIR/sessions, then CLINE_DIR/data/sessions, then
~/.cline/data/sessions.
After the first import creates sessions.db, run agentmine backup before forced rebuilds or
other destructive maintenance.
See Getting started for incremental imports, the project-path allowlist, and database-path overrides.
Documentation
The docs are single-sourced from this repository's guide/ directory
and published at agentmine.io:
- Overview — what Agentmine is and how it fits together.
- Getting started — install, first run, incremental imports, and the project-path allowlist.
- The pipeline — how
sync → normalize → extractworks and why every step is safe to rerun. - Similarity search —
agentmine similarand optional local embeddings. - Redaction & privacy — searchable-text redaction and sensitive lossless records.
- Extensions — custom sources and redaction rules.
- CLI command overview · Data paths · Agent CLI contract
- Architecture — internals and module contracts.
Development
pnpm typecheck
pnpm testLicense
MIT. See LICENSE.
