Skip to content

Commit f788af0

Browse files
authored
docs(memory): explain automatic QMD migration (#121911)
1 parent 2ae316e commit f788af0

5 files changed

Lines changed: 47 additions & 9 deletions

File tree

‎docs/cli/doctor.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ the container normally.
209209

210210
`openclaw doctor --fix` is the only owner for persistent file-to-SQLite migrations. It validates and claims each recognized source, writes and verifies canonical rows, records a migration receipt, then removes the retired source. Runtime code does not perform lazy imports or fallback reads.
211211

212+
For the retired QMD memory backend, including config rewrites and derived
213+
workspace cleanup, see [Migrating from QMD](/concepts/memory-builtin#migrating-from-qmd).
214+
212215
This includes retired MCP OAuth files under `<state-dir>/mcp-oauth/*.json`. Stop the Gateway before repair. Doctor imports valid credentials into `<state-dir>/state/openclaw.sqlite`, preserves an existing canonical SQLite session when both stores exist, drops the obsolete persisted OAuth `state` value, and uses its receipt to prevent a recreated stale file from resurrecting logged-out credentials. Retired `.lock` sidecars fail closed: if Doctor reports a stale owner, verify that no older OpenClaw process is running, remove that sidecar, and rerun Doctor.
213216

214217
## Shared state SQLite compaction

‎docs/concepts/memory-builtin.md‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
2+
doc-schema-version: 1
23
summary: "The default SQLite-based memory backend with keyword, vector, and hybrid search"
34
title: "Builtin memory engine"
45
read_when:
56
- You want to understand the default memory backend
67
- You want to configure embedding providers or hybrid search
8+
- You are migrating from the removed QMD memory backend
79
---
810

911
The builtin engine is the default memory backend. It stores your memory index
@@ -112,6 +114,42 @@ You can also index Markdown files outside the workspace with
112114
[configuration reference](/reference/memory-config#additional-memory-paths).
113115
</Info>
114116

117+
## Migrating from QMD
118+
119+
QMD has been removed; builtin is the only memory engine. After upgrading, run:
120+
121+
```bash
122+
openclaw doctor --fix
123+
```
124+
125+
Doctor removes the retired `memory.backend`, `memory.qmd`, and
126+
`memory.search.qmd` settings, including agent-scoped `memory.search.qmd`
127+
forms. It preserves QMD paths and extra collections as the corresponding
128+
`memory.search.extraPaths` entries, including `{ path, pattern }` globs. When
129+
Memory Core finds a retired per-agent QMD workspace under
130+
`~/.openclaw/agents/<agentId>/qmd/`, Doctor also offers to remove its derived
131+
indexes, model downloads, collection metadata, and session exports.
132+
133+
Canonical memory remains in `MEMORY.md`, `USER.md`, `memory/*.md`, and the
134+
migrated extra paths. Builtin indexes those same Markdown sources on its next
135+
sync. The cutover is lossless by construction: no canonical memory content is
136+
copied or deleted; only derived state is rebuilt.
137+
138+
Builtin now covers most QMD use cases with:
139+
140+
- hybrid BM25 and vector retrieval by default, followed by temporal decay,
141+
importance, and project affinity before MMR diversity,
142+
- bounded lexical query expansion for conversational searches,
143+
- string or `{ path, pattern }` entries in `memory.search.extraPaths`, and
144+
- optional image and audio indexing under `extraPaths` only.
145+
146+
QMD query mode's learned cross-encoder reranking and HyDE generation are not
147+
part of builtin memory. MMR reduces duplicate results but is not a learned
148+
relevance reranker. To replace QMD's in-process, zero-key GGUF embeddings,
149+
install the [llama.cpp provider](/plugins/llama-cpp) and set
150+
`memory.search.provider: "local"`; without an embedding provider, builtin uses
151+
BM25 keyword search only.
152+
115153
## When to use
116154

117155
The builtin engine is the right choice for most users:

‎docs/concepts/memory-qmd.md‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
doc-schema-version: 1
23
summary: "QMD memory backend removal and migration"
34
read_when:
45
- Migrating an installation that used the QMD memory backend
@@ -9,11 +10,5 @@ title: "QMD memory backend removal"
910

1011
The optional QMD memory backend has been removed. Builtin memory is now the only memory engine.
1112

12-
Run `openclaw doctor --fix` to remove retired `memory.backend`, `memory.qmd.*`, and
13-
`memory.search.qmd.*` settings, including agent-scoped variants. Your Markdown memory sources are
14-
indexed by the builtin engine on its next sync. Doctor preserves configured QMD paths and extra
15-
collections in the corresponding `memory.search.extraPaths` setting, including root-relative glob
16-
patterns. QMD indexes, exported session Markdown, downloaded models, and collection metadata are
17-
derived state and do not require migration.
18-
19-
See [Memory](/concepts/memory) for the current architecture and configuration.
13+
See [Migrating from QMD](/concepts/memory-builtin#migrating-from-qmd) for the
14+
automatic Doctor migration, builtin feature coverage, and remaining gaps.

‎docs/concepts/multi-agent.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ The QMD cross-agent search path was removed. Builtin memory does not search
167167
another agent's transcript corpus; each agent searches only its own configured
168168
memory and eligible same-agent session sources. Put intentionally shared
169169
Markdown in an explicit shared `memory.search.extraPaths` directory when the
170-
same reference material should be indexed by multiple agents.
170+
same reference material should be indexed by multiple agents. For the full
171+
upgrade path, see [Migrating from QMD](/concepts/memory-builtin#migrating-from-qmd).
171172

172173
## One WhatsApp number, multiple people (DM split)
173174

‎docs/gateway/doctor.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ Flags:
161161
- OAuth TLS prerequisites check for OpenAI Codex OAuth profiles.
162162
- Plugin/tool allowlist warnings when `plugins.allow` is restrictive but tool policy still asks for wildcard or plugin-owned tools.
163163
- Legacy on-disk state migration (sessions/agent dir/WhatsApp auth).
164+
- Retired QMD memory config and derived workspace cleanup; see [Migrating from QMD](/concepts/memory-builtin#migrating-from-qmd).
164165
- Legacy plugin manifest contract key migration (`speechProviders`, `realtimeTranscriptionProviders`, `realtimeVoiceProviders`, `mediaUnderstandingProviders`, `imageGenerationProviders`, `videoGenerationProviders`, `webFetchProviders`, `webSearchProviders` → `contracts`).
165166
- Legacy cron store migration (`jobId`, `schedule.cron`, top-level delivery/payload fields, payload `provider`, `notify: true` webhook fallback jobs).
166167
- Legacy workspace `TOOLS.md` migration into the `## Tools` section of `AGENTS.md`, with the original archived under the state directory before removal.

0 commit comments

Comments
 (0)