RecallNest
Shared Memory Layer for Claude Code, Codex, and Gemini CLI
One memory. Three terminals. Context that survives across windows.
A local-first memory system backed by LanceDB that turns scattered conversation history into reusable knowledge — shared across your coding agents, recalled automatically.
</div>Why RecallNest?
Coding agents forget everything between windows. Your context — project configs, debugging decisions, entity mappings — is scattered across Claude Code, Codex, and Gemini CLI with no shared memory.
RecallNest solves this: a single LanceDB-backed memory layer that your coding agents read and write. Context stored in one window is auto-recalled in another. Sessions checkpoint on exit and resume on start. Memory decays, evolves, and self-organizes — not just raw log storage.
Quick Start
Option A: Claude Code Plugin (recommended)
/plugin marketplace add AliceLJY/recallnest
/plugin install recallnest@AliceLJYRecallNest starts automatically with Claude Code. No manual MCP config needed.
Requires: Bun (recommended) or Node.js 18+. Dependencies install on first start.
Option B: npm install
npx recallnest --help # run directly
# or
npm install -g recallnest # install globally
recallnest doctorWorks with Node.js 18+ (via tsx) or Bun. No git clone needed.
Option C: Manual setup
git clone https://github.com/AliceLJY/recallnest.git
cd recallnest
bun install
cp config.json.example config.json
cp .env.example .env
# Edit .env → add your JINA_API_KEYStart the server
bun run api
# → RecallNest API running at http://localhost:4318Try it
# Store a memory
curl -X POST http://localhost:4318/v1/store \
-H "Content-Type: application/json" \
-d '{"text": "User prefers dark mode", "category": "preferences"}'
# Recall memories
curl -X POST http://localhost:4318/v1/recall \
-H "Content-Type: application/json" \
-d '{"query": "user preferences"}'
# Check stats
curl http://localhost:4318/v1/statsConnect your terminals
bash integrations/claude-code/setup.sh
bash integrations/gemini-cli/setup.sh
bash integrations/codex/setup.shEach script installs MCP access and managed continuity rules, so resume_context fires automatically in fresh windows.
Index existing conversations
bun run src/cli.ts ingest --source all
bun run seed:continuity
bun run src/cli.ts doctorWeb UI
<p align="center"> <img src="assets/dashboard.png" alt="RecallNest Dashboard" width="800" /> <br><em>Dashboard — total count, category distribution, health score, and growth trends at a glance.</em> </p> <p align="center"> <img src="assets/screenshots/ui-full.png" alt="RecallNest Search Workbench" width="800" /> <br><em>Search Workbench — hybrid search with topic tag filtering, 4 retrieval profiles, Skills browser, and asset management.</em> </p> <p align="center"> <img src="assets/knowledge-graph.png" alt="RecallNest Knowledge Graph" width="800" /> <br><em>Knowledge Graph — interactive force-directed visualization with semantic bridges revealing cross-domain connections.</em> </p>bun run src/ui-server.ts
# → http://localhost:4317Core Capabilities
Access & Setup
| Capability | Description |
|---|---|
| CC Plugin | Install in Claude Code with one command — no manual config |
| Shared Index | One LanceDB store for Claude Code, Codex, and Gemini CLI |
| Dual Interface | MCP (stdio) for CLI tools + HTTP API for custom agents |
| One-Click Setup | Integration scripts install MCP access and continuity rules |
Recall & Continuity
| Capability | Description |
|---|---|
| Hybrid Retrieval | 6-channel: vector + BM25 + L0/L1/L2 multi-vector + KG graph (PPR) |
| 4 Retrieval Profiles | default, writing, debug, fact-check — tuned for different tasks |
| Session Continuity | checkpoint_session + resume_context (full/light/summary modes) with repo-state guard |
| Session Distiller | 3-layer conversation compression: microcompact → LLM summary → knowledge extraction |
| Conversation Import | Import from Claude Code, Claude.ai, ChatGPT, Slack, and plaintext |
| Topic Tags | Intra-scope topic partitioning — auto-detected, filterable in search |
Memory Lifecycle & Governance
| Capability | Description |
|---|---|
| Memory Evolution | Supersede chains, decay scoring, LLM importance, consolidation, archival |
| Smart Promotion | Evidence → durable memory with conflict guards, merge resolution, and audit trail |
| Privacy Tiers | 4-tier (ephemeral / private / durable / shared) with cascade forgetting |
| Admission Control | Write-time gating: noise filter, importance floor, dedup, rate limiting |
| Memory Lint | Contradiction, duplicate, stale, and orphan detection with health score |
| Offline Consolidation | dream command: clustering, merging, pruning of accumulated memories |
Reasoning & Structure
| Capability | Description |
|---|---|
| Knowledge Graph | Entity relation graph with PPR algorithm for multi-hop questions |
| Constructive Retrieval | Multi-source candidate expansion + grounded context reconstruction |
| Narrative Architecture | 3-layer autobiographical metadata (life-period → general-event → specific-event) |
| Skill Memory | Store, retrieve, and promote executable skills from recurring patterns |
| Predictive Reminders | Behavioral-signal prediction engine surfaces "you might need this" suggestions |
| 6 Categories | profile, preferences, entities, events, cases, patterns — with category-aware merge strategies |
Visibility & Operations
| Capability | Description |
|---|---|
| Dashboard | Web UI with stats, category distribution, growth trends, and health |
| Workflow Observation | Dedicated append-only workflow health records, outside regular memory |
| Structured Assets | Pins, briefs, and distilled summaries — not just raw logs |
| Data Checkup | Data quality health checks on the memory store (including source health) |
| Source Heartbeats | Automatic ingest health tracking per data source with staleness alerts |
| Export Graph | Export interactive HTML knowledge graph visualization |
| Batch Operations | Store up to 20 memories in a single call with dedup |
| Connector Framework | Standard connector-v1 format for external data sources with example adapters |
New in v2.1: Philosophy-Informed Memory
v2.0 built the operational memory platform; v2.1 added philosophy-informed memory behavior.
Five upgrades derived from 9 research dimensions in philosophy of memory, each mapped to concrete engineering:
-
Emotion-Aware Decay (Affective Memory Theory) — Memories with strong emotional content decay 20-30% slower. Keyword-based emotion detection computes
salience(mnemonic significance), which feeds into the Weibull half-life formula and a rebalanced 4-factor evolution score. Zero LLM cost. -
Memory Ethics Layer (Right to Be Forgotten / GDPR Art. 17) — Four privacy tiers (
ephemeral/private/durable/shared). Cascade forgetting engine that propagates deletion through KG triples, evolution chains, pin assets, and briefs. Full audit trail.forget_memoryMCP tool for agent-driven deletion. -
Autobiographical Narrative (Narrative Identity Theory / Conway's 3-layer model) — Memories are tagged with
lifePeriod → generalEvent → specificEventhierarchy, orthogonal to existing 6 categories. Retrieval pulls narrative siblings. Context rendering groups by life period. Rule-based tagger with EN+CN support. -
Constructive Retrieval (Simulation Theory / Michaelian) — Instead of returning raw stored text, RecallNest now reconstructs context from an expanded candidate set: KG neighbors + evolution chains + cluster members + narrative siblings. Source-map grounded coverage replaces lexical overlap. Contradictions are detected and flagged.
-
Predictive Prospective Memory (Mental Time Travel / Tulving) — Heuristic prediction engine that surfaces "you might need this" reminders from behavioral signals: stale checkpoint open loops, corrected workflow observations, high-frequency dormant memories, and uncovered query topics. Zero LLM cost. Auto-expire in 7 days if unaccepted.
New in v2.2: Retrieval Quality Hardening
v2.1 added philosophy-informed behavior; v2.2 closes the last three engine-layer gaps identified by a frontier research scan (ACC, PI-LLM, TSM).
-
Memory Confidence Meta-tags (ACC / Dual-Process UQ) — Each memory now carries structured
ConfidenceMetadata(score, reliability tier:direct/inferred/hearsay). Auto-assigned from source on write (manual= 0.9,agent= 0.7,conversation_import= 0.5). Retrieval scores are weighted by confidence.resume_contexttags low-confidence items with[低置信]. -
Interference Detection + Active Forgetting Gate (PI-LLM / SleepGate) — Semantic cluster detection identifies groups of near-duplicate memories competing for retrieval. Enhanced RIF keeps only top-K (default 3) per cluster; extras are demoted 50% instead of removed. Write-time pre-warning: when a scope accumulates ≥5 high-similarity active memories, the weakest is flagged
pending_review.data_checkupreports interference density. -
Temporal Validity Windows (TSM / TiMem / Zep) —
store_memoryacceptsvalidUntil(expiration) andeventTime(when the event actually happened).search_memorysupportsvalidAt(point-in-time query) andincludeExpired(demote 80% instead of hide). Auto-GC applies 2× decay acceleration to expired memories.
New in v2.3: Connector Ecosystem + Source Health
v2.2 hardened retrieval quality; v2.3 opens RecallNest to external data sources with a standard connector framework and operational health monitoring.
-
Connector-v1 Standard (GB-2) — A JSON format (
ConnectorOutputV1) that any external script can produce. Obsidian vaults, emails, RSS feeds, log files — normalize once, ingest through the full dedup/embed/extract pipeline. Seedocs/connector-spec.mdfor the specification andconnectors/examples/for adapter skeletons (email, logs, RSS). -
Obsidian Vault Ingestion (GB-1) — First-party Obsidian connector: scans
.mdfiles, extracts frontmatter + wikilinks, maps folder structure to tags. One command:lm ingest --obsidian /path/to/vault. -
Source Health Monitoring (GB-3) — Every connector ingest writes a heartbeat to
data/source-heartbeat.json.data_checkupflags stale sources (>7d warning, >30d error).doctor --cishows a per-source heartbeat summary with human-readable age.
Architecture
┌──────────────────────────────────────────────────────────┐
│ Client Layer │
├──────────┬──────────┬──────────┬──────────────────────────┤
│ Claude │ Gemini │ Codex │ Custom Agents / curl │
│ Code │ CLI │ │ │
└────┬
…