Skip to content

Commit 689926c

Browse files
authored
docs: clarify dual-memory architecture (fixes #344) (#367)
* docs: clarify dual-memory architecture (fixes #344) Add two improvements addressing Issue #344: 1. README: add Dual-Memory Architecture section explaining Plugin Memory (LanceDB) vs Markdown Memory distinction 2. index.ts: log dual-memory warning on plugin startup Refs: #344 * Address AliceLJY review comments: restore cli.ts, remove import-markdown reference, restore removed README sections - Restore cli.ts (was accidentally deleted, all CLI commands preserved) - Remove import-markdown command reference from dual-memory section (lives in PR #426) - Restore beta.10 version banner and OpenClaw 2026.3+ badge - Restore Auto-recall timeout tuning FAQ section Ref: #367
1 parent 65d912c commit 689926c

File tree

2 files changed

+33
-4
lines changed

2 files changed

+33
-4
lines changed

README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ A LanceDB-backed OpenClaw memory plugin that stores preferences, decisions, and
1313
[![npm version](https://img.shields.io/npm/v/memory-lancedb-pro)](https://www.npmjs.com/package/memory-lancedb-pro)
1414
[![LanceDB](https://img.shields.io/badge/LanceDB-Vectorstore-orange)](https://lancedb.com)
1515
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
16-
1716
<h2>⚡ <a href="https://github.com/CortexReach/memory-lancedb-pro/releases/tag/v1.1.0-beta.10">v1.1.0-beta.10 — OpenClaw 2026.3+ Hook Adaptation</a></h2>
1817

1918
<p>
20-
✅ Fully adapted for OpenClaw 2026.3+ new plugin architecture<br>
21-
🔄 Uses <code>before_prompt_build</code> hooks (replacing deprecated <code>before_agent_start</code>)<br>
22-
🩺 Run <code>openclaw doctor --fix</code> after upgrading
19+
✅ Fully adapted for OpenClaw 2026.3+ new plugin architecture<br>
20+
🔄 Uses <code>before_prompt_build</code> hooks (replacing deprecated <code>before_agent_start</code>)<br>
21+
🩺 Run <code>openclaw doctor --fix</code> after upgrading
2322
</p>
2423

24+
2525
[English](README.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JA.md) | [한국어](README_KO.md) | [Français](README_FR.md) | [Español](README_ES.md) | [Deutsch](README_DE.md) | [Italiano](README_IT.md) | [Русский](README_RU.md) | [Português (Brasil)](README_PT-BR.md)
2626

2727
</div>
@@ -129,6 +129,26 @@ Add to your `openclaw.json`:
129129
- `extractMinMessages: 2` → extraction triggers in normal two-turn chats
130130
- `sessionMemory.enabled: false` → avoids polluting retrieval with session summaries on day one
131131

132+
---
133+
134+
## ⚠️ Dual-Memory Architecture (Important)
135+
136+
When `memory-lancedb-pro` is active, your system has **two independent memory layers** that do **not** auto-sync:
137+
138+
| Memory Layer | Storage | What it's for | Recallable? |
139+
|---|---|---|---|
140+
| **Plugin Memory** | LanceDB (vector store) | Semantic recall via `memory_recall` / auto-recall | ✅ Yes |
141+
| **Markdown Memory** | `MEMORY.md`, `memory/YYYY-MM-DD.md` | Startup context, human-readable journal | ❌ Not auto-recalled |
142+
143+
**Key principle:**
144+
> A fact written into `memory/YYYY-MM-DD.md` is visible in startup context, but `memory_recall` **will not find it** unless it was also written via `memory_store` (or auto-captured by the plugin).
145+
146+
**What this means for you:**
147+
- Need semantic recall? → Use `memory_store` or let auto-capture do it
148+
- `memory/YYYY-MM-DD.md` → treat as a **daily journal / log**, not a recall source
149+
- `MEMORY.md` → curated human-readable reference, not a recall source
150+
- Plugin memory → **primary recall source** for `memory_recall` and auto-recall
151+
132152
Validate & restart:
133153

134154
```bash

index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,6 +1994,15 @@ const memoryLanceDBProPlugin = {
19941994
);
19951995
logReg(`memory-lancedb-pro: diagnostic build tag loaded (${DIAG_BUILD_TAG})`);
19961996

1997+
// Dual-memory model warning: help users understand the two-layer architecture
1998+
// Runs synchronously and logs warnings; does NOT block gateway startup.
1999+
api.logger.info(
2000+
`[memory-lancedb-pro] memory_recall queries the plugin store (LanceDB), not MEMORY.md.\n` +
2001+
` - Plugin memory (LanceDB) = primary recall source for semantic search\n` +
2002+
` - MEMORY.md / memory/YYYY-MM-DD.md = startup context / journal only\n` +
2003+
` - Use memory_store or auto-capture for recallable memories.\n`
2004+
);
2005+
19972006
api.on("message_received", (event: any, ctx: any) => {
19982007
const conversationKey = buildAutoCaptureConversationKeyFromIngress(
19992008
ctx.channelId,

0 commit comments

Comments
 (0)