๐Ÿ’พ
Stage 4 ยท Lesson 2 of 5

Setting Up QMD

Configuration, installation, verification. Getting QMD running in your workspace.

~15 min read8 walkthrough steps

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

  1. 1
    Install QMD globally: bun install -g https://github.com/tobi/qmd
  2. 2
    Open your openclaw.json configuration file
  3. 3
    Add or modify the memory configuration: set memory.backend to "qmd"
  4. 4
    Optional: set memory.qmd.rerank_threshold (start with default)
  5. 5
    Optional: set memory.qmd.max_results to 5 or 8
  6. 6
    Save the config and restart OpenClaw
  7. 7
    Test: ask your agent to 'search memory for [topic you know exists]'
  8. 8
    Verify 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.