Setting Up QMD
Configuration, installation, verification. Getting QMD running in your workspace.
Getting QMD running is straightforward, but the configuration has a few non-obvious settings that affect search quality. Let's walk through the setup properly so you don't have to debug silent failures later.
The installation itself is one command: bun install -g https://github.com/tobi/qmd. This makes the QMD binary available system-wide. Verify it worked with qmd --version โ you should see a version number, not an error.
Configuration happens in your openclaw.json. You're changing the memory backend from the default to QMD. The key setting is memory.backend = "qmd". This tells OpenClaw to route all memory_search calls through QMD's enhanced search pipeline instead of the basic search. Your memory_get calls (exact file retrieval) are unaffected โ those still work the same way.
There are optional tuning parameters worth knowing about. Re-rank threshold controls how aggressively QMD filters low-relevance results. A higher threshold means fewer but more relevant results. Start with the default and adjust if you're getting too many noisy results. Max results caps how many items a search returns. Default is usually 10 โ for most use cases, 5-8 is better since your agent processes fewer, more relevant results.
Verification is critical. After configuration, run a test search for something you know exists in your memory. If QMD is working, you'll see results with relevance scores. If you see empty results or errors, the most common causes are: QMD not installed globally, missing embedding provider key (Stage 2, Lesson 4), or a typo in the config backend name.
Walkthrough
- 1Install QMD globally:
bun install -g https://github.com/tobi/qmd - 2Open your
openclaw.jsonconfiguration file - 3Add or modify the memory configuration: set
memory.backendto"qmd" - 4Optional: set
memory.qmd.rerank_threshold(start with default) - 5Optional: set
memory.qmd.max_resultsto 5 or 8 - 6Save the config and restart OpenClaw
- 7Test: ask your agent to 'search memory for [topic you know exists]'
- 8Verify results include relevance scores and are correctly ranked
Checkpoint
QMD is installed, configured as your memory backend in openclaw.json, and returning ranked search results with relevance scores.