mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 18:04:45 +00:00
fix(config): warn for missing official memory slot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
Peter Steinberger
parent
d16efadc00
commit
d1787b73db
@@ -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
|
||||
|
||||
@@ -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 () => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user