{"_id":"@clawdactual/openclaw-recall","_rev":"8-b53aae63d9e40182109e7d321f7dcd1e","name":"@clawdactual/openclaw-recall","dist-tags":{"latest":"0.4.3"},"versions":{"0.3.0":{"name":"@clawdactual/openclaw-recall","version":"0.3.0","keywords":["openclaw","plugin","memory","recall","semantic-search","context"],"author":{"name":"ClawdActual","email":"clawdactual@proton.me"},"license":"MIT","_id":"@clawdactual/openclaw-recall@0.3.0","maintainers":[{"name":"clawdactual","email":"clawdactual@proton.me"}],"homepage":"https://github.com/Morpheis/openclaw-recall#readme","bugs":{"url":"https://github.com/Morpheis/openclaw-recall/issues"},"dist":{"shasum":"cac9b0d8fefe024e8208a5c228c65d4fdbff9074","tarball":"https://registry.npmjs.org/@clawdactual/openclaw-recall/-/openclaw-recall-0.3.0.tgz","fileCount":15,"integrity":"sha512-JTQJMWRrFtElHd52nBwgGwBuZRStmVWty0oAipo4K1vdINMvVEznKMEXmE8VE7o8uYVS9LroQ3FkIW+asrghlA==","signatures":[{"sig":"MEQCIGGajJTyH9m8U+i/DmqOZX7YTd1R875/3A1AqZlwsUmgAiBCAQalSFq0x5s5iMe6m4Q1Uaxo8O2iL9QA5CEXh0Rfyw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":129530},"main":"index.ts","type":"module","gitHead":"5dbf75984862f416f815f1a1f759b4b27b540a0d","_npmUser":{"name":"clawdactual","email":"clawdactual@proton.me"},"openclaw":{"extensions":["./index.ts"]},"repository":{"url":"git+https://github.com/Morpheis/openclaw-recall.git","type":"git"},"_npmVersion":"11.11.0","description":"Automatic associative memory recall for OpenClaw agents — surfaces relevant context before the model processes each message","directories":{},"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/openclaw-recall_0.3.0_1774539499819_0.9752275231252827","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@clawdactual/openclaw-recall","version":"0.3.1","keywords":["openclaw","plugin","memory","recall","semantic-search","context"],"author":{"name":"ClawdActual","email":"clawdactual@proton.me"},"license":"MIT","_id":"@clawdactual/openclaw-recall@0.3.1","maintainers":[{"name":"clawdactual","email":"clawdactual@proton.me"}],"homepage":"https://github.com/Morpheis/openclaw-recall#readme","bugs":{"url":"https://github.com/Morpheis/openclaw-recall/issues"},"dist":{"shasum":"93e6228c62fa3a5bdf24e8e528aed78da2029af4","tarball":"https://registry.npmjs.org/@clawdactual/openclaw-recall/-/openclaw-recall-0.3.1.tgz","fileCount":15,"integrity":"sha512-0DqKY3rkBVkK2EZ+UwAanMoCqUi0F9TeOPZ0MtLL/rQueHm2mQLy8mYAivHvUjNXNX3bI85j8fDMVYiPS6wE1g==","signatures":[{"sig":"MEYCIQC7A7hDfIL50mL1/DtlOw6znBYOKeW/CPGiDjpwX+6HrAIhAN6WlWWIGx3ApJuZdoa/3xGE0m9D89+2DNWBDhgJe793","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":130617},"main":"index.ts","type":"module","gitHead":"58b7fa294600036b24bf88a6d4ef356df66d4b36","_npmUser":{"name":"clawdactual","email":"clawdactual@proton.me"},"openclaw":{"extensions":["./index.ts"]},"repository":{"url":"git+https://github.com/Morpheis/openclaw-recall.git","type":"git"},"_npmVersion":"11.11.0","description":"Automatic associative memory recall for OpenClaw agents — surfaces relevant context before the model processes each message","directories":{},"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/openclaw-recall_0.3.1_1774540077421_0.6343303774198357","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@clawdactual/openclaw-recall","version":"0.3.2","keywords":["openclaw","plugin","memory","recall","semantic-search","context"],"author":{"name":"ClawdActual","email":"clawdactual@proton.me"},"license":"MIT","_id":"@clawdactual/openclaw-recall@0.3.2","maintainers":[{"name":"clawdactual","email":"clawdactual@proton.me"}],"homepage":"https://github.com/Morpheis/openclaw-recall#readme","bugs":{"url":"https://github.com/Morpheis/openclaw-recall/issues"},"dist":{"shasum":"ff532647caa4151ff5a03a59b2754ad82df7e52f","tarball":"https://registry.npmjs.org/@clawdactual/openclaw-recall/-/openclaw-recall-0.3.2.tgz","fileCount":15,"integrity":"sha512-l1N+2kTbBQTRuGI4jiGvk9lBP/2Z4oRlA7Yd+39OUtDRVS0OcbEu07j99XBBUHXoNbXHMerGlze9hmrKeSpAgQ==","signatures":[{"sig":"MEQCIEU6Kz4boUlMlSZEu+ZB+XyA4cjmnszzS2WgtYYMNVN1AiBlnevix7Ppa9ohqA7d+meK5iyc6437VxvWp/j0SMJxkg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":130753},"main":"index.ts","type":"module","gitHead":"075c3bde0a405469a40fa97675140ad3aaf12ba3","_npmUser":{"name":"clawdactual","email":"clawdactual@proton.me"},"openclaw":{"extensions":["./index.ts"]},"repository":{"url":"git+https://github.com/Morpheis/openclaw-recall.git","type":"git"},"_npmVersion":"11.11.0","description":"Automatic associative memory recall for OpenClaw agents — surfaces relevant context before the model processes each message","directories":{},"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/openclaw-recall_0.3.2_1774540283320_0.17688359953214117","host":"s3://npm-registry-packages-npm-production"}},"0.3.3":{"name":"@clawdactual/openclaw-recall","version":"0.3.3","keywords":["openclaw","plugin","memory","recall","semantic-search","context"],"author":{"name":"ClawdActual","email":"clawdactual@proton.me"},"license":"MIT","_id":"@clawdactual/openclaw-recall@0.3.3","maintainers":[{"name":"clawdactual","email":"clawdactual@proton.me"}],"homepage":"https://github.com/Morpheis/openclaw-recall#readme","bugs":{"url":"https://github.com/Morpheis/openclaw-recall/issues"},"dist":{"shasum":"6c881a652cb2909cd5ed01eba48a91f93615533b","tarball":"https://registry.npmjs.org/@clawdactual/openclaw-recall/-/openclaw-recall-0.3.3.tgz","fileCount":16,"integrity":"sha512-G5z5nNeOXKNCQbWvI+Wt3GxgYnKfYHIaM0v5WNDzD1N5ZEftuijDn+PI8NTfERxI1AmXFm27Fw0wxPrrycLi6w==","signatures":[{"sig":"MEUCIF0NlnZsN0NGVX2ozoHtRbEsGtQriv+NDkx9G9rhztVdAiEAqy9jqBC6a6O37N3KKLvH6g0o3gGLLHA8iheTkJL2ZdQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":141132},"main":"index.ts","type":"module","gitHead":"3bd5e4354f18fe5c8020f1adbd69353b1ba1b6c6","_npmUser":{"name":"clawdactual","email":"clawdactual@proton.me"},"openclaw":{"extensions":["./index.ts"]},"repository":{"url":"git+https://github.com/Morpheis/openclaw-recall.git","type":"git"},"_npmVersion":"11.11.0","description":"Automatic associative memory recall for OpenClaw agents — surfaces relevant context before the model processes each message","directories":{},"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/openclaw-recall_0.3.3_1774540689470_0.9522165617324347","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@clawdactual/openclaw-recall","version":"0.4.0","keywords":["openclaw","plugin","memory","recall","semantic-search","context"],"author":{"name":"ClawdActual","email":"clawdactual@proton.me"},"license":"MIT","_id":"@clawdactual/openclaw-recall@0.4.0","maintainers":[{"name":"clawdactual","email":"clawdactual@proton.me"}],"homepage":"https://github.com/Morpheis/openclaw-recall#readme","bugs":{"url":"https://github.com/Morpheis/openclaw-recall/issues"},"dist":{"shasum":"b8daad7da89e1b4bebb488029e9aca19a625bc12","tarball":"https://registry.npmjs.org/@clawdactual/openclaw-recall/-/openclaw-recall-0.4.0.tgz","fileCount":16,"integrity":"sha512-JqinMlpMrDgDncCBWpTh3BsMZVOgKd80CtBtfb9i/r+KGyEIyBuk787UarBJoGeE1nNOX7/YQsCCYccLe/62Rw==","signatures":[{"sig":"MEQCIAmtBwNXvYHOWa6jsMk/osp6mqz4tIQyEASYmrz2n5LYAiBDTxYjeRpns3fWLEEFQwNCMFMhor4uBRLDNxOQ27Kh3A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":149035},"main":"index.ts","type":"module","gitHead":"424556a72e44b89d32b6146889f5c3f6ac215693","_npmUser":{"name":"clawdactual","email":"clawdactual@proton.me"},"openclaw":{"extensions":["./index.ts"]},"repository":{"url":"git+https://github.com/Morpheis/openclaw-recall.git","type":"git"},"_npmVersion":"11.11.0","description":"Automatic associative memory recall for OpenClaw agents — surfaces relevant context before the model processes each message","directories":{},"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/openclaw-recall_0.4.0_1774541244974_0.6339172858498645","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@clawdactual/openclaw-recall","version":"0.4.1","keywords":["openclaw","plugin","memory","recall","semantic-search","context"],"author":{"name":"ClawdActual","email":"clawdactual@proton.me"},"license":"MIT","_id":"@clawdactual/openclaw-recall@0.4.1","maintainers":[{"name":"clawdactual","email":"clawdactual@proton.me"}],"homepage":"https://github.com/Morpheis/openclaw-recall#readme","bugs":{"url":"https://github.com/Morpheis/openclaw-recall/issues"},"dist":{"shasum":"c9a424f0a089281a4b14812a7118a05697bda56b","tarball":"https://registry.npmjs.org/@clawdactual/openclaw-recall/-/openclaw-recall-0.4.1.tgz","fileCount":16,"integrity":"sha512-oqD81BQ3tkMVV0PYGiZN/Zc7wURJDB8qoGjcSahICn2rbHa2Kevruxt59o9WDiMKeqPzFCFnp+uixK5KzTuUTw==","signatures":[{"sig":"MEUCIQDzxnXaFXHmklzLKo/VJv2ndfiLcl59QvCWCFVkZ1eV7AIgZsYXQwZ9Kcp6bADU/qFcc9EpaAcnwAR4buuh/Di8/HA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":148023},"main":"index.ts","type":"module","gitHead":"26c7b7be4d6c0b5161f7d456d5b08de203f8428d","_npmUser":{"name":"clawdactual","email":"clawdactual@proton.me"},"openclaw":{"extensions":["./index.ts"]},"repository":{"url":"git+https://github.com/Morpheis/openclaw-recall.git","type":"git"},"_npmVersion":"11.11.0","description":"Automatic associative memory recall for OpenClaw agents — surfaces relevant context before the model processes each message","directories":{},"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/openclaw-recall_0.4.1_1774541444825_0.18791011452141615","host":"s3://npm-registry-packages-npm-production"}},"0.4.2":{"name":"@clawdactual/openclaw-recall","version":"0.4.2","keywords":["openclaw","plugin","memory","recall","semantic-search","context"],"author":{"name":"ClawdActual","email":"clawdactual@proton.me"},"license":"MIT","_id":"@clawdactual/openclaw-recall@0.4.2","maintainers":[{"name":"clawdactual","email":"clawdactual@proton.me"}],"homepage":"https://github.com/Morpheis/openclaw-recall#readme","bugs":{"url":"https://github.com/Morpheis/openclaw-recall/issues"},"dist":{"shasum":"2510770778e834d9a8593ba4d6801ca17bd89977","tarball":"https://registry.npmjs.org/@clawdactual/openclaw-recall/-/openclaw-recall-0.4.2.tgz","fileCount":17,"integrity":"sha512-oEiVUuciBTVnH3dgNXYAKWxV4gtaHBwb/DrFmidv5Gl26HmigwAt6MrJPH6yzRvrkryVPTJ+uYc7CCOGk9bGOA==","signatures":[{"sig":"MEUCIQCxK8o/7tUdB+rW7Oxs9KSoufhXRcgTKnTDt3fndqMyqQIgQKU7C5h06M6UXc8rQ//Fxh+23CH8tPwM/qLqadmUJoM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":162255},"main":"index.ts","type":"module","gitHead":"0327d73347394bb1f7fe83c214790f23da0dd377","_npmUser":{"name":"clawdactual","email":"clawdactual@proton.me"},"openclaw":{"extensions":["./index.ts"]},"repository":{"url":"git+https://github.com/Morpheis/openclaw-recall.git","type":"git"},"_npmVersion":"11.11.0","description":"Automatic associative memory recall for OpenClaw agents — surfaces relevant context before the model processes each message","directories":{},"_nodeVersion":"25.8.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/openclaw-recall_0.4.2_1775935371687_0.527344018182812","host":"s3://npm-registry-packages-npm-production"}},"0.4.3":{"name":"@clawdactual/openclaw-recall","version":"0.4.3","description":"Automatic associative memory recall for OpenClaw agents — surfaces relevant context before the model processes each message","main":"index.ts","type":"module","scripts":{"test":"tsx test/query-extractor-v03.test.ts && tsx test/recall-engine.test.ts && tsx test/lcm-compat.test.ts && tsx test/engram-search.test.ts && tsx test/plugin-entry.test.ts","release:verify":"npm test && npm pack --dry-run"},"openclaw":{"extensions":["./index.ts"],"compat":{"pluginApi":">=2026.3.24-beta.2","minGatewayVersion":"2026.3.24-beta.2"},"build":{"openclawVersion":"2026.4.10","pluginSdkVersion":"2026.4.10"}},"keywords":["openclaw","openclaw-plugin","plugin","memory","recall","semantic-search","context"],"author":{"name":"ClawdActual","email":"clawdactual@proton.me"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Morpheis/openclaw-recall.git"},"homepage":"https://github.com/Morpheis/openclaw-recall#readme","bugs":{"url":"https://github.com/Morpheis/openclaw-recall/issues"},"peerDependencies":{"openclaw":"*"},"devDependencies":{"tsx":"^4.20.6"},"publishConfig":{"access":"public"},"gitHead":"3c94e5a6ea63b5cd3ee95c7a6ad5658f6668bff9","_id":"@clawdactual/openclaw-recall@0.4.3","_nodeVersion":"25.8.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-tGwjRes2hlJklQ/qiGFXUqm1EZcCXqREFSBua7DkFyTlgB1ZVrPv+n2wTRem2LZvNA0erI3lc4UEpSazNIqkSw==","shasum":"21acf450b87a22ead427568c4210f809aca55164","tarball":"https://registry.npmjs.org/@clawdactual/openclaw-recall/-/openclaw-recall-0.4.3.tgz","fileCount":12,"unpackedSize":109667,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDT9hG/3dRYQBrsrdiyTQtEb5H8mjj3j0WU4tftx8Sj6wIgGdV9p1kbFDdXx5MOsMB7wLztzs3XuqDWyMoBcZG458M="}]},"_npmUser":{"name":"clawdactual","email":"clawdactual@proton.me"},"directories":{},"maintainers":[{"name":"clawdactual","email":"clawdactual@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/openclaw-recall_0.4.3_1775938881209_0.807955530432872"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-26T15:38:19.735Z","modified":"2026-04-11T20:21:21.459Z","0.3.0":"2026-03-26T15:38:19.960Z","0.3.1":"2026-03-26T15:47:57.573Z","0.3.2":"2026-03-26T15:51:23.465Z","0.3.3":"2026-03-26T15:58:09.626Z","0.4.0":"2026-03-26T16:07:25.133Z","0.4.1":"2026-03-26T16:10:44.974Z","0.4.2":"2026-04-11T19:22:51.847Z","0.4.3":"2026-04-11T20:21:21.362Z"},"bugs":{"url":"https://github.com/Morpheis/openclaw-recall/issues"},"author":{"name":"ClawdActual","email":"clawdactual@proton.me"},"license":"MIT","homepage":"https://github.com/Morpheis/openclaw-recall#readme","keywords":["openclaw","openclaw-plugin","plugin","memory","recall","semantic-search","context"],"repository":{"type":"git","url":"git+https://github.com/Morpheis/openclaw-recall.git"},"description":"Automatic associative memory recall for OpenClaw agents — surfaces relevant context before the model processes each message","maintainers":[{"name":"clawdactual","email":"clawdactual@proton.me"}],"readme":"# 🧠 openclaw-recall\n\n**Automatic associative memory for OpenClaw agents.**\n\nRecall surfaces relevant context from your agent's memory systems before the model processes each message — like building your agent a hippocampus. No manual searching required.\n\n## Why?\n\nAI agents have long-term storage (files, databases) and working memory (context window), but the bridge between them is manual. The agent must *decide* to search, *know what* to search for, and *choose which system* to query.\n\nThe biggest failure mode isn't bad search results — it's **the agent not searching at all.**\n\nRecall fixes this by intercepting every message, running parallel semantic search across your agent's memory, and injecting the most relevant results into the context window — automatically.\n\n---\n\n## Installation\n\n### Quick install (recommended)\n\n```bash\n# Install from ClawHub plugin registry\nopenclaw plugins install clawhub:@clawdactual/openclaw-recall\n\n# Or install from npm\nopenclaw plugins install @clawdactual/openclaw-recall\n\n# Or install directly from GitHub\nopenclaw plugins install github:Morpheis/openclaw-recall\n\n# Or clone and install locally\ngit clone https://github.com/Morpheis/openclaw-recall.git\nopenclaw plugins install ./openclaw-recall\n```\n\n### Manual install\n\n```bash\n# Copy to extensions directory\nmkdir -p ~/.openclaw/extensions/openclaw-recall\ncp -r /path/to/openclaw-recall/* ~/.openclaw/extensions/openclaw-recall/\n\n# Add to your openclaw.json\n```\n\n```json\n{\n  \"plugins\": {\n    \"allow\": [\"openclaw-recall\"],\n    \"entries\": {\n      \"openclaw-recall\": {\n        \"enabled\": true\n      }\n    }\n  }\n}\n```\n\nThen restart:\n\n```bash\nopenclaw gateway restart\n```\n\n### Verify it's working\n\n```bash\n# Check plugin loaded\nopenclaw plugins list | grep recall\n\n# Watch recall in real-time\nopenclaw logs --follow | grep recall\n\n# Or use the /recall command in chat\n/recall\n```\n\n### Requirements\n\n- **OpenClaw** 2026.3.x or later\n- **An embedding provider** for memory search (Voyage, OpenAI, Gemini, or Mistral API key configured in OpenClaw)\n- **sqlite3** CLI for LCM source (pre-installed on macOS/Linux)\n- **qmd** CLI for QMD source (optional: `npm install -g @tobilu/qmd`)\n\n---\n\n## How It Works\n\n```\nMessage arrives → before_prompt_build hook fires\n                      │\n                ┌─────▼──────────┐\n                │ Skip Checks    │  Heartbeats, short msgs, casual msgs\n                └─────┬──────────┘\n                      │\n                ┌─────▼──────────┐\n                │ Extract Query  │  Proper nouns + adaptive strategy\n                └─────┬──────────┘\n                      │\n        ┌─────────────┴─────────────┐\n        │ (parallel)                │ (parallel)\n        ▼                           ▼\n  ┌───────────────┐          ┌───────────┐\n  │ Text Recall   │          │  Engram   │\n  │ ┌────┐┌────┐  │          │ Knowledge │\n  │ │mem ││LCM │  │          │  Graph    │\n  │ └────┘└────┘  │          │  Search   │\n  │ ┌────┐        │          └─────┬─────┘\n  │ │QMD │        │                │\n  │ └────┘        │                │\n  │  ↓ rank/dedup │                │\n  │  ↓ filter     │                │\n  │  ↓ top N      │                │\n  └───────┬───────┘                │\n          │                        │\n          ▼                        ▼\n  ## 🧠 Recalled Context   ## 🔗 Knowledge Graph\n  (text snippets)           (nodes + edges)\n          │                        │\n          └────────┬───────────────┘\n                   ▼\n          { prependContext } → injected into model context\n          (sections omitted individually if no results)\n```\n\nThe model sees a block like this at the top of its context:\n\n```markdown\n## 🧠 Recalled Context\nAutomatically retrieved based on the user's message.\nUse for context; search for more detail if needed.\n\n- **[memory/2026-03-15.md:42-48]** Discussed monorepo PR, Gemini review\n  suggested printf over echo for cross-platform compatibility\n- **[lcm:messages/2525]** [assistant] Weekly summary written...\n\n## 🔗 Knowledge Graph\n- **[engram:acme/AuthService]** AuthService (service) → calls: UserDB, TokenCache ← called_by: API-Gateway\n- **[engram:acme/API-Gateway]** API-Gateway (service) → calls: AuthService, OrderService ← called_by: Frontend\n```\n\nEach section is independent — if text recall finds nothing but engrams match, only the Knowledge Graph section appears (and vice versa). **Nothing is injected** when both are empty — zero overhead.\n\n### How much context does it use?\n\nRecall is controlled by a single setting: **`maxSnippets`** (default: 5). Each snippet is truncated to ~250 characters at a sentence boundary. With 5 snippets, recall typically adds ~300-400 tokens to the context — a fraction of most context windows.\n\nThere's no percentage-based token budget. You control exactly how many results you want, and the plugin takes the best ones.\n\n---\n\n## Memory Sources\n\nRecall searches multiple systems in parallel and merges the results. Enable what you have.\n\n### Memory Search (built-in)\n\nSearches OpenClaw's built-in memory index via `openclaw memory search`. Works with any configured embedding provider (Voyage, OpenAI, etc.).\n\n**This is the universal source** — if you only enable one, enable this one.\n\n```json\n\"sources\": {\n  \"memorySearch\": {\n    \"enabled\": true,\n    \"maxResults\": 5\n  }\n}\n```\n\n> **Note:** If you use the `memory-lancedb` plugin (which has its own auto-recall), the memory-search source is automatically disabled to avoid duplicate work. LCM and QMD sources still run since lancedb doesn't cover them. Override this with `\"skipMemorySearchIfLancedb\": false`.\n\n### LCM (conversation history)\n\nSearches the [Lossless Context Management](https://github.com/martian-engineering/lossless-claw) database via SQLite FTS5 full-text search. Finds relevant past conversations — including messages that have been compacted out of the active context window.\n\nRequires the `lossless-claw` plugin.\n\n```json\n\"sources\": {\n  \"lcm\": {\n    \"enabled\": true,\n    \"scope\": \"messages\",\n    \"maxResults\": 3\n  }\n}\n```\n\n**Scope options:**\n- `\"messages\"` — search raw conversation messages (default, most useful)\n- `\"summaries\"` — search compacted summary nodes\n- `\"both\"` — search everything\n\n### QMD (local search index)\n\nSearches a [QMD](https://github.com/tobilu/qmd) index via BM25 (fast keyword search, no API calls). Useful for agents with large file collections already indexed by QMD.\n\n```json\n\"sources\": {\n  \"qmd\": {\n    \"enabled\": true,\n    \"command\": \"qmd search\",\n    \"maxResults\": 5\n  }\n}\n```\n\n### Engram (knowledge graphs) — Dedicated Section\n\nSearches [Engram](https://github.com/Morpheis/engram) knowledge graphs — persistent relationship graphs of codebases, organizations, infrastructure, and concepts.\n\n**Unlike other sources, engram results get their own `## 🔗 Knowledge Graph` section** rather than competing in the ranked recall pool. Graph context is structural (nodes + edges) — fundamentally different from text snippets — so it shouldn't compete on relevance score. Engram search runs **in parallel** with text recall, adding no extra latency.\n\nIf no engram results match, the section is omitted entirely (zero extra tokens).\n\n**Example output:**\n```\n## 🧠 Recalled Context\nAutomatically retrieved based on the user's message.\n\n- **[memory/2026-03-25.md]** Mental Model tool built...\n- **[lcm:messages/436]** Discussed API key rotation policy for staging environment...\n\n## 🔗 Knowledge Graph\n- **[engram:acme/AuthService]** AuthService (service) → calls: UserDB, TokenCache ← called_by: API-Gateway\n```\n\n**Auto-detection:** If `~/.config/engram/models.db` exists, this source can auto-activate. Set `enabled: true` to force it on, or `enabled: false` to disable.\n\n```json\n\"sources\": {\n  \"engram\": {\n    \"enabled\": true,\n    \"maxResults\": 3,\n    \"excludeModels\": [\"personal-contacts\"]\n  }\n}\n```\n\n**Config options:**\n- `enabled` — `true`/`false` (default: `false`, auto-detects if DB exists)\n- `command` — engram CLI command (default: `engram`; customize if engram isn't on your PATH)\n- `maxResults` — max engram snippets per message (default: 3, independent of text recall's `maxSnippets`)\n- `excludeModels` — array of model names to skip (e.g., personal/family models you don't want in recall)\n\n---\n\n## Enabling and Disabling\n\n### Disable the entire plugin\n\n```json\n\"plugins\": {\n  \"entries\": {\n    \"openclaw-recall\": {\n      \"enabled\": false\n    }\n  }\n}\n```\n\n### Disable individual sources\n\nKeep the plugin active but turn off specific backends:\n\n```json\n\"config\": {\n  \"sources\": {\n    \"memorySearch\": { \"enabled\": true },\n    \"lcm\": { \"enabled\": false },\n    \"qmd\": { \"enabled\": false }\n  }\n}\n```\n\n### memory-lancedb coexistence\n\nWhen `memory-lancedb` is active, Recall automatically disables only the **memory-search source** (since lancedb handles its own recall for that layer). Other sources like LCM and QMD continue running — lancedb doesn't search conversation history or local file indexes.\n\nTo force memory-search on even with lancedb:\n\n```json\n\"config\": {\n  \"skipMemorySearchIfLancedb\": false\n}\n```\n\n---\n\n## Exclusion Patterns\n\n**This is the most important thing to tune.** Without good exclusion patterns, recall will surface noise — changelogs, license files, vendored dependencies, backup directories — instead of the context that actually matters.\n\n### Why exclusions matter\n\nEvery noisy result displaces a useful one. With a limited snippet count (default 5), one bad result means 20% of your recall budget is wasted. **Invest time tuning exclusions early** — watch the `## 🧠 Recalled Context` block in your agent's responses for a few days and add patterns for anything irrelevant that keeps showing up. The quality improvement compounds over time.\n\n### How patterns work\n\nThere are two types of exclusions:\n\n**`excludeFiles`** — exact filename matches (case-insensitive). These are files already injected into your agent's context by OpenClaw's bootstrap system. No point recalling what's already there.\n\n```json\n\"excludeFiles\": [\n  \"AGENTS.md\", \"SOUL.md\", \"TOOLS.md\", \"IDENTITY.md\",\n  \"USER.md\", \"HEARTBEAT.md\", \"MEMORY.md\", \"PERSONALITY.md\"\n]\n```\n\n**`excludePatterns`** — glob-style path patterns with `*` and `**` wildcards (case-insensitive). These filter out entire categories of files. **Custom patterns are additive** — built-in defaults are always included, so you only need to add patterns specific to your setup.\n\n```json\n\"excludePatterns\": [\n  \"**/my-backup/**\",\n  \"**/*-venv/**\",\n  \"**/pipeline/data/**\",\n  \"**/zh-cn/**\"\n]\n```\n\n### Built-in defaults\n\nThese patterns are always active (your custom patterns add to them, never replace them):\n\n```\n**/node_modules/**     # npm/yarn dependencies\n**/dist/**             # compiled output\n**/build/**            # build artifacts\n**/lib/**              # vendored libraries\n**/vendor/**           # vendored dependencies\n**/e2e/**              # end-to-end suites are high-noise for auto-recall\n**/prompts/**          # prompt libraries crowd out task-relevant context\n**/*transcript*.md     # long transcripts rarely help auto-recall ranking\nlossless-claw/**       # keep lossless-claw docs for explicit/manual search, not auto-recall\n**/changelog.md        # release notes (noisy keyword overlap)\n**/CHANGELOG.md\n**/license.md          # license text\n**/LICENSE.md\n**/contributing.md     # contribution guides\n**/CONTRIBUTING.md\n**/code-of-conduct.md  # codes of conduct\n**/CODE_OF_CONDUCT.md\n**/security.md         # security policies\n**/SECURITY.md\n```\n\n### Pattern syntax\n\n| Pattern | Matches |\n|---------|---------|\n| `**/node_modules/**` | Any file inside any `node_modules` directory |\n| `**/CHANGELOG.md` | Any file named `CHANGELOG.md` at any depth |\n| `**/*-venv/**` | Any directory ending in `-venv` (like `pdf-venv`, `docling-venv`) |\n| `**/pipeline/data/**` | Specific subdirectory path |\n| `**/zh-cn/**` | Chinese localization directories |\n\n### Tips for tuning exclusions\n\n1. **Start broad, refine later.** Begin with the defaults and add patterns as you notice noise in the recalled context block.\n2. **Watch the recalled context block.** If you see the same irrelevant source repeatedly, add a pattern for it.\n3. **Exclude backup directories.** Backup mirrors cause duplicate results that displace unique content.\n4. **Exclude generated files.** Build output, compiled code, and auto-generated content rarely contains useful recall context.\n5. **Exclude localization you don't use.** i18n directories in other languages add noise to keyword searches.\n6. **Exclude large data directories.** Raw datasets, logs, and pipeline data overwhelm useful results.\n7. **Be careful with blanket `docs/` exclusions.** Docs are often useful, especially for \"how does this work?\" questions. Prefer pruning clearly noisy subtrees first.\n8. **Prefer diversity over doc spam.** Recall caps docs/specs/prompts to one snippet per repo subtree (for example `openclaw/docs/**`) so a single documentation tree doesn't monopolize the snippet budget.\n\n---\n\n## Full Configuration Reference\n\nAll settings go under `plugins.entries.openclaw-recall.config`:\n\n```json5\n{\n  \"plugins\": {\n    \"entries\": {\n      \"openclaw-recall\": {\n        \"enabled\": true,\n        \"config\": {\n          // Max snippets injected per message (default: 5)\n          // This is the primary knob for controlling recall volume.\n          // Lower = tighter, higher quality. Higher = more context surfaced.\n          \"maxSnippets\": 5,\n\n          // Minimum relevance score 0-1 to include a result (default: 0.3)\n          // Raise this if you're getting too much noise\n          \"minRelevanceScore\": 0.3,\n\n          // Skip recall for very short messages after metadata stripping (default: enabled, 40 chars)\n          // Proper nouns in short messages override this (e.g., \"OathKeeper?\" still triggers)\n          \"skipShortMessages\": {\n            \"enabled\": true,\n            \"minChars\": 40\n          },\n\n          // Skip heartbeat messages entirely (default: true)\n          \"skipHeartbeats\": true,\n\n          // Only skip memory-search when lancedb is active (default: true)\n          // Other sources (LCM, QMD) still run since lancedb doesn't cover them\n          \"skipMemorySearchIfLancedb\": true,\n\n          // Files already in context — excluded from results\n          \"excludeFiles\": [\n            \"AGENTS.md\", \"SOUL.md\", \"TOOLS.md\", \"IDENTITY.md\",\n            \"USER.md\", \"HEARTBEAT.md\", \"MEMORY.md\", \"PERSONALITY.md\"\n          ],\n\n          // Glob patterns to exclude (additive — built-in defaults always included)\n          \"excludePatterns\": [\n            \"**/my-backup/**\",\n            \"**/*-venv/**\"\n          ],\n\n          // Memory sources — enable what you have\n          \"sources\": {\n            \"memorySearch\": { \"enabled\": true, \"maxResults\": 5 },\n            \"lcm\": { \"enabled\": true, \"scope\": \"messages\", \"maxResults\": 3 },\n            \"qmd\": { \"enabled\": false, \"command\": \"qmd search\", \"maxResults\": 5 },\n            \"engram\": {\n              \"enabled\": true,       // auto-detects if DB exists when omitted\n              \"maxResults\": 3,\n              \"excludeModels\": [],   // model names to skip (e.g., \"personal-contacts\")\n              \"command\": \"engram\"\n            }\n          },\n\n          // Debug logging (writes NDJSON to workspace)\n          \"debug\": {\n            \"enabled\": false,\n            \"logPath\": \".recall/debug.log\"\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n---\n\n## How Recall Differs from memory-lancedb\n\n| | memory-lancedb | openclaw-recall |\n|---|---|---|\n| **Storage** | Own LanceDB database | No storage — searches existing systems |\n| **What it searches** | Only its own captured memories | Everything: memory files, conversations, local indexes |\n| **Captures new info** | Yes (auto-capture) | No — read-only, never writes |\n| **Dependencies** | LanceDB binary + OpenAI key | Zero new deps — uses existing infrastructure |\n| **Query strategy** | Embeds full prompt | Adaptive: proper nouns + key phrases + segmented |\n| **Multi-source** | Single source | Multi-source with parallel search + cross-source boost |\n| **Coexistence** | N/A | Auto-disables memory-search source when lancedb active; LCM/QMD still run |\n\nBoth are valid approaches. Recall is designed for agents that already have memory systems (OpenClaw memory, LCM, QMD) and want automatic retrieval without adding another database.\n\n---\n\n## Troubleshooting\n\n### Plugin not loading\n- Check `plugins.allow` includes `\"openclaw-recall\"`\n- Check `plugins.entries.openclaw-recall.enabled` is `true`\n- Run `openclaw plugins list | grep recall` — should show \"loaded\"\n- Run `openclaw doctor` for compatibility warnings\n\n### No results appearing\n- Check your embedding provider is configured: `openclaw memory status`\n- Try a manual search: `openclaw memory search --json --query \"test\"`\n- Heartbeat messages are skipped by default\n- Short messages (<40 chars after metadata stripping) are skipped unless they contain proper nouns\n- If all sources are disabled, nothing will be searched\n\n### Poor or noisy results\n- **Most common fix:** add exclusion patterns for noisy directories\n- Raise `minRelevanceScore` (try 0.4 or 0.5)\n- Lower `maxSnippets` to keep only the highest-quality results\n- Enable debug logging to see what's being searched and returned\n\n### Duplicate results\n- Add backup/mirror directories to `excludePatterns`\n- Check QMD collections for overlapping indexed paths\n- Cross-source dedup normalizes paths but can't catch all mirrors\n\n---\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `/recall` | Show plugin status, active sources, and configuration |\n\n---\n\n## Roadmap\n\n- [x] Memory search source (OpenClaw built-in)\n- [x] LCM source (conversation history via FTS5)\n- [x] QMD source (local BM25 search)\n- [x] Proper noun prioritization in query extraction\n- [x] Metadata envelope stripping\n- [x] Cross-collection deduplication with path normalization\n- [x] Short message / casual message filtering\n- [x] LCM tool call/result filtering (noise reduction)\n- [x] LCM content cleaning (strip metadata from results)\n- [x] memory-lancedb coexistence (skip only memory-search, not entire plugin)\n- [x] Explicit capability registration (`before_prompt_build` + `/recall` command)\n- [x] Engram source (knowledge graph search with auto-detection)\n- [x] npm publish / ClawHub listing\n- [ ] Recall quality analytics (track hits/misses across sessions)\n- [ ] Per-channel config (different settings per channel)\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md"}