fix(config): warn for missing official memory slot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Gio Lodi
2026-05-15 21:27:38 -07:00
committed by Peter Steinberger
parent d16efadc00
commit d1787b73db
3 changed files with 45 additions and 4 deletions

View File

@@ -1,14 +1,14 @@
---
summary: "Configure the bundled LanceDB memory plugin, including local Ollama-compatible embeddings"
summary: "Configure the official external LanceDB memory plugin, including local Ollama-compatible embeddings"
read_when:
- You are configuring the bundled memory-lancedb plugin
- You are configuring the memory-lancedb plugin
- You want LanceDB-backed long-term memory with auto-recall or auto-capture
- You are using local OpenAI-compatible embeddings such as Ollama
title: "Memory LanceDB"
sidebarTitle: "Memory LanceDB"
---
`memory-lancedb` is a bundled memory plugin that stores long-term memory in
`memory-lancedb` is an official external memory plugin that stores long-term memory in
LanceDB and uses embeddings for recall. It can automatically recall relevant
memories before a model turn and capture important facts after a response.
@@ -16,6 +16,18 @@ Use it when you want a local vector database for memory, need an
OpenAI-compatible embedding endpoint, or want to keep a memory database outside
the default built-in memory store.
## Installation
Install `memory-lancedb` before setting `plugins.slots.memory = "memory-lancedb"`:
```bash
openclaw plugins install @openclaw/memory-lancedb
```
The plugin is published to npm and is not bundled into the OpenClaw runtime image.
The installer writes the plugin entry and switches the memory slot when no other
plugin owns it.
<Note>
`memory-lancedb` is an active memory plugin. Enable it by selecting the memory
slot with `plugins.slots.memory = "memory-lancedb"`. Companion plugins such as

View File

@@ -330,6 +330,33 @@ describe("config plugin validation", () => {
).toBe(false);
});
it("warns instead of failing when an official external memory slot plugin is not installed", () => {
const res = validateConfigObjectWithPlugins(
{
agents: { list: [{ id: "pi" }] },
plugins: {
slots: { memory: "memory-lancedb" },
entries: { "memory-lancedb": { enabled: true } },
},
},
{
env: suiteEnv(),
pluginMetadataSnapshot: {
manifestRegistry: {
plugins: [],
diagnostics: [],
},
},
},
);
expect(res.ok).toBe(true);
const message =
"plugin not installed: memory-lancedb — install the official external plugin with: openclaw plugins install @openclaw/memory-lancedb";
expectPathMessage(res.warnings, "plugins.slots.memory", message);
expectPathMessage(res.warnings, "plugins.entries.memory-lancedb", message);
});
it.runIf(process.platform !== "win32")(
"reports configured blocked plugins without stale not-found wording",
async () => {

View File

@@ -1557,7 +1557,9 @@ function validateConfigObjectWithPluginsBase(
memorySlot.trim() &&
!knownIds.has(memorySlot)
) {
pushMissingPluginIssue("plugins.slots.memory", memorySlot);
pushMissingPluginIssue("plugins.slots.memory", memorySlot, {
warnOnly: Boolean(formatMissingOfficialExternalPluginWarning(memorySlot)),
});
}
let selectedMemoryPluginId: string | null = null;