QMD Plugin Deep Dive: Perfect Long-Term Memory for OpenClaw
"I forgot we talked about that."
This is the most common frustration when using AI agents for ongoing projects. While various vector database integrations existed, they often suffered from "semantic noise"—retrieving thousand irrelevant documents just because one word matched.
The QMD (Query-Mapped Document) Plugin, released in early February 2026, aims to solve this once and for all.
What makes QMD Different?
Standard RAG (Retrieval-Augmented Generation) simply finds similar text chunks. QMD introduces a Logic Layer between the query and the database.
- Query Decomposition: QMD breaks down an agent's request into specific categories: Facts, Preferences, Past Actions, and Context.
- Dual-Stream Retrieval: It searches both a classic vector store and a new "Relational Knowledge Graph" simultaneously.
- Validation Loop: Before presenting data to the agent, QMD runs a "mini-check" to ensure the retrieved data actually answers the agent's question.
Setting Up QMD on OpenClaw
To get started with QMD, you'll need OpenClaw version 2026.2.2 or higher.
1. Installation
Install the plugin via the CLI:
claw install skill-qmd-memory
2. Configuration
In your config.yaml, enable the QMD provider:
memory:
provider: qmd
vector_db: chroma # or pinecone/milvus
embedding_model: text-embedding-3-small
strict_validation: true
3. Training the Brain
The best part of QMD is its "Learning Mode." When enabled, the agent will periodically ask itself questions about your conversation to create "High-Value Summary Docs." These summaries are prioritized over raw chat history, leading to much faster and more accurate responses.
Real-World Results
In our benchmarking, agents using QMD were 45% more likely to correctly recall a user's specific preference from a conversation held three weeks prior compared to standard ChromaDB setups.
Is it worth the overhead?
QMD does require an extra model call for the "validation loop," which slightly increases cost and latency. However, for agents tasked with long-term projects like writing a book, managing a complex calendar, or acting as a personal research assistant, the increased reliability is more than worth it.
For a list of wrappers that support QMD out of the box, visit our Features Comparison Page.