Blog

QMD memory: hybrid search that makes your OpenClaw assistant remember

OpenClaw stores conversation history in workspace memory files, but finding the right piece of context at the right time is hard. QMD fixes that by combining keyword matching with semantic vector search — so your assistant recalls what matters, not just what matches a string.

What is QMD memory?

QMD (Query-Memory-Document) is a hybrid retrieval backend for OpenClaw. Instead of relying on a single search strategy, it runs two in parallel:

  • BM25 keyword search — fast, exact-match scoring over your memory documents. Great when you or the assistant refer to a specific term, name, or command.
  • Vector (semantic) search — embeds queries and memory chunks into a shared vector space. Finds conceptually related information even when the wording is completely different.

Results from both channels are merged and re-ranked, giving you the precision of keyword search and the recall of embeddings in a single lookup.

Why does it matter?

Without QMD, OpenClaw uses its default file-based memory — daily markdown notes and a long-lived MEMORY.md. That works, but retrieval is limited to whatever the model can fit in context or find through basic text search.

With QMD enabled, your assistant gains:

Better recall

Hybrid search surfaces relevant memories that pure keyword matching would miss. Ask "what did we decide about the deployment strategy?" and get results even if the word "deployment" never appeared in your notes.

Automatic indexing

QMD re-indexes your memory files on a 5-minute interval with a 15-second debounce. No manual reindexing, no restarts needed.

Source citations

When QMD retrieves a memory, it can cite the source document — so you know exactly where a recalled fact came from.

Scoped retrieval

By default, QMD memory is scoped to direct chats only. Group noise stays out of your personal memory index.

How to enable QMD in OpenClaw Setup

If you're running OpenClaw through OpenClaw Setup, enabling QMD takes one click:

  1. Open your instance dashboard.
  2. Find the QMD Memory card.
  3. Check Enable QMD memory backend.
  4. Your instance restarts automatically with the new configuration.
OpenClaw Setup dashboard showing the QMD Memory card with the Enable QMD memory backend checkbox checked and a status message confirming the instance is restarting
The QMD Memory toggle in the OpenClaw Setup dashboard. One checkbox, automatic restart.

Behind the scenes, OpenClaw Setup generates the following configuration block and injects it into your instance:

memory:
  backend: qmd
  citations: auto
  qmd:
    includeDefaultMemory: true
    update:
      interval: 5m
      debounceMs: 15000
    limits:
      maxResults: 6
      timeoutMs: 4000
    scope:
      default: deny
      rules:
        - action: allow
          match:
            chatType: direct

You don't need to touch this YAML yourself — the platform handles it. But if you're self-hosting OpenClaw, you can paste this block into your config.yaml directly.

What the config options mean

includeDefaultMemory

When true, QMD indexes your existing workspace memory files (MEMORY.md, daily notes) alongside its own vector store. Your old memories are not lost.

update.interval

How often QMD re-scans and re-indexes memory documents. Default is every 5 minutes — frequent enough to stay current, light enough to avoid overhead.

limits.maxResults

Maximum number of memory chunks returned per query. Set to 6 by default — enough context without flooding the prompt.

scope.default: deny

QMD only indexes conversations that match an explicit allow rule. The default setup allows direct messages only, keeping group chat noise out of your memory index.

Using QMD in practice

Once enabled, QMD works transparently. You don't need to change how you talk to your assistant. A few tips to get the most out of it:

  • Keep writing to your memory files. QMD indexes them automatically. The richer your MEMORY.md and daily notes, the better retrieval gets.
  • Ask follow-up questions freely. QMD can find context from days or weeks ago, even if you don't remember the exact phrasing.
  • Check citations. When the assistant recalls something, it can tell you which document the information came from — useful for verifying facts.
  • Don't worry about indexing lag. The 5-minute interval with 15-second debounce means new memories are searchable within minutes.

QMD vs default memory

Feature Default memory QMD memory
Search type File-based / context window Hybrid BM25 + vector
Semantic matching No Yes
Auto-indexing No Every 5 minutes
Citations No Auto
Scope control All chats Configurable (direct-only by default)
Setup on OpenClaw Setup Default One checkbox

Enable QMD now Memory files guide

Related articles

Cookie preferences