#cant get extra path for qmd memory to work
162 messages Ā· Page 1 of 1 (latest)
Let me verify the docs and the actual config key in source, so I donāt guess.
Yep, I checked the docs + source, and this is probably the gotcha:
extraPaths does not replace the default memory. It only adds extra indexed search roots.
So with QMD:
agents.defaults.memorySearch.extraPaths= additivememory.qmd.paths= additivememory.qmd.includeDefaultMemorydefaults to true
That means OpenClaw will still index MEMORY.md + memory/**/*.md unless you disable it.
If you want only your extra path for QMD indexing, use something like:
{
memory: {
backend: "qmd",
qmd: {
includeDefaultMemory: false,
paths: [
{ name: "notes", path: "/your/extra/path", pattern: "**/*.md" }
]
}
}
}
Two other important gotchas:
- Bootstrap/system prompt still prefers
MEMORY.md
Extra QMD paths are for search/indexing, not automatic prompt injection.
Docs explicitly say bootstrap auto-loads MEMORY.md, not arbitrary extra files/dirs.
- Writes/promotions still go to
MEMORY.md
Long-term promotion is still centered onMEMORY.md, not an arbitrary extra path.
Quick check to confirm what OpenClaw is actually seeing:
openclaw memory status --deep --index --verbose
That should show whether your extra path is in the memory index.
Docs:
If you paste your current memory + agents.defaults.memorySearch config block, I can sanity-check the exact shape.
i dont only want the extra path. its just not even using the extra path
Got it, then Iād check these 4 things first, because one of them is usually the culprit:
-
Group/chat scope
If youāre testing in Discord channels/threads, QMD is DM-only by default.
So the extra path can be indexed fine, but results wonāt be surfaced there unless you allow groups/channels.{ memory: { backend: "qmd", qmd: { scope: { default: "allow" } } }
}
-
extraPathsonly indexes Markdown
agents.defaults.memorySearch.extraPathsdefaults to**/*.md.
If your extra path has non-.mdfiles, it wonāt pick them up.For more control, use
memory.qmd.paths:{ memory: { backend: "qmd", qmd: { paths: [
{ name: "extra", path: "/your/path", pattern: "**/*.md" }
]
}
}
}
-
It may not be indexed yet
Force a refresh:openclaw memory status --deep --index --verbose -
Test the index directly, not the assistant behavior
Use a phrase that exists only in a file under the extra path:
openclaw memory search --query "some unique phrase from that file" --json
If that search returns nothing, itās an indexing/config issue.
If it returns the file, then QMD is working and the issue is retrieval/scope.
If you paste:
- your
memoryblock - your
agents.defaults.memorySearchblock - output of
openclaw memory status --deep --index --verbose
I can tell you exactly whatās off.
so testing the index directly is what ive been doing this entire time.
i have to break the output into multiple messages for length so wait until i say "im done" for you to reply.
totaluser@Total-Hardware:~$ openclaw memory status --deep --index --verbose
20:30:54-07:00 [plugins] plugins.allow is empty; discovered non-bundled plugins may auto-load: lossless-claw (/home/totaluser/.openclaw/extensions/lossless-claw/dist/index.js). Set plugins.allow to explicit trusted ids.
š¦ OpenClaw 2026.4.11 (769908e)
Your task has been queued; your dignity has been deprecated.
20:30:59-07:00 [bedrock-mantle-discovery] Mantle IAM token generation unavailable
20:31:06-07:00 [memory] qmd collection add skipped for memory-alt-main: qmd collection add /home/totaluser/.openclaw/workspace --name memory-alt-main --glob memory.md failed (code 1): A collection already exists for this path and pattern:
Name: memory-root-main (qmd://memory-root-main/)
Pattern: **/*.md
Use 'qmd update' to re-index it, or remove it first with 'qmd collection remove memory-root-main'
ā
ā
20:31:19-07:00 [memory] qmd collection add skipped for memory-alt-forge: qmd collection add /home/totaluser/.openclaw/forge --name memory-alt-forge --glob memory.md failed (code 1): A collection already exists for this path and pattern:
Name: memory-root-forge (qmd://memory-root-forge/)
Pattern: **/*.md
Use 'qmd update' to re-index it, or remove it first with 'qmd collection remove memory-root-forge'
ā
ā
20:31:33-07:00 [memory] qmd collection add skipped for memory-alt-scout: qmd collection add /home/totaluser/.openclaw/scout --name memory-alt-scout --glob memory.md failed (code 1): A collection already exists for this path and pattern:
Name: memory-root-scout (qmd://memory-root-scout/)
Pattern: **/*.md
Use 'qmd update' to re-index it, or remove it first with 'qmd collection remove memory-root-scout'
ā
ā
20:31:45-07:00 [memory] qmd collection add skipped for memory-alt-vital: qmd collection add /home/totaluser/.openclaw/vital --name memory-alt-vital --glob memory.md failed (code 1): A collection already exists for this path and pattern:
Name: memory-root-vital (qmd://memory-root-vital/)
Pattern: **/*.md
Use 'qmd update' to re-index it, or remove it first with 'qmd collection remove memory-root-vital'
ā
ā
20:31:58-07:00 [memory] qmd collection add skipped for memory-alt-sentinel: qmd collection add /home/totaluser/.openclaw/sentinel --name memory-alt-sentinel --glob memory.md failed (code 1): A collection already exists for this path and pattern:
Name: memory-root-sentinel (qmd://memory-root-sentinel/)
Pattern: **/*.md
Use 'qmd update' to re-index it, or remove it first with 'qmd collection remove memory-root-sentinel'
ā
ā
20:32:18-07:00 [memory] qmd collection add skipped for memory-alt-alfred: qmd collection add /home/totaluser/.openclaw/alfred --name memory-alt-alfred --glob memory.md failed (code 1): A collection already exists for this path and pattern:
Name: memory-root-alfred (qmd://memory-root-alfred/)
Pattern: **/*.md
Use 'qmd update' to re-index it, or remove it first with 'qmd collection remove memory-root-alfred'
ā
ā
20:32:23-07:00 [memory] qmd collection add skipped for memory-alt-rush: qmd collection add /home/totaluser/.openclaw/rush --name memory-alt-rush --glob memory.md failed (code 1): A collection already exists for this path and pattern:
Name: memory-root-rush (qmd://memory-root-rush/)
Pattern: **/*.md
Use 'qmd update' to re-index it, or remove it first with 'qmd collection remove memory-root-rush'
ā
ā
20:32:28-07:00 [memory] qmd collection add skipped for memory-alt-cipher: qmd collection add /home/totaluser/.openclaw/cipher --name memory-alt-cipher --glob memory.md failed (code 1): A collection already exists for this path and pattern:
Name: memory-root-cipher (qmd://memory-root-cipher/)
Pattern: **/*.md
Use 'qmd update' to re-index it, or remove it first with 'qmd collection remove memory-root-cipher'
ā
ā
Memory index complete.
Memory Search (main)
Provider: qmd (requested: qmd)
Model: qmd
Sources: memory, sessions
Indexed: 1529/165 files Ā· 1529 chunks
Dirty: no
Store: ~/.openclaw/agents/main/qmd/xdg-cache/qmd/index.sqlite
Workspace: ~/.openclaw/workspace
Dreaming: off
Embeddings: ready
By source:
memory Ā· 1321/63 files Ā· 1321 chunks
sessions Ā· 208/102 files Ā· 208 chunks
Vector: ready
Batch: disabled (failures 0/0)
Recall store: 1 entries Ā· 0 promoted Ā· 1 concept-tagged Ā· 0 spaced Ā· scripts=1 latin
Recall path: ~/.openclaw/workspace/memory/.dreams/short-term-recall.json
Recall updated: 2026-04-12T23:47:20.338Z
QMD audit: ~/.openclaw/agents/main/qmd/xdg-cache/qmd/index.sqlite Ā· 59420672 bytes Ā· 5 collections
Memory index complete.
Memory Search (forge)
Provider: qmd (requested: qmd)
Model: qmd
Sources: memory, sessions
Indexed: 815/185 files Ā· 815 chunks
Dirty: no
Store: ~/.openclaw/agents/forge/qmd/xdg-cache/qmd/index.sqlite
Workspace: ~/.openclaw/forge
Dreaming: off
Embeddings: ready
By source:
memory Ā· 581/49 files Ā· 581 chunks
sessions Ā· 234/136 files Ā· 234 chunks
Vector: ready
Batch: disabled (failures 0/0)
Recall store: 4 entries Ā· 0 promoted Ā· 4 concept-tagged Ā· 0 spaced Ā· scripts=4 latin
Recall path: ~/.openclaw/forge/memory/.dreams/short-term-recall.json
Recall updated: 2026-04-13T02:31:31.898Z
QMD audit: ~/.openclaw/agents/forge/qmd/xdg-cache/qmd/index.sqlite Ā· 43405312 bytes Ā· 5 collections
Memory index complete.
Memory Search (scout)
Provider: qmd (requested: qmd)
Model: qmd
Sources: memory, sessions
Indexed: 838/205 files Ā· 838 chunks
Dirty: no
Store: ~/.openclaw/agents/scout/qmd/xdg-cache/qmd/index.sqlite
Workspace: ~/.openclaw/scout
Dreaming: off
Embeddings: ready
By source:
memory Ā· 649/93 files Ā· 649 chunks
sessions Ā· 189/112 files Ā· 189 chunks
Vector: ready
Batch: disabled (failures 0/0)
Recall store: 0 entries Ā· 0 promoted Ā· 0
concept-tagged Ā· 0 spaced
Recall path: ~/.openclaw/scout/memory/.dreams/short-term-recall.json
QMD audit: ~/.openclaw/agents/scout/qmd/xdg-cache/qmd/index.sqlite Ā· 39432192 bytes Ā· 5 collections
Memory index complete.
Memory Search (vital)
Provider: qmd (requested: qmd)
Model: qmd
Sources: memory, sessions
Indexed: 1112/175 files Ā· 1112 chunks
Dirty: no
Store: ~/.openclaw/agents/vital/qmd/xdg-cache/qmd/index.sqlite
Workspace: ~/.openclaw/vital
Dreaming: off
Embeddings: ready
By source:
memory Ā· 899/35 files Ā· 899 chunks
sessions Ā· 213/140 files Ā· 213 chunks
Vector: ready
Batch: disabled (failures 0/0)
Recall store: 0 entries Ā· 0 promoted Ā· 0 concept-tagged Ā· 0 spaced
Recall path: ~/.openclaw/vital/memory/.dreams/short-term-recall.json
QMD audit: ~/.openclaw/agents/vital/qmd/xdg-cache/qmd/index.sqlite Ā· 68493312 bytes Ā· 5 collections
Memory index complete.
Memory Search (sentinel)
Provider: qmd (requested: qmd)
Model: qmd
Sources: memory, sessions
Indexed: 1183/461 files Ā· 1183 chunks
Dirty: no
Store: ~/.openclaw/agents/sentinel/qmd/xdg-cache/qmd/index.sqlite
Workspace: ~/.openclaw/sentinel
Dreaming: off
Embeddings: ready
By source:
memory Ā· 754/166 files Ā· 754 chunks
sessions Ā· 429/295 files Ā· 429 chunks
Vector: ready
Batch: disabled (failures 0/0)
Recall store: 0 entries Ā· 0 promoted Ā· 0 concept-tagged Ā· 0 spaced
Recall path: ~/.openclaw/sentinel/memory/.dreams/short-term-recall.json
QMD audit: ~/.openclaw/agents/sentinel/qmd/xdg-cache/qmd/index.sqlite Ā· 37052416 bytes Ā· 5 collections
Memory index complete.
Memory Search (alfred)
Provider: qmd (requested: qmd)
Model: qmd
Sources: memory, sessions
Indexed: 489/42 files Ā· 489 chunks
Dirty: no
Store: ~/.openclaw/agents/alfred/qmd/xdg-cache/qmd/index.sqlite
Workspace: ~/.openclaw/alfred
Dreaming: off
Embeddings: ready
By source
memory Ā· 434/12 files Ā· 434 chunks
sessions Ā· 55/30 files Ā· 55 chunks
Vector: ready
Batch: disabled (failures 0/0)
Recall store: 0 entries Ā· 0 promoted Ā· 0 concept-tagged Ā· 0 spaced
Recall path: ~/.openclaw/alfred/memory/.dreams/short-term-recall.json
QMD audit: ~/.openclaw/agents/alfred/qmd/xdg-cache/qmd/index.sqlite Ā· 24944640 bytes Ā· 5 collections
Memory index complete.
Memory Search (rush)
Provider: qmd (requested: qmd)
Model: qmd
Sources: memory, sessions
Indexed: 158/8 files Ā· 158 chunks
Dirty: no
Store: ~/.openclaw/agents/rush/qmd/xdg-cache/qmd/index.sqlite
Workspace: ~/.openclaw/rush
Dreaming: off
Embeddings: ready
By source:
memory Ā· 151/5 files Ā· 151 chunks
sessions Ā· 7/3 files Ā· 7 chunks
Vector: ready
Batch: disabled (failures 0/0)
Recall store: 4 entries Ā· 0 promoted Ā· 4 concept-tagged Ā· 0 spaced Ā· scripts=3 latin, 1 other
Recall path: ~/.openclaw/rush/memory/.dreams/short-term-recall.json
Recall updated: 2026-04-13T01:09:48.567Z
QMD audit: ~/.openclaw/agents/rush/qmd/xdg-cache/qmd/index.sqlite Ā· 6615040 bytes Ā· 5 collections
Memory index complete.
Memory Search (cipher)
Provider: qmd (requested: qmd)
Model: qmd
Sources: memory, sessions
Indexed: 154/77 files Ā· 154 chunks
Dirty: no
Store: ~/.openclaw/agents/cipher/qmd/xdg-cache/qmd/index.sqlite
Workspace: ~/.openclaw/cipher
Dreaming: off
Embeddings: ready
By source:
memory Ā· 28/10 files Ā· 28 chunks
sessions Ā· 126/67 files Ā· 126 chunks
Vector: ready
Batch: disabled (failures 0/0)
Recall store: 0 entries Ā· 0 promoted Ā· 0 concept-tagged Ā· 0 spaced
Recall path: ~/.openclaw/cipher/memory/.dreams/short-term-recall.json
QMD audit: ~/.openclaw/agents/cipher/qmd/xdg-cache/qmd/index.sqlite Ā· 6086656 bytes Ā· 5 collections
im done
Thanks, this is actually useful.
From this output alone, QMD does not look broken. A few things stand out:
Provider: qmd,Embeddings: ready,Dirty: no- each agent has
QMD audit ... 5 collections memory-alt-* skippedis happening because an existingmemory-root-*collection already covers that path with**/*.md
So my read is:
- your extra path is probably being indexed
- the ugly part is more likely stale/legacy QMD collection state
memory statusstill does not tell us which exact collection/path won the query
The suspicious bit is this:
memory-alt-main ... failed ...
existing collection: memory-root-main
Pattern: **/*.md
That suggests you already have an older broad workspace-root collection hanging around, which can make this really confusing.
What I need next is not more memory status. I need these 3 things:
openclaw config get memory --json
openclaw config get agents.defaults.memorySearch --json
openclaw memory search --agent main --query "EXACT UNIQUE TEXT THAT ONLY EXISTS IN THE EXTRA PATH" --json
If youāre not testing main, swap in the actual agent id.
Also, one key detail: is your extra path
- outside the workspace, or
- inside
~/.openclaw/workspace?
Because if itās inside the workspace, that old broad memory-root-* collection may already be swallowing it into the default root collection, which makes it look like the extra path is being ignored when it actually isnāt.
So at this point Iām leaning toward stale QMD collection layout / overlap, not āextraPaths does nothingā.
Paste those 3 outputs and I can narrow it down fast.
like if there is some text like "quantum mechanics" in one of the files of in the extra path it should be able to find it if its working right?
Yes, for a direct CLI search, thatās the right expectation.
If:
- the file is actually indexed,
- itās a supported file type, and
"quantum mechanics"is a reasonably unique phrase in that extra path,
then:
openclaw memory search --agent main --query "quantum mechanics" --json
should return a hit from that file.
A couple of caveats:
- In normal chat, the assistant might not call memory search every time, so chat behavior is fuzzier.
- But with
openclaw memory search ..., it should be much more direct. - If the phrase exists only in the extra path and this command still returns nothing, then yeah, Iād treat that as extra path indexing not working correctly or stale QMD collection state.
Best test is an even more unique string, like a full sentence or weird phrase that appears in exactly one file. If that still misses, thatās a real signal.
there are two halves
totaluser@Total-Hardware:~$ openclaw config get memory --json
openclaw config get agents.defaults.memorySearch --json
openclaw memory search --agent main --query "quantum mechanics" --json
{
"backend": "qmd",
"qmd": {
"command": "/home/totaluser/.local/share/pnpm/qmd",
"paths": [
{
"path": "/home/totaluser/.openclaw/yr-knowledge",
"name": "yr-knowledge",
"pattern": "**/.md"
}
],
"sessions": {
"enabled": true
},
"scope": {
"default": "deny",
"rules": [
{
"action": "allow",
"match": {
"chatType": "direct"
}
},
{
"action": "allow",
"match": {
"chatType": "channel"
}
}
]
}
}
}
{
"enabled": true,
"experimental": {
"sessionMemory": true
}
}
20:42:09-07:00 [plugins] plugins.allow is empty; discovered non-bundled plugins may auto-load: lossless-claw (/home/totaluser/.openclaw/extensions/lossless-claw/dist/index.js). Set plugins.allow to explicit trusted ids.
20:42:22-07:00 [memory] qmd collection add skipped for memory-alt-main: qmd collection add /home/totaluser/.openclaw/workspace --name memory-alt-main --glob memory.md failed (code 1): A collection already exists for this path and pattern:
Name: memory-root-main (qmd://memory-root-main/)
Pattern: **/.md
Use 'qmd update' to re-index it, or remove it first with 'qmd collection remove memory-root-main'
20:42:23-07:00 [memory] qmd search failed because a managed collection is missing; repairing collections and retrying once
20:42:27-07:00 [memory] qmd collection add skipped for memory-alt-main: qmd collection add /home/totaluser/.openclaw/workspace --name memory-alt-main --glob memory.md failed (code 1): A collection already exists for this path and pattern:
this is part 1
20:42:28-07:00 [memory] qmd search failed: Error: qmd search quantum mechanics --json -n 6 -c memory-alt-main failed (code 1): Collection not found: memory-alt-main
20:42:28-07:00 [memory] qmd memory failed; switching to builtin index: qmd search quantum mechanics --json -n 6 -c memory-alt-main failed (code 1): Collection not found: memory-alt-main
{
"results": [
{
"id": "eda31c292358abf1f5b160b92199894d84329bf4feb9c213ebe30aa849fa0e55",
"path": "memory/digest-2026-04-03.md",
"startLine": 1,
"endLine": 31,
"score": 0.8343585020974064,
"textScore": 0.8343585020974064,
"snippet": "Scout Daily Digest ā 2026-04-03\n\nFrom: Scout\nTo: Total\nTime: 13:06 PST\n\n---\n\n š“ High Priority\n\n Health Privacy Toggle ā Technical Deep Dive\nResearch file: workspace/research/2026-04-03-health-privacy-toggle-mechanism.md\nRouted to: Vital's HEALTH_INBOX\n\nWhat I found:\nThe Health Privacy toggle controls per-data-type permissions in Apple HealthKit (iOS) or Google Health Connect (Android) ā not a single global switch. \n\nApple HealthKit mechanics:\n- Toggling off sets HKAuthorizationStatus.sharingDenied per data type ā writes fail with HKError.healthDataUnavailable, reads return empty (indistinguishable from no data existing)\n- User controls at: Settings >",
"source": "memory"
}
]
}
20:42:34-07:00 [memory] chunks written for MEMORY.md without vector embeddings ā chunks_vec not updated (sqlite-vec unavailable). Vector recall degraded for this file.
there are a ton more of these chunks written for MEMORY.md messages.
Yep, this is the smoking gun:
qmd search ... -c memory-alt-main failed: Collection not found: memory-alt-main
qmd memory failed; switching to builtin index
So the problem is not your memory.qmd.paths config. That part looks correct.
Whatās happening is:
- OpenClaw tries to use QMD
- QMDās managed collection state is broken/stale
- OpenClaw falls back to the builtin index
- you get results from default memory instead of your extra QMD path
And this line:
chunks written for MEMORY.md without vector embeddings ...
is basically fallout from the builtin fallback, not the root cause.
What Iād do next
First, check your QMD version:
qmd --version
Then, for the agent youāre testing (main here), do a clean QMD reset with a backup:
openclaw gateway stop
mv ~/.openclaw/agents/main/qmd ~/.openclaw/agents/main/qmd.bak.$(date +%s)
openclaw gateway start
openclaw memory status --agent main --deep --index --verbose
openclaw memory search --agent main --query "quantum mechanics" --json
Why this helps:
- QMD collections are persisted inside that per-agent QMD state
- your logs show that state is inconsistent (
memory-alt-mainis expected but missing) - moving the dir aside forces OpenClaw to rebuild the managed QMD collections from config
If main starts working after that, you can repeat it for any other affected agents.
If it still errors after a clean reset, then Iād call it a real bug and ask you to file it here:
https://github.com/openclaw/openclaw/issues
If you want, paste the output of qmd --version first, because Iām a little suspicious this may also involve an older QMD CLI behavior.
totaluser@Total-Hardware:~$ qmd --version
Usage:
qmd collection add [path] --name <name> --mask <pattern> - Create/index collection
qmd collection list - List all collections with details
qmd collection remove <name> - Remove a collection by name
qmd collection rename <old> <new> - Rename a collection
qmd ls [collection[/path]] - List collections or files in a collection
qmd context add [path] "text" - Add context for path (defaults to current dir)
qmd context list - List all contexts
qmd context rm <path> - Remove context
qmd get <file>[:line] [-l N] [--from N] - Get document (optionally from line, max N lines)
qmd multi-get <pattern> [-l N] [--max-bytes N] - Get multiple docs by glob or comma-separated list
qmd status - Show index
two halves this is part 1
qmd embed [-f] - Create vector embeddings (800 tokens/chunk, 15% overlap)
qmd cleanup - Remove cache and orphaned data, vacuum DB
qmd search <query> - Full-text search (BM25)
qmd vsearch <query> - Vector similarity search
qmd query <query> - Combined search with query expansion + reranking
qmd mcp - Start MCP server (stdio transport)
qmd mcp --http [--port N] - Start MCP server (HTTP transport, default port 8181)
qmd mcp --http --daemon - Start MCP server as background daemon
qmd mcp stop - Stop background MCP daemon
Global options:
--index <name> - Use custom index name (default: index)
Search options:
-n <num> - Number of results (default: 5, or 20 for --files)
--all - Return all matches (use with --min-score to filter)
--min-score <num> - Minimum similarity score
--full - Output full document instead of snippet
--line-numbers - Add line numbers to output
--files - Output docid,score,filepath,context (default: 20 results)
--json - JSON output with snippets (default: 20 results)
--csv - CSV output with snippets
--md - Markdown output
--xml - XML output
-c, --collection <name> - Filter results to a specific collection
Multi-get options:
-l <num> - Maximum lines per file
--max-bytes <num> - Skip files larger than N bytes (default: 10240)
--json/--csv/--md/--xml/--files - Output format (same as search)
Models (auto-downloaded from HuggingFace):
Embedding: embeddinggemma-300M-Q8_0
Reranking: qwen3-reranker-0.6b-q8_0
Generation: Qwen3-0.6B-Q8_0
Index: /home/totaluser/.cache/qmd/index.sqlite
totaluser@Total-Hardware:~$
Ah, yep, this makes the picture a lot clearer.
Your config is fine:
memory.qmd.pathsis set correctly- channel scope is set correctly
The failure is lower-level:
qmd --versiondoesnāt even return a version, just usage- the help output only shows the older
--maskcollection flow - OpenClaw is trying to manage collections like
memory-alt-main, but QMD state is inconsistent, so it falls back to builtin
Thatās why you keep seeing default-memory results.
My best read
This looks like a QMD compatibility/stale-state problem, not a bad OpenClaw config.
Especially because your log shows:
qmd search ... -c memory-alt-main failed: Collection not found: memory-alt-main
qmd memory failed; switching to builtin index
So OpenClaw is definitely not successfully staying on QMD for that search.
Iād do this in order
1) Update QMD
If you installed it with pnpm, reinstall/upgrade it:
pnpm add -g @tobilu/qmd@latest
2) Reset the broken per-agent QMD state, with a backup
For main first:
openclaw gateway stop
mv ~/.openclaw/agents/main/qmd ~/.openclaw/agents/main/qmd.bak.$(date +%s)
openclaw gateway start
3) Rebuild and retest
openclaw memory status --agent main --deep --index --verbose
openclaw memory search --agent main --query "quantum mechanics" --json
If that fixes main, repeat for any other affected agents.
One extra note
Plain qmd in your shell is using:
Index: /home/totaluser/.cache/qmd/index.sqlite
But OpenClaw is using the per-agent managed index under:
~/.openclaw/agents/main/qmd/...
So the important reset is the OpenClaw agent QMD dir, not the default shell QMD cache.
If this still breaks after:
- updating QMD, and
- resetting
~/.openclaw/agents/main/qmd
then Iād call it a real bug and file it here with those logs:
https://github.com/openclaw/openclaw/issues
Iām pretty confident weāve narrowed it down now.
ok i updated qmd now what
Nice. Next do the clean per-agent QMD reset, then rebuild:
openclaw gateway stop
mv ~/.openclaw/agents/main/qmd ~/.openclaw/agents/main/qmd.bak.$(date +%s)
openclaw gateway start
openclaw memory status --agent main --deep --index --verbose
openclaw memory search --agent main --query "quantum mechanics" --json
What this does:
- keeps a backup
- forces OpenClaw to recreate the managed QMD collections
- tests whether
mainnow searches the extra path instead of falling back
If main works after that, you can repeat the same pattern for any other affected agents.
Paste the last two command outputs if it still acts weird.
can i wipe qmd off of my device and then just have openclaw handle all of it?
Not if you want to keep using the QMD backend.
OpenClaw can manage the per-agent QMD state for you, but it still needs the qmd binary installed.
So:
- Yes: wipe
~/.openclaw/agents/<agent>/qmdand let OpenClaw recreate it - No: uninstall
qmdentirely and still expectmemory.backend: "qmd"to work
If you remove the binary, OpenClaw will either fail QMD or fall back to builtin memory.
Best option
Keep QMD installed, but reset only the managed state:
openclaw gateway stop
mv ~/.openclaw/agents/main/qmd ~/.openclaw/agents/main/qmd.bak.$(date +%s)
openclaw gateway start
If you want zero QMD dependency
Then switch to builtin memory instead:
{
memory: {
backend: "builtin"
}
}
But then you lose the QMD extra-path behavior.
So my recommendation is: keep the qmd binary, wipe the agent qmd state only.
can i completely wipe qmd and reinstall it?
Yep, you can. Iād do it the safe way, with backups instead of deleting first.
For the agent youāre testing (main), this is a clean reset:
openclaw gateway stop
pnpm remove -g @tobilu/qmd
mv ~/.openclaw/agents/main/qmd ~/.openclaw/agents/main/qmd.bak.$(date +%s)
mv ~/.cache/qmd ~/.cache/qmd.bak.$(date +%s)
pnpm add -g @tobilu/qmd@latest
openclaw gateway start
openclaw memory status --agent main --deep --index --verbose
openclaw memory search --agent main --query "quantum mechanics" --json
A couple notes:
~/.openclaw/agents/main/qmdis the important OpenClaw-managed state~/.cache/qmdis the plain shell QMD cache, optional but fine to reset too- using
mvkeeps it recoverable if anything weird happens
If main works after that, you can repeat the same ~/.openclaw/agents/<agent>/qmd reset for other agents.
If this fixed it, please right-click the solution message ā Apps ā ā Mark Solution so Answer Overflow can index it for the next person.
is this right
openclaw config set memory.qmd.command "/home/totaluser/.npm-global/bin/qmd"
Yes, memory.qmd.command is the right config key.
But only set it to that path if itās the actual executable path.
Best way:
command -v qmd
If that prints:
/home/totaluser/.npm-global/bin/qmd
then this is correct:
openclaw config set memory.qmd.command "/home/totaluser/.npm-global/bin/qmd"
You can also do it directly from the resolved path:
openclaw config set memory.qmd.command "$(command -v qmd)"
Then restart and retest:
openclaw gateway restart
openclaw memory status --agent main --deep --index --verbose
openclaw memory search --agent main --query "quantum mechanics" --json
If command -v qmd prints a different path, use that instead.
ok so i indexed and then i did qmd collection list and it says thre are no collections. doesnt that mean its not working??
Not necessarily.
Plain:
qmd collection list
checks your shellās default QMD home, usually ~/.cache/qmd.
But OpenClaw uses a per-agent QMD home under:
~/.openclaw/agents/main/qmd
So if plain qmd collection list says āno collectionsā, that can just mean:
- your default shell QMD index has no collections
- while OpenClawās managed agent QMD index is a different one
To inspect the same QMD state OpenClaw uses for main, run:
XDG_CONFIG_HOME="$HOME/.openclaw/agents/main/qmd/xdg-config" \
QMD_CONFIG_DIR="$HOME/.openclaw/agents/main/qmd/xdg-config/qmd" \
XDG_CACHE_HOME="$HOME/.openclaw/agents/main/qmd/xdg-cache" \
qmd collection list
And this is also useful:
XDG_CONFIG_HOME="$HOME/.openclaw/agents/main/qmd/xdg-config" \
QMD_CONFIG_DIR="$HOME/.openclaw/agents/main/qmd/xdg-config/qmd" \
XDG_CACHE_HOME="$HOME/.openclaw/agents/main/qmd/xdg-cache" \
qmd status
So:
- plain
qmd collection listempty ā not enough evidence - agent-scoped
qmd collection listempty after indexing ā yeah, then something is still wrong
Paste the output of the agent-scoped qmd collection list and I can tell you which side itās failing on.
ok so running this
totaluser@Total-Hardware:~$ XDG_CONFIG_HOME="$HOME/.openclaw/agents/main/qmd/xdg-config"
QMD_CONFIG_DIR="$HOME/.openclaw/agents/main/qmd/xdg-config/qmd"
XDG_CACHE_HOME="$HOME/.openclaw/agents/main/qmd/xdg-cache"
qmd collection list
Collections (4):
memory-dir-main (qmd://memory-dir-main/)
Pattern: **/*.md
Files: 62
Updated: 5h ago
yr-knowledge (qmd://yr-knowledge/)
Pattern: **/*.md
Files: 38
Updated: 6h ago
sessions-main (qmd://sessions-main/)
Pattern: **/*.md
Files: 198
Updated: 3m ago
memory-root-main (qmd://memory-root-main/)
Pattern: **/*.md
Files: 862
Updated: 5h ago
is very hopeful becaise yrknowledge is the extra path im trying to get it to index. so this is good news but when i try to search for something that i know is in the yr-knowledge i get a list of qmd fails i will send it right after this
totaluser@Total-Hardware:~$ openclaw memory search --agent main --query "thunderbird"
21:49:06-07:00 [plugins] plugins.allow is empty; discovered non-bundled plugins may auto-load: lossless-claw (/home/totaluser/.openclaw/extensions/lossless-claw/dist/index.js). Set plugins.allow to explicit trusted ids.
š¦ OpenClaw 2026.4.11 (769908e)
Automation with claws: minimal fuss, maximal pinch.
21:49:18-07:00 [memory] qmd collection add skipped for memory-alt-main: qmd collection add /home/totaluser/.openclaw/workspace --name memory-alt-main --glob memory.md failed (code 1): A collection already exists for this path and pattern:
Name: memory-root-main (qmd://memory-root-main/)
Pattern: **/*.md
Use 'qmd update' to re-index it, or remove it first with 'qmd collection remove memory-root-main'
21:49:19-07:00 [memory] qmd search failed because a managed collection is missing; repairing collections and retrying once
21:49:23-07:00 [memory] qmd collection add skipped for memory-alt-main: qmd collection add /home/totaluser/.openclaw/workspace --name memory-alt-main --glob memory.md failed (code 1): A collection already exists for this path and pattern:
Name: memory-root-main (qmd://memory-root-main/)
Pattern: **/*.md
Use 'qmd update' to re-index it, or remove it first with 'qmd collection remove memory-root-main'
21:49:24-07:00 [memory] qmd search failed: Error: qmd search thunderbird --json -n 6 -c memory-alt-main failed (code 1): Collection not found: memory-alt-main
21:49:24-07:00 [memory] qmd memory failed; switching to builtin index: qmd search thunderbird --json -n 6 -c memory-alt-main failed (code 1): Collection not found: memory-alt-main
No matches.
Yep, this is enough to call it:
yr-knowledgeis indexed- but OpenClaw is still trying to search a missing collection:
memory-alt-main - that failure makes it fall back before QMD results can be used
So the extra path itself is not the problem anymore. The problem is the auto-managed default-memory collections.
What I think is happening
Your live QMD collections are:
memory-dir-mainmemory-root-mainsessions-mainyr-knowledge
But OpenClaw expects an additional one:
memory-alt-main
Since that one does not exist, every QMD search dies here:
Collection not found: memory-alt-main
and then builtin fallback takes over.
Best workaround right now
Disable the automatic default-memory collection setup and define the paths explicitly.
Something like this in config:
{
memory: {
backend: "qmd",
qmd: {
includeDefaultMemory: false,
paths: [
{ name: "workspace-memory-root", path: "~/.openclaw/workspace", pattern: "MEMORY.md" },
{ name: "workspace-memory-dir", path: "~/.openclaw/workspace/memory", pattern: "**/*.md" },
{ name: "yr-knowledge", path: "~/.openclaw/yr-knowledge", pattern: "**/*.md" }
],
sessions: { enabled: true }
}
}
}
Then rebuild the agent QMD state again:
openclaw gateway stop
mv ~/.openclaw/agents/main/qmd ~/.openclaw/agents/main/qmd.bak.$(date +%s)
openclaw gateway start
openclaw memory status --agent main --deep --index --verbose
openclaw memory search --agent main --query "thunderbird"
Short version
Good news: your extra path works.
Bad news: OpenClawās default QMD collection management is the broken part.
At this point Iād also file a bug with these logs:
https://github.com/openclaw/openclaw/issues
If you want, I can help you turn that config into exact openclaw config set ... commands next.
no but i have multiple agents can i jsut force create the alt collection so that it is there?
I wouldnāt go that route.
Two reasons:
- I donāt see a real force-create flag in the QMD CLI you pasted.
- Manual
qmd collection add ... --name memory-alt-main --mask memory.mdwill probably just hit the same conflict again, becausememory-root-mainis already overlapping it.
So, practically: no, not in a clean/reliable way.
With multiple agents, manual collection surgery is going to be brittle and annoying. OpenClaw may just run back into the same managed-collection mismatch on the next sync.
Better fix for multi-agent setups
Use the workaround once in config:
memory.qmd.includeDefaultMemory: false- define the memory roots you actually want under
memory.qmd.paths
That avoids the broken auto-created memory-alt-* path entirely.
Then reset the per-agent QMD state for all agents.
If you want, I can give you:
- the exact config block for your setup, and
- one safe shell loop to back up every
~/.openclaw/agents/*/qmddir at once.
but right now each agent has their own memory qmd database right?
Yes.
With QMD, OpenClaw gives each agent its own QMD state and index DB under:
~/.openclaw/agents/<agentId>/qmd/
So for example:
~/.openclaw/agents/main/qmd/...~/.openclaw/agents/forge/qmd/...~/.openclaw/agents/scout/qmd/...
That means:
- each agent has its own collections
- each agent has its own index.sqlite
- each agent can index the same external path, but it still ends up in that agentās own QMD DB
So yes, right now theyāre separate, per-agent databases.
and if i dont include defualt memory wont that break that feature where each agent can have their own memry collection
No, not if you add the workspace memory paths back explicitly.
includeDefaultMemory: false only means:
- ādonāt auto-create the built-in default collections for meā
It does not mean:
- āall agents lose separate memoryā
Per-agent separation still exists because each agent still has its own workspace and own QMD DB.
The important part is this:
- if you set
includeDefaultMemory: falseand add nothing back, then yes, youād stop indexing the normal per-agent workspace memory files - if you set
includeDefaultMemory: falsebut explicitly addMEMORY.mdandmemory/**/*.md, then each agent still keeps its own memory, just without the broken auto-createdmemory-alt-*collection
A good multi-agent-friendly version is:
{
memory: {
backend: "qmd",
qmd: {
includeDefaultMemory: false,
paths: [
{ name: "workspace-memory-root", path: ".", pattern: "MEMORY.md" },
{ name: "workspace-memory-dir", path: "memory", pattern: "**/*.md" },
{ name: "yr-knowledge", path: "/home/totaluser/.openclaw/yr-knowledge", pattern: "**/*.md" }
],
sessions: { enabled: true }
}
}
}
Why this works:
.andmemoryresolve relative to each agentās own workspace- so
main,forge,scout, etc. still each get their own memory collections yr-knowledgeis the shared extra path layered on top
So: agent-specific memory stays, you just bypass the broken default auto-collection logic.
ok lets try it
Cool, letās do the workaround cleanly.
Run these:
openclaw config set memory.qmd.includeDefaultMemory false --strict-json
openclaw config set memory.qmd.paths '[{"name":"workspace-memory-root","path":".","pattern":"MEMORY.md"},{"name":"workspace-memory-dir","path":"memory","pattern":"**/*.md"},{"name":"yr-knowledge","path":"/home/totaluser/.openclaw/yr-knowledge","pattern":"**/*.md"}]' --strict-json
openclaw gateway stop
for d in "$HOME"/.openclaw/agents/*/qmd; do [ -d "$d" ] && mv "$d" "$d.bak.$(date +%s)"; done
openclaw gateway start
openclaw memory status --agent main --deep --index --verbose
openclaw memory search --agent main --query "thunderbird"
What this does:
- disables the broken auto-default QMD collections
- adds back each agentās own
MEMORY.mdandmemory/**/*.md - keeps your shared
yr-knowledgepath - resets every agentās QMD state so collections get recreated from the new config
Paste the last two outputs and weāll check if it finally behaves.
ok so it worked! it actually is searching the extra path!
Hell yes, glad we caught it š
So the extra path was fine, and the real problem was the auto default QMD collection setup tripping over memory-alt-*.
Iād keep that workaround config for now.
If youāre up for it, this looks worth filing as a bug:
https://github.com/openclaw/openclaw/issues
Useful summary for the issue:
memory.qmd.pathsextra path was indexed correctly- OpenClaw kept expecting missing
memory-alt-main - QMD search failed and fell back to builtin
- workaround was
memory.qmd.includeDefaultMemory: falseplus explicitpathsfor:.withMEMORY.mdmemorywith**/*.md- shared extra path
And if this fixed it, please right-click the solution message ā Apps ā ā Mark Solution so Answer Overflow can index it for the next person.
how do i force a reindex for main
Use:
openclaw memory index --agent main --force --verbose
That forces a full reindex for main.
If you want to verify after:
openclaw memory status --agent main --deep
Glad itās finally behaving š¦
after a search through cli using qmd it freezes after pulling up the results
If you mean the plain qmd CLI, that sounds more like a QMD-side terminal/pager issue than an OpenClaw one.
Quick checks:
-
Try
q
If it drops you back to the prompt, it was probably sitting in a pager. -
Try non-interactive output:
qmd search "thunderbird" --json
or even:
qmd search "thunderbird" --json | cat
- If you want the OpenClaw path specifically, use:
openclaw memory search --agent main --query "thunderbird" --json
If it still āfreezesā, paste the exact command you ran and whether:
qexitsCtrl+Cexits- it happens with
--jsontoo
If itās only qmd ... and not openclaw memory search ..., Iād treat that as a QMD CLI issue, not the OpenClaw memory config issue.
ok it works!! i want to move yr-knowledge into .openclaw/rush/
i also want to add these folders to be added to the global qmd.
.openclaw/workspace/health_research and .openclaw/workspace/research
Nice š
You can do that, but Iād honestly recommend keeping shared knowledge outside rush/ if itās meant to be global. Putting it under one agentās workspace works, but itās a little confusing later.
If you still want it there, update the global QMD paths to absolute paths like this:
openclaw config set memory.qmd.paths '[{"name":"workspace-memory-root","path":".","pattern":"MEMORY.md"},{"name":"workspace-memory-dir","path":"memory","pattern":"**/*.md"},{"name":"yr-knowledge","path":"/home/totaluser/.openclaw/rush/yr-knowledge","pattern":"**/*.md"},{"name":"health-research","path":"/home/totaluser/.openclaw/workspace/health_research","pattern":"**/*.md"},{"name":"research","path":"/home/totaluser/.openclaw/workspace/research","pattern":"**/*.md"}]' --strict-json
Then reindex all agents:
openclaw memory index --force --verbose
Because without --agent, it runs across every configured agent.
My recommendation
If itās truly shared/global, use:
~/.openclaw/yr-knowledge~/.openclaw/workspace/health_research~/.openclaw/workspace/research
If you want, I can give you the recommended version of that command with yr-knowledge left in the shared location instead of moving it into rush/.
does adding a ton more files into qmd searches affect retrieval speed? and when it comes to health research, i really only need one agent maybe two to be searching through that how can i do that with our current set up and also is this something that makes sense to go under memory qmd or should it be a separate qmd collection?
Yes, adding a lot more files can affect things:
- indexing time goes up
- disk usage goes up
- search latency can go up too, especially if you make every agent index the same large shared corpus
And in your setup, that cost multiplies, because each agent has its own QMD DB.
My recommendation
For stuff like health_research, if only one or two agents need it, do not put it in global memory.qmd.paths.
Instead, add it only to those agents with:
agents.list[].memorySearch.qmd.extraCollections
That gives you a separate QMD collection for just those agents, inside their own per-agent DBs.
When to use which
Use memory.qmd.paths
For docs that are truly shared across most/all agents.
Use agents.list[].memorySearch.qmd.extraCollections
For docs that only specific agents should search, like health research.
Does separate collection make sense?
Yes, definitely.
For health_research, a separate collection is the right shape.
You do not need a whole separate QMD install or separate global DB, just a separate collection attached to the relevant agents.
Practical rule
- Shared by everybody ā
memory.qmd.paths - Only for 1-2 agents ā
agents.list[].memorySearch.qmd.extraCollections
So for your case, Iād keep:
- global/shared stuff in
memory.qmd.paths health_researchas a per-agent extra collection for the health-focused agent(s)
If you want, I can write the exact config snippet for, say, vital and one second agent next.
ok so in that case i really only need rush to have access to yr knowledge, and main, scout, and vital to have the health research one.
research can be accessed by everyone.
where should these folders be at in the file structure? yr knowledge has to be in rushs workspace
Iād organize it like this:
~/.openclaw/
shared/
health_research/
research/
rush/
yr-knowledge/
Why this layout
- agent-local stuff lives in that agentās workspace
- shared stuff lives in a neutral shared folder, not inside one agentās workspace
So for your case:
yr-knowledgeā~/.openclaw/rush/yr-knowledge/āhealth_researchā~/.openclaw/shared/health_research/researchā~/.openclaw/shared/research/
How Iād wire it
Global, for everyone
Put research in global memory.qmd.paths
Rush only
Put yr-knowledge in rushās memorySearch.qmd.extraCollections
Since itās in Rushās workspace, you can even reference it as:
{ path: "yr-knowledge" }
Main + Scout + Vital only
Put health_research in those three agentsā memorySearch.qmd.extraCollections, using the same absolute shared path:
{ path: "/home/totaluser/.openclaw/shared/health_research", name: "health-research" }
Rule of thumb
- inside an agent workspace = that agentās stuff
- outside agent workspaces, in a shared dir = shared corpus for selected agents
So yes, if yr-knowledge has to be in Rushās workspace, that makes sense.
But I would not put health_research or research inside workspace/ if multiple agents need them. A neutral shared/ folder is cleaner.
If you want, I can write the exact config snippet for:
- global
research - Rush-only
yr-knowledge
- Main/Scout/Vital-only
health_research
yeah ill handle putting the folders in the right spot can you give me the config snippet for this
Yep, hereās a clean config shape for that setup:
{
memory: {
backend: "qmd",
qmd: {
includeDefaultMemory: false,
paths: [
{ name: "workspace-memory-root", path: ".", pattern: "MEMORY.md" },
{ name: "workspace-memory-dir", path: "memory", pattern: "**/*.md" },
// shared by everyone
{ name: "research", path: "/home/totaluser/.openclaw/shared/research", pattern: "**/*.md" },
],
sessions: { enabled: true },
scope: {
default: "deny",
rules: [
{ action: "allow", match: { chatType: "direct" } },
{ action: "allow", match: { chatType: "channel" } },
],
},
},
},
agents: {
list: [
{
id: "rush",
memorySearch: {
qmd: {
extraCollections: [
// relative to rush workspace
{ path: "yr-knowledge" },
],
},
},
},
{
id: "main",
memorySearch: {
qmd: {
extraCollections: [
{ path: "/home/totaluser/.openclaw/shared/health_research", name: "health-research" },
],
},
},
},
{
id: "scout",
memorySearch: {
qmd: {
extraCollections: [
{ path: "/home/totaluser/.openclaw/shared/health_research", name: "health-research" },
],
},
},
},
{
id: "vital",
memorySearch: {
qmd: {
extraCollections: [
{ path: "/home/totaluser/.openclaw/shared/health_research", name: "health-research" },
],
},
},
},
],
},
}
Two important notes:
- If those agents already exist in
agents.list, merge this into their existing entries, donāt create duplicateids. - After updating config, rebuild:
openclaw memory index --force --verbose
If you want, I can also turn this into exact openclaw config set ... commands, but honestly for this amount of nested config, editing the config file is cleaner.
can you give me the config set commands
Yep. First, set the global stuff:
openclaw config set memory.qmd.includeDefaultMemory false --strict-json
openclaw config set memory.qmd.paths '[{"name":"workspace-memory-root","path":".","pattern":"MEMORY.md"},{"name":"workspace-memory-dir","path":"memory","pattern":"**/*.md"},{"name":"research","path":"/home/totaluser/.openclaw/shared/research","pattern":"**/*.md"}]' --strict-json
Then set the per-agent collections.
Youāll need the array indexes for each agent in agents.list, so first check:
openclaw config get agents.list --json
Then use the right indexes in these commands:
# Rush only
openclaw config set agents.list[RUSH_INDEX].memorySearch.qmd.extraCollections '[{"path":"yr-knowledge"}]' --strict-json
# Main only
openclaw config set agents.list[MAIN_INDEX].memorySearch.qmd.extraCollections '[{"path":"/home/totaluser/.openclaw/shared/health_research","name":"health-research"}]' --strict-json
# Scout only
openclaw config set agents.list[SCOUT_INDEX].memorySearch.qmd.extraCollections '[{"path":"/home/totaluser/.openclaw/shared/health_research","name":"health-research"}]' --strict-json
# Vital only
openclaw config set agents.list[VITAL_INDEX].memorySearch.qmd.extraCollections '[{"path":"/home/totaluser/.openclaw/shared/health_research","name":"health-research"}]' --strict-json
Then rebuild:
openclaw memory index --force --verbose
Two important gotchas:
- these
extraCollectionscommands replace that agentās currentextraCollectionsarray - if any of those agents already have other extra collections you want to keep, include them in the JSON too
If you paste the output of:
openclaw config get agents.list --json
I can turn those RUSH_INDEX / MAIN_INDEX / etc into exact commands.
can you give me the code with the index for these
totaluser@Total-Hardware:~$ openclaw config get agents.list --json
[
{
"id": "main",
"heartbeat": {},
"subagents": {
"allowAgents": [
"forge",
"scout",
"vital",
"sentinel",
"alfred"
]
}
},
{
"id": "forge",
"name": "Forge",
"workspace": "/home/totaluser/.openclaw/forge",
"agentDir": "/home/totaluser/.openclaw/agents/forge/agent",
"heartbeat": {}
},
{
"id": "scout",
"name": "Scout",
"workspace": "/home/totaluser/.openclaw/scout",
"agentDir": "/home/totaluser/.openclaw/agents/scout/agent",
"heartbeat": {}
},
{
"id": "vital",
"name": "vital",
"workspace": "/home/totaluser/.openclaw/vital",
"agentDir": "/home/totaluser/.openclaw/agents/vital/agent",
"heartbeat": {}
},
{
"id": "sentinel",
"name": "sentinel",
"workspace": "/home/totaluser/.openclaw/sentinel",
"agentDir": "/home/totaluser/.openclaw/agents/sentinel/agent",
"heartbeat": {}
},
{
"id": "alfred",
"name": "Alfred",
"workspace": "/home/totaluser/.openclaw/alfred",
"agentDir": "/home/totaluser/.openclaw/agents/alfred/agent",
"heartbeat": {
"every": "15m",
"target": "telegram",
"accountId": "forge"
}
},
{
"id": "rush",
"name": "rush",
"workspace": "/home/totaluser/.openclaw/rush",
"agentDir": "/home/totaluser/.openclaw/agents/rush/agent",
"memorySearch": {
"qmd": {
"extraCollections": []
}
}
},
{
"id": "cipher",
"name": "Cipher",
"workspace": "/home/totaluser/.openclaw/cipher",
"agentDir": "/home/totaluser/.openclaw/agents/cipher/agent"
}
]
totaluser@Total-Hardware:~$
Yep, here are the exact ones for your indexes:
main = 0scout = 2vital = 3rush = 6
Run these:
openclaw config set memory.qmd.includeDefaultMemory false --strict-json
openclaw config set memory.qmd.paths '[{"name":"workspace-memory-root","path":".","pattern":"MEMORY.md"},{"name":"workspace-memory-dir","path":"memory","pattern":"**/*.md"},{"name":"research","path":"/home/totaluser/.openclaw/shared/research","pattern":"**/*.md"}]' --strict-json
openclaw config set agents.list[6].memorySearch.qmd.extraCollections '[{"path":"yr-knowledge"}]' --strict-json
openclaw config set agents.list[0].memorySearch.qmd.extraCollections '[{"path":"/home/totaluser/.openclaw/shared/health_research","name":"health-research"}]' --strict-json
openclaw config set agents.list[2].memorySearch.qmd.extraCollections '[{"path":"/home/totaluser/.openclaw/shared/health_research","name":"health-research"}]' --strict-json
openclaw config set agents.list[3].memorySearch.qmd.extraCollections '[{"path":"/home/totaluser/.openclaw/shared/health_research","name":"health-research"}]' --strict-json
openclaw memory index --force --verbose
That should give you:
researchfor everyoneyr-knowledgeforrushonlyhealth_researchformain,scout, andvital
If this fixed it, please right-click the solution message ā Apps ā ā Mark Solution so Answer Overflow can index it.
how often does openclaw reindex
For QMD, by default OpenClaw reindexes:
- on boot
- then every 5 minutes
It also debounces file changes by about 15 seconds.
The knobs are:
memory.qmd.update.intervalā default5mmemory.qmd.update.debounceMsā default15000memory.qmd.update.onBootā defaulttrue
So in practice, with your setup, think:
startup + every 5 minutes + short debounce after changes
And if you want to force it manually:
openclaw memory index --agent main --force --verbose
Glad that helped! š
If this fixed it, please right-click the solution message ā Apps ā ā
Mark Solution.
This helps Answer Overflow index the solution for future users.
how can i make sure active memory is working
Best way to verify it:
- In the chat/session you care about, run:
/active-memory status
- Turn on verbose for that session:
/verbose on
- Send a normal message, then look for lines like:
š§© Active Memory: ok ...
š Active Memory Debug: ...
Thatās the clearest sign it actually ran.
If it still doesnāt show up, check these
plugins.entries.active-memory.enabledis on- the current agent id is listed in
plugins.entries.active-memory.config.agents - youāre testing in an interactive persistent chat session
- memory search itself is healthy:
openclaw memory status --deep
Good sanity-check flow
/active-memory status
/verbose on
what should i remember about my health research setup?
If active memory is working, you should see the normal reply plus the active-memory status/debug footer.
If you want, I can help you check the exact config keys for your setup next.
so i asked it this
hey what are some ai facts that we have researched?
this is what i got
[4/12/26 11:38āÆPM] Total: š ļø Exec: list files in ~/.openclaw/shared/research/ -> show first 30 lines, ls ~/.openclaw/shared/research/ | head -30
[4/12/26 11:38āÆPM] Total: š ļø Exec: list files in ~/.openclaw/shared/research/ -> show first 20 lines (+1 steps), ls ~/.openclaw/shared/research/ | grep -i "ai|agent|llm|model|openclaw|claw" | head -20
[4/12/26 11:38āÆPM] Total: š ļø Exec: list files in ~/.openclaw/shared/research/ -> search "health|nutrition|obesity|diabetes|hypertension|sleep|exercise|carbohyd|metabolic|snowboard|recovery|school|church|wellness|loma", ls ~/.openclaw/shared/research/ | grep -v "health|nutrition|obesity|diabetes|hypertension|sleep|exeā¦
[4/12/26 11:38āÆPM] Total: Scout's been busy ā 686 research files total. Here's a highlight reel of the AI facts we've dug into:
OpenClaw-specific:
⢠v2026.4.x had significant breaking changes: nodes.run shell wrapper removed, dangerous-code fail-closed shipped, background tasks now SQLite-backed
⢠April 2026 had a rough security stretch ā CVE-2026-33579 (privilege escalation), CVE-2026-33581 (media LFI), axios supply chain attack
⢠China adopted OpenClaw fast ā government/explore limits, Ant Group/Tsinghua partnered on security paper, ClawHub launched
AI Agents:
⢠Context engineering is replacing RAG at scale ā longer context windows eliminate the need for retrieval
⢠MCP (Model Context Protocol) became the standard bridge for agent-to-tool communication
⢠OpenClaw has ~15+ agent frameworks competing ā LangChain, CrewAI, AutoGen, etc.
⢠Claude Code launched and became the main OpenClaw competitor in the AI coding space
⢠Evoclaw benchmark ā tests agent coherence across long tasks, agents still struggle past ~20 tool calls
AI Landscape:
⢠Agentic AI went from "hype" to "real deployment" in 6 months (March 2026)
it looks like its not using qmd
Yeah, that specific turn did not use QMD. It used exec.
But that means tool choice, not necessarily QMD failure.
Whatās going on
There are 3 different things here:
-
QMD / memory search works
- proven by
openclaw memory search ...working earlier
- proven by
-
Active Memory
- a hidden pre-pass that can inject memory context
- does not guarantee the agent wonāt also use other tools
-
Exec
- if the agent has it, it may decide raw file listing/grep is easier than memory search
So the run you pasted says:
āthe agent chose exec for this questionā
not
āQMD is brokenā
How to tell if Active Memory is actually running
In that session:
/active-memory status
/verbose on
Then ask another question and look for:
š§© Active Memory: ok ...
š Active Memory Debug: ...
If you see that, Active Memory ran.
If you want it to prefer QMD more often
Add an instruction like this to the agentās AGENTS.md or persona prompt:
For questions about research, notes, or prior findings, use memory search / memory get before exec or raw filesystem scans unless memory search fails.
Because right now, with exec available, the model is just taking the brute-force path.
Short version
- Yes, that reply used exec, not QMD
- No, that does not prove QMD is broken
- it proves the agent preferred exec for that question
If you want, I can help you write a short instruction so the agent uses memory search first for research questions.
give me that short thing and then once specific for rush saying that for any context or info that rush needs about the program to use memory search. and any time i ask for info or to be reminded of something he has to use memory
Yep, here are two short versions you can drop in.
Generic
For questions about research, notes, prior findings, stored context, or reminders, use memory search / memory get before exec or raw filesystem scans. Only fall back to exec if memory search fails or does not return enough context.
Rush-specific
For Rush: whenever Peter asks for context, prior program knowledge, reminders, what we know, what we researched, or anything Rush should remember about the program, use memory search / memory get first. Do not answer from guesswork or raw file scanning unless memory search fails. If Peter asks to be reminded of something or asks what we know about a topic, Rush must use memory tools.
If you want, I can make that even tighter and more forceful for AGENTS.md, like a āmemory-first policyā version.
ok but how do i make sure active memory is on and being used
To make sure Active Memory is actually on and can run in this Discord thread, Iād check all 4 gates:
1) Plugin enabled
openclaw config set plugins.entries.active-memory.enabled true --strict-json
2) Global Active Memory toggle enabled
openclaw config set plugins.entries.active-memory.config.enabled true --strict-json
3) Current agent targeted
Example for rush:
openclaw config set plugins.entries.active-memory.config.agents '["rush"]' --strict-json
If you want multiple agents, include them all:
openclaw config set plugins.entries.active-memory.config.agents '["main","scout","vital","rush"]' --strict-json
4) Allowed chat type includes channel
This part is important because youāre testing in a Discord thread/channel, and the default is usually direct-only.
openclaw config set plugins.entries.active-memory.config.allowedChatTypes '["direct","channel"]' --strict-json
Optional but very helpful while testing
openclaw config set plugins.entries.active-memory.config.logging true --strict-json
openclaw gateway restart
Then in the chat session itself:
/active-memory on
/active-memory status
/verbose on
Then ask a question and look for lines like:
š§© Active Memory: ok ...
š Active Memory Debug: ...
If you see those, itās being used.
Short version
For your case, the biggest gotcha is probably:
Active Memory wonāt run in this thread unless
allowedChatTypesincludes"channel"
If you want, I can also give you one compact config snippet just for Rush in channels.
yeah can you give me the code snippet for you to check what my active memory config is
Yep, run this and paste the output:
openclaw config get plugins.entries.active-memory --json
And if you want the full picture, these are useful too:
openclaw config get plugins.entries.active-memory --json
openclaw config get plugins.slots.memory --json
openclaw config get agents.list --json
If you want to check it from inside the chat session too:
/active-memory status
/active-memory status --global
Paste the plugins.entries.active-memory output and Iāll tell you exactly whatās on/off.
totaluser@Total-Hardware:~$ openclaw config get plugins.entries.active-memory --json
{
"enabled": true,
"config": {
"agents": [
"main",
"forge",
"rush",
"scout",
"vital"
],
"allowedChatTypes": [
"direct",
"channel"
],
"queryMode": "recent",
"promptStyle": "balanced",
"timeoutMs": 15000,
"maxSummaryChars": 220,
"logging": true
}
}
here is part 1 of 2
totaluser@Total-Hardware:~$ openclaw config get plugins.entries.active-memory --json
openclaw config get plugins.slots.memory --json
openclaw config get agents.list --json
{
"enabled": true,
"config": {
"agents": [
"main",
"forge",
"rush",
"scout",
"vital"
],
"allowedChatTypes": [
"direct",
"channel"
],
"queryMode": "recent",
"promptStyle": "balanced",
"timeoutMs": 15000,
"maxSummaryChars": 220,
"logging": true
}
}
Config path not found: plugins.slots.memory
[
{
"id": "main",
"memorySearch": {
"qmd": {
"extraCollections": [
{
"path": "/home/totaluser/.openclaw/shared/health_research",
"name": "health-research"
}
]
}
},
"heartbeat": {},
"subagents": {
"allowAgents": [
"forge",
"scout",
"vital",
"sentinel",
"alfred"
]
}
},
{
"id": "forge",
"name": "Forge",
"workspace": "/home/totaluser/.openclaw/forge",
"agentDir": "/home/totaluser/.openclaw/agents/forge/agent",
"heartbeat": {}
},
{
"id": "scout",
"name": "Scout",
"workspace": "/home/totaluser/.openclaw/scout",
"agentDir": "/home/totaluser/.openclaw/agents/scout/agent",
"memorySearch": {
"qmd": {
"extraCollections": [
{
"path": "/home/totaluser/.openclaw/shared/health_research",
"name": "health-research"
}
]
}
},
"heartbeat": {}
},
{
"id": "vital",
"name": "vital",
"workspace": "/home/totaluser/.openclaw/vital",
"agentDir": "/home/totaluser/.openclaw/agents/vital/agent",
"memorySearch": {
"qmd": {
"extraCollections": [
{
"path": "/home/totaluser/.openclaw/shared/health_research",
"name": "health-research"
}
]
}
},
"heartbeat": {}
},
sorry this is part 2/3
{
"id": "sentinel",
"name": "sentinel",
"workspace": "/home/totaluser/.openclaw/sentinel",
"agentDir": "/home/totaluser/.openclaw/agents/sentinel/agent",
"heartbeat": {}
},
{
"id": "alfred",
"name": "Alfred",
"workspace": "/home/totaluser/.openclaw/alfred",
"agentDir": "/home/totaluser/.openclaw/agents/alfred/agent",
"heartbeat": {
"every": "15m",
"target": "telegram",
"accountId": "forge"
}
},
{
"id": "rush",
"name": "rush",
"workspace": "/home/totaluser/.openclaw/rush",
"agentDir": "/home/totaluser/.openclaw/agents/rush/agent",
"memorySearch": {
"qmd": {
"extraCollections": [
{
"path": "yr-knowledge"
}
]
}
}
},
{
"id": "cipher",
"name": "Cipher",
"workspace": "/home/totaluser/.openclaw/cipher",
"agentDir": "/home/totaluser/.openclaw/agents/cipher/agent"
}
]
totaluser@Total-Hardware:~$
part 3/3
This actually looks pretty close to correct.
What looks good
- plugin is enabled:
enabled: true - targeted agents include:
main,forge,rush,scout,vital - allowed chat types include:
directandchannel - logging is on
So for those agents, in a Discord thread/channel, Active Memory should be eligible.
One thing Iād still set explicitly
Your config does not show:
config.enabled: true
It may still work depending on defaults, but if you want zero ambiguity, set it:
openclaw config set plugins.entries.active-memory.config.enabled true --strict-json
openclaw gateway restart
Also, this is not a problem
Config path not found: plugins.slots.memory
Thatās fine. It does not mean Active Memory is broken.
So my read is
For these agents:
mainforgerushscoutvital
Active Memory config looks basically right, as long as you test in one of those agents.
It will not run for:
sentinelalfredcipher
because they are not in config.agents.
Best test now
In the actual session you care about:
/active-memory on
/active-memory status
/verbose on
Then ask something memory-relevant and watch for:
š§© Active Memory: ok ...
š Active Memory Debug: ...
If you want the cleanest next step, Iād do exactly this:
openclaw config set plugins.entries.active-memory.config.enabled true --strict-json
openclaw gateway restart
Then test again in rush or main.
how can i check qmd collections that openclaw uses again?
Use the agent-scoped QMD env, not plain qmd collection list.
For main:
XDG_CONFIG_HOME="$HOME/.openclaw/agents/main/qmd/xdg-config" \
QMD_CONFIG_DIR="$HOME/.openclaw/agents/main/qmd/xdg-config/qmd" \
XDG_CACHE_HOME="$HOME/.openclaw/agents/main/qmd/xdg-cache" \
qmd collection list
Template for any agent:
XDG_CONFIG_HOME="$HOME/.openclaw/agents/<agent-id>/qmd/xdg-config" \
QMD_CONFIG_DIR="$HOME/.openclaw/agents/<agent-id>/qmd/xdg-config/qmd" \
XDG_CACHE_HOME="$HOME/.openclaw/agents/<agent-id>/qmd/xdg-cache" \
qmd collection list
And if you also want the matching QMD index status:
XDG_CONFIG_HOME="$HOME/.openclaw/agents/main/qmd/xdg-config" \
QMD_CONFIG_DIR="$HOME/.openclaw/agents/main/qmd/xdg-config/qmd" \
XDG_CACHE_HOME="$HOME/.openclaw/agents/main/qmd/xdg-cache" \
qmd status
Plain qmd collection list checks your default shell QMD cache, not OpenClawās per-agent one.
can you give me rush, main, scout, vital, and forge
Yep, here you go.
rush
XDG_CONFIG_HOME="$HOME/.openclaw/agents/rush/qmd/xdg-config" \
QMD_CONFIG_DIR="$HOME/.openclaw/agents/rush/qmd/xdg-config/qmd" \
XDG_CACHE_HOME="$HOME/.openclaw/agents/rush/qmd/xdg-cache" \
qmd collection list
main
XDG_CONFIG_HOME="$HOME/.openclaw/agents/main/qmd/xdg-config" \
QMD_CONFIG_DIR="$HOME/.openclaw/agents/main/qmd/xdg-config/qmd" \
XDG_CACHE_HOME="$HOME/.openclaw/agents/main/qmd/xdg-cache" \
qmd collection list
scout
XDG_CONFIG_HOME="$HOME/.openclaw/agents/scout/qmd/xdg-config" \
QMD_CONFIG_DIR="$HOME/.openclaw/agents/scout/qmd/xdg-config/qmd" \
XDG_CACHE_HOME="$HOME/.openclaw/agents/scout/qmd/xdg-cache" \
qmd collection list
vital
XDG_CONFIG_HOME="$HOME/.openclaw/agents/vital/qmd/xdg-config" \
QMD_CONFIG_DIR="$HOME/.openclaw/agents/vital/qmd/xdg-config/qmd" \
XDG_CACHE_HOME="$HOME/.openclaw/agents/vital/qmd/xdg-cache" \
qmd collection list
forge
XDG_CONFIG_HOME="$HOME/.openclaw/agents/forge/qmd/xdg-config" \
QMD_CONFIG_DIR="$HOME/.openclaw/agents/forge/qmd/xdg-config/qmd" \
XDG_CACHE_HOME="$HOME/.openclaw/agents/forge/qmd/xdg-cache" \
qmd collection list
If you want, I can also give you the same 5 as qmd status commands too.
what is considered "too large" of a qmd where speed suffers significantly
There isnāt a clean universal cutoff like āpast X files QMD is badā.
In practice, ātoo largeā is when you start seeing one of these:
- searches regularly take multiple seconds
- you hit QMD timeouts (
memory.qmd.limits.timeoutMs, default4000) - indexing/re-embedding gets annoyingly slow
- you duplicate the same big corpus across several agents, so total work/storage multiplies
Practical rule of thumb
Your numbers from earlier, roughly hundreds to low-thousands of chunks per agent, are not huge.
Iād start getting more careful when a single agentās QMD grows into:
- many thousands of chunks, especially on weaker hardware
- several large shared corpora indexed into multiple agents
- DB sizes that keep growing while searches stop feeling āinstant enoughā
The real bottleneck is usually not raw file count
Itās more about:
- total chunk count
- number of collections
- whether the corpus is duplicated across agents
- your machine speed
- whether reranking/query expansion is active and how long it takes
Better heuristic
Instead of asking āhow big is too big?ā, ask:
āAre searches still reliably fast enough for my workflow?ā
If yes, youāre fine.
If not, the first thing Iād do is:
- keep shared corpora only on agents that need them
- split specialized corpora into targeted collections
- increase timeout if hardware is slower:
openclaw config set memory.qmd.limits.timeoutMs 120000 --strict-json
So short version: your current setup does not sound obviously too large yet.
The bigger danger is indexing too many shared folders into too many agents.
how do i check how many chunks a qmd collection for main has
Yep, for main you can query the QMD SQLite DB directly.
This will show chunk/doc counts per collection:
sqlite3 "$HOME/.openclaw/agents/main/qmd/xdg-cache/qmd/index.sqlite" \
'SELECT collection, COUNT(*) AS chunks FROM documents WHERE active = 1 GROUP BY collection ORDER BY chunks DESC;'
Thatās the closest āper collection chunk countā check.
If you want it prettier:
sqlite3 -header -column "$HOME/.openclaw/agents/main/qmd/xdg-cache/qmd/index.sqlite" \
'SELECT collection, COUNT(*) AS chunks FROM documents WHERE active = 1 GROUP BY collection ORDER BY chunks DESC;'
A quick note:
qmd collection listshows files- this SQLite query shows document/chunk rows per collection
If you want, I can also give you the same command for rush, scout, vital, and forge.
so this isnt that much
totaluser@Total-Hardware:~$ sqlite3 -header -column "$HOME/.openclaw/agents/main/qmd/xdg-cache/qmd/index.sqlite"
'SELECT collection, COUNT(*) AS chunks FROM documents WHERE active = 1 GROUP BY collection ORDER BY chunks DESC;'
collection chunks
workspace-memory-root-main 579
research 305
sessions-main 158
workspace-memory-dir-main 63
health-research 62
totaluser@Total-Hardware:~$
Yeah, thatās pretty modest.
For main:
579chunks in workspace root305inresearch158in sessions63in memory dir62in health research
That is not a scary-sized QMD.
I would not expect that collection mix to cause major speed problems on its own.
If youāre seeing sluggishness, itās more likely to be from:
- the agent choosing a worse tool path
- QMD query/rerank overhead
- disk / machine speed
- duplicated corpora across several agents
But purely from chunk count, main looks pretty reasonable.
Rough gut check:
- hundreds of chunks, fine
- low thousands, usually still fine
- many thousands per agent, start watching more closely
- same big corpus duplicated across lots of agents, thatās where it gets annoying fast
So yeah, Iād call your current main footprint small to medium, not large.
how do i force a memory search through cli again?
Use:
openclaw memory search --agent main --query "your query here" --json
Example:
openclaw memory search --agent main --query "thunderbird" --json
That forces a memory-search run through the CLI for main.
Useful variants:
openclaw memory search --agent rush --query "weather research" --json
openclaw memory search --agent scout --query "health facts" --max-results 10 --json
If you want, I can give you a tiny cheat sheet for status, index, and search together.