Recall is a retrieval-first memory layer: everything lands in one searchable database, the best of it is ranked and injected where a host supports session-start context, and decisions carry confidence, importance, and a lifecycle across any coding agent/harness.
A SQLite-backed persistent memory layer for coding agents. Stop-hook extraction captures sessions where a host lifecycle adapter exists, MCP tools expose them mid-session, hybrid search (FTS5 + embeddings) retrieves them, and a tiered L0/L1 recall block injects identity + top-ranked records on supported hosts. MCP and skills span Claude Code, OpenCode, Pi, Codex, Grok, and JCode from one local database; lifecycle automation is host-specific.
Got questions about the project? I'd suggest using DeepWiki from Devin/Cognition to ask questions about the project.
All coding agents forget when a session ends. Recall doesn't β it extracts, indexes, and recalls what matters across every session, across every agent you use.
Built on the Model Context Protocol. One SQLite file. No phone-home. No vendor lock-in.
Stable on Claude Code. Beta on Pi and OpenCode. Codex CLI has native MCP, skills, automatic capture, and session-start injection. Grok Build CLI has automatic capture but no automatic injection. JCode remains MCP and skills only after a bounded live probe. See Roadmap.
AI agents have no memory between sessions. Context is lost. You repeat yourself. Decisions made last week are forgotten today. Every new session re-learns the basics.
Install once, then forget about it. Recall runs silently in the background:
ββββββββββββ ββββββββββββββββββ ββββββββββββββββ βββββββββββββββββ ββββββββββββββββ
β You Work βββββΆβ Stop hook firesβββββΆβ Auto-Extract βββββΆβ SQLite + FTS5 βββββΆβ Next Session β
βββββββ²βββββ β (end of turn) β ββββββββββββββββ βββββββββββββββββ ββββββββ¬ββββββββ
β ββββββββββββββββββ β
ββββββββββββββββββββββββββββββ Memory Available ββββββββββββββββββββββββββββββββ
- Automatic capture β supported lifecycle adapters preserve session progress without manual dumps; each host's exact capture and extraction behavior follows its verified lifecycle surface
- Full-text + semantic search β find anything from any past session
- Tiered session-start context β L0 identity (who you are) + L1 importance-ranked top records load automatically on supported hosts
- Zero friction β no workflow changes, no manual steps
- MCP integration β your agent searches memory automatically through standard MCP tools
Four things that set Recall apart from cloud-hosted memory layers and from agent-specific scratch files:
- Local-first, zero infrastructure. One SQLite file at
~/.agents/Recall/recall.db(override viaRECALL_DB_PATH). WAL mode,0600perms. No vector database, no graph database, no agent server, no API keys for retrieval. Nothing leaves your machine β no telemetry, no phone-home. Optional Ollama for embeddings (also local). - Multi-agent native. One memory layer across the agents you actually use. Claude Code, Pi, OpenCode, Codex, Grok, and JCode can share MCP memory. Automatic capture and injection depend on each host's supported lifecycle surfaces; see the capability matrix below.
- Structured taxonomy, not a flat blob. Decisions (with supersede/revert lifecycle and confidence scoring), learnings, breadcrumbs, and curated Library of Alexandria entries β each has a purpose and a query path. Importance scoring (1β10) surfaces what matters first.
- Hybrid search that works offline. FTS5 keyword search ships with SQLite β no embedding infrastructure required to find anything. Optional Ollama embeddings layer on top for semantic queries. Both are merged via Reciprocal Rank Fusion. Lose Ollama, lose nothing β the keyword path keeps working.
Recall requires Bun (it uses bun:sqlite and Bun-native hooks).
# Primary β install from npm with Bun, then configure
bun install -g recall-memory
recall install
# Secondary β one-shot via npx (Bun must be on PATH)
npx --package=recall-memory recall installrecall install runs the canonical setup (MCP server, hooks, agent skills,
guides) for installer-managed detected hosts. Codex uses the native plugin path
below. Prefer bun install -g: with npm install -g, the #!/usr/bin/env bun
shebang depends on Bun being on PATH (nvm/fnm shells can hide it).
Install from source instead
git clone https://github.com/edheltzel/Recall.git
cd Recall
./install.shVerify it works:
recall stats # Database overview
recall doctor # Health checkRestart your agent (Claude Code, Pi, OpenCode, or Grok) to load the installed integration.
Codex uses its native plugin marketplace for MCP, skills, and lifecycle hooks; see Codex Integration.
Claude Code can additionally install Recall as a native plugin, which takes over the nine recall-* skills and the recall-memory MCP server while the installer keeps owning the lifecycle hooks. Existing installs need one reconciliation step β see Claude Integration.
Recall's supported session-start integrations inject a small identity file at the top of a session (the L0 tier β your role, projects, tools, and working preferences). Without it, L0 is empty and every new session has to re-learn the basics.
recall onboardA 7-question interview that writes the resolved global identity file. On a new
install this is ~/.agents/Recall/MEMORY/identity.md; an existing user-owned
Claude identity remains authoritative. See the installation guide
for the shared resolver's precedence. Run it once.
Re-run whenever your role, active projects, or working preferences change.
Use | (not ,) to separate values so a phrase like no force-push, ever
survives as a single entry.
From inside Claude Code, /recall-update prints the current vs. latest
release and the exact command to run. From a shell:
./update.sh --check # version check only
./update.sh # full update: pull, build, migrate, re-register hooksInstalled from npm? Use recall update (same flags) β or bun install -g recall-memory@latest && recall install to bump the binary.
./uninstall.sh --dry-run # preview, touch nothing
./uninstall.sh # surgical remove; preserves ~/.agents/Recall/ (DB + backups)
./uninstall.sh --purge # destroy runtime + DBs; preserve identity/distilled snapshots (confirmed)Installed from npm? Use recall uninstall (same flags, e.g. --dry-run / --purge).
Full installation guide β prerequisites, platform support, session extraction setup, uninstalling
Recall sits between your agent and a single SQLite database. A WRITE path captures sessions where a host exposes a supported lifecycle surface; a READ path injects memory where a host supports session-start context. The diagram below shows the shared flows side-by-side, with the line styles in the legend distinguishing capture (solid), recall (dashed purple), and the write-only markdown mirror (dashed gray).
Text-only architecture diagram (for terminal viewers)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DATA ENTRY POINTS β
β β
β ββββββββββββββ ββββββββββββββ ββββββββββββββββ ββββββββββββββ β
β β CLI Direct β β MCP Server β β Stop Hook β β Batch β β
β β recall add β β (Claude β β SessionExt- β β Extract β β
β β recall dump β β Code) β β ract.ts β β (cron) β β
β βββββββ¬βββββββ βββββββ¬βββββββ ββββββββ¬ββββββββ βββββββ¬βββββββ β
ββββββββββΌβββββββββββββββββΌβββββββββββββββββΌβββββββββββββββββΌβββββββββββ
β β β β
βΌ βΌ βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PROCESSING LAYER β
β β
β Direct Inserts: Session Extraction Pipeline: β
β recall add breadcrumb βββ Read JSONL β
β recall add decision ββββ€ β Filter noise (tool results) β
β recall add learning ββββ€ β Dedup check (.extraction_tracker) β
β memory_add (MCP) ββββ€ β Acquire lock β
β β β Claude Haiku extract β
β β (>120K? chunk β meta-extract) β
β β (fallback: Ollama) β
β β β Quality gate β
β β (requires SUMMARY + MAIN IDEAS) β
β β β β
βββββββββββββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββββββββββββ
β β
βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STORAGE LAYER (Dual-Write) β
β β
β SQLite (~/.agents/Recall/recall.db) Memory Files (~/.agents/Recall/MEMORY/) β
β ββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ β
β β sessions βββ messages β β DISTILLED.md (archive) β β
β β decisions learnings β β HOT_RECALL.md (last 10) β β
β β breadcrumbs loa_entries β β SESSION_INDEX.json β β
β β embeddings (768-dim vecs) β β DECISIONS.log β β
β β β β REJECTIONS.log β β
β β FTS5 indexes (auto-sync) β β ERROR_PATTERNS.json β β
β β WAL mode Β· 0600 perms β ββββββββββββββββββββββββββββββββ β
β ββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β RETRIEVAL LAYER β
β β
β βββββββββββββββββ ββββββββββββββββββ βββββββββββββββββββββββββββ β
β βKeyword (FTS5) β βSemantic (Embed)β β Hybrid (RRF Fusion) β β
β βrecall search β βrecall semantic β β recall hybrid (DEFAULT) β β
β βmemory_search β βembed β Ollama β β FTS5 rank ββ β β
β β β βcosine sim β β Embed rank ββ€β merged β β
β βββββββββββββββββ ββββββββββββββββββ β RRF(k=60) ββ β β
β βββββββββββββββββββββββββββ β
β Direct: recall recent Β· recall show Β· memory_recall Β· context_for_agent β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CONSUMERS: Coding agents (MCP) Β· CLI user (recall) Β· Sub-agents β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The source .excalidraw file lives at assets/how-recall-works.excalidraw β drop it onto excalidraw.com to edit.
- Session starts β A
SessionStarthook injects two tiers of context: L0 identity (your global or project-localidentity.md, always on) and L1 top records (top 12 by importance score, with 4 slots reserved for curated Library of Alexandria entries). L2/L3 stay on disk and are pulled on demand via MCP search. - During the session β your agent searches memory via MCP tools (
memory_search,memory_hybrid_search,memory_recall,context_for_agent) before falling back to git history. Decisions, learnings, and breadcrumbs are recorded in real-time withmemory_add. - End of every turn β A
Stophook firesRecallExtract.ts, which self-spawns a background process (non-blocking). It checks.extraction_tracker.jsonand only re-extracts if the conversation has grown meaningfully since last time β so capture is incremental, not just an "on exit" event. - Extraction pipeline β The conversation JSONL is filtered, deduplicated, and sent to the
claudeCLI running Haiku (with chunking for large sessions >120K chars). Optional Ollama fallback if the CLI fails. A quality gate rejects low-quality extractions before they're stored. - PreCompact flush β When Claude Code is about to compact its context, a
PreCompacthook (RecallPreCompact.ts) flushes the in-flight messages first, so the squashed window is never lost. - Dual-write storage β Results are written to SQLite (the only query surface β every CLI/MCP read hits this) and to markdown artifacts (
DISTILLED.md,HOT_RECALL.md, etc., write-only, human-readable). - Batch catchup (optional) β A cron job (
RecallBatchExtract.ts) sweeps any sessions the Stop hook missed during crashes or interruptions, and ingests sessions dropped by the OpenCode plugin and Pi extension into~/.agents/Recall/MEMORY/{opencode,pi}-sessions/.install.shprints the registration command at the end β opt in by running it once; nothing is auto-scheduled. - TELOS auto-sync (PAI users) β If you use Personal AI Infrastructure (PAI), Recall ships a
RecallTelosSync.tsSessionStart hook that watches~/.claude/skills/PAI/USER/TELOS/for changes and silently runsrecall telos import --updatewhen any file is newer than the last import. This is automatic β no action required once Recall is installed and PAI's TELOS directory exists. You can also import manually at any time withrecall telos import --yes. If you don't use PAI, the hook checks for the directory, finds nothing, and exits in under 1ms.
| Strategy | Command | How it works |
|---|---|---|
| Keyword | recall search "query" |
FTS5 full-text search across all tables. Use -t decisions to hard-filter, or --bias-type decisions to prefer decisions while keeping other matches. |
| Semantic | recall embed semantic "query" |
Ollama embeddings β cosine similarity (requires Ollama) |
| Hybrid (default) | recall "query" |
Both keyword + semantic, merged with Reciprocal Rank Fusion (k=60). Falls back to keyword-only if Ollama is unavailable |
Narrowing by record type β table vs bias_type. Both let you steer results toward decisions, learnings, breadcrumbs, LoA entries, or raw messages, but they differ in strength:
-t/tableis a hard filter β only the named record type comes back.--bias-type/bias_typeis a soft boost β matching records of that type rank higher, but every other type can still appear when it's relevant.
Where it's available: table and bias_type act on FTS5 ranking, so they exist only on the keyword path β recall search, recall "query" -k, and the MCP memory_search tool. They are silently ignored elsewhere: plain recall "query" (default hybrid), recall "query" -v (semantic), and memory_hybrid_search rank by embedding distance and have no bias_type. Valid types: messages, decisions, learnings, breadcrumbs, loa.
Architecture deep-dive β database tables, FTS5 indexes, extraction pipeline details
- Auto-captured session memory β Claude Code extracts incrementally; Codex and Grok write supported transcript content directly to SQLite; Pi and OpenCode use their documented host adapters
- MCP server (
recall-mcp) βmemory_search,memory_hybrid_search,memory_recall,memory_add,memory_dump,context_for_agentexposed to your agent mid-session.memory_searchsupportstablehard filters andbias_typesoft boosts. - Hybrid search β FTS5 keyword search + optional Ollama embeddings, fused via Reciprocal Rank Fusion. Lose Ollama, lose nothing β keyword path keeps working. Type targeting (
table/bias_type) is a keyword-path feature β see Search Strategies. - Tiered RecallStart (v0.7.0+) β resolved L0 identity + L1 top 12 records ranked by importance, with 4 reserved slots for curated Library of Alexandria entries. L2/L3 fetched on demand
- Importance scoring (1β10) β every record carries an importance score that drives what surfaces in L1. Manage with
recall pin/recall unpin/recall importance backfill - PreCompact flush β
RecallPreCompact.tswrites in-flight messages to SQLite before Claude compacts its context window, so the squashed chunk is never lost - Decision lifecycle β
recall decision supersede/reverttracks when a decision was replaced or rolled back; confidence scoring (high/medium/low) on every decision and learning - Cross-host ingestion β Codex and Grok lifecycle hooks write immediately through one scrubbed, deduplicated SQLite ingest seam. OpenCode and Pi keep their existing drop-and-batch paths. One database remains searchable from every connected host
- Library of Alexandria β curated knowledge entries (session distillations, imported docs, telos goals, quotes) with Fabric
extract_wisdomanalysis. Default importance 8 β these get reserved L1 slots - TELOS integration (PAI users) β
RecallTelosSync.tsauto-imports your TELOS framework files (goals, mission, projects, strategies) from PAI'sUSER/TELOS/directory on every session start. Changes are detected by mtime; unchanged files are skipped. Manual import:recall telos import --yes - Breadcrumbs, decisions, learnings β three structured record types for non-session memory, addable from CLI (
recall add), MCP (memory_add), or therecall-addagent skill - Codebase scouting β
/recall-scout [focus]produces a memory-first scout report (repo map, key paths, tests, risks, next steps) for orienting in an unfamiliar repo, with a strict no-secrets boundary and chat-only-by-default output - Benchmark harness β
recall benchmark run Bmeasures wake-up context efficiency against locked baselines so regressions are visible - Onboarding β
recall onboardruns a 7-question interview that writes your L0 identity file
Suite B measures the byte cost of session-start memory injection. Latest tracked run (2026-04-18, scope atlas-recall):
| Variant | Chars | Tokens (est, 4 ch/tok) |
|---|---|---|
| v2 tiered RecallStart (L0 + L1 top 12) | 5,306 | ~1,327 |
| v1 flat-blob RecallStart (simulated) | 8,020 | ~2,005 |
| CLAUDE.md static baseline | 8,760 | ~2,190 |
v2 is 51% smaller than v1 on this corpus. CLAUDE.md is hand-written static context; Recall is auto-extracted dynamic memory β the two are complementary, not competitors. Numbers scale with your own DB and L0 identity; reproduce with recall benchmark run B. Methodology and caveats live in benchmarks/README.md.
recall "kubernetes auth" # Search your memory
recall onboard # Seed your L0 identity tier (one-time)
recall dump "Session Title" # Save this session
recall add decision "Use X" ... # Record a decision
recall decision list # List decisions with status and confidence
recall pin decisions 42 # Pin a record to high importance
recall benchmark run B # Measure wake-up context efficiency
recall prune # Preview stale records for removal
recall stats # See what's stored
recall doctor # Health checkIf you're an AI agent reading this repository:
| What you need | Where to find it |
|---|---|
| Using Recall from Claude Code (MCP tools, CLI, core rules) | FOR_CLAUDE.md |
| Installing the Claude Code plugin | docs/CLAUDE_INTEGRATION.md |
| Using Recall from OpenCode | FOR_OPENCODE.md |
| Using Recall from Pi | FOR_PI.md |
| Using Recall from Codex | docs/CODEX_INTEGRATION.md |
| Using Recall from Grok | docs/GROK_INTEGRATION.md |
| Using Recall from JCode | docs/JCODE_INTEGRATION.md |
| Developing Recall (build, test, conventions) | CLAUDE.md |
Recall separates MCP and skills, automatic capture, and automatic injection. A host can support one without supporting the others.
| Agent | MCP + skills | Automatic capture | Automatic injection | Status |
|---|---|---|---|---|
| Claude Code | β | β Stop and PreCompact extraction | β SessionStart L0/L1 | Stable reference implementation |
| Pi | β | β Beta shutdown capture | β Beta before-agent context | Native package plus separate MCP adapter/config |
| OpenCode | β | β Beta session.idle capture |
β Compaction injection not verified | Runtime verified against OpenCode 1.18.5 |
| Codex CLI | β | β Supplied rollout hooks | β
Supported additionalContext |
Native plugin; verified lifecycle contract |
| Grok Build CLI | β | β Export-based lifecycle hook | β No prompt-mutation hook | Installer-managed capture; verified lifecycle contract |
| JCode | β | β Probe did not prove safe ordering/composition | β Probe did not prove deterministic injection | MCP and skills only |
| Gemini CLI | β | β | β | Coming soon |
Unattended lifecycle writes pass the scrub gate from #50. Agent Skill bodies remain canonical under #228. Installer-owned files follow surgical ownership from #236, while broader atomic config-write parity remains tracked in #124.
Candidate β Cursor: both .cursor/hooks.json and MCP are first-class; the integration model maps cleanly onto Recall's existing hook architecture. Tracked but not started.
Have an agent you'd like to see supported? Open an issue β Recall is designed to be agent-agnostic, and any host that speaks MCP is a candidate.
| Guide | Description |
|---|---|
| Installation | Prerequisites, install, verify, session extraction |
| Managing Recall | Which command when: install, update, uninstall, custom DB, recovery |
| CLI Reference | All commands and options |
| MCP Tools | Tools available to AI agents |
| Architecture | Database, search, extraction pipeline |
| Codebase Map (local) | Interactive visual map at .agents/atlas/artifacts/2026-06-10-recall-codebase-map.html β generated from the codegraph index, not committed (.agents/ is gitignored) |
| Agent Skills | Canonical recall-* workflows and host-specific packaging |
| Codex Integration | Native plugin MCP, skills, automatic capture, and session-start injection |
| Claude Integration | Native plugin install, plugin/installer ownership split, migration |
| Pi Integration | Native package, separate MCP setup, lifecycle coverage, and host limits |
| Grok Integration | Installer-owned automatic capture and explicit injection boundary |
| JCode Integration | Live-probe evidence and current MCP/skills-only boundary |
| Upgrading | Update, backup, migration system |
| Troubleshooting | Common issues and fixes |
| Changelog | Release notes and breaking changes |
Graciously borrowing and features inspired by:
- MemPalace β tiered session-start context, PreCompact hook, importance scoring
- Personal AI Infrastructure (PAI) β TELOS framework integration
MIT





