How QMD Makes AI Assistant Credits Go 5x Further
How ClawOps pairs QMD document search with OpenClaw's builtin memory search so your assistant can find the right files, sessions, and learned context without loading everything into the model.
“How Can Included Credits Be Enough?”
It’s the first question people ask. Included AI usage sounds thin until you understand what’s running under the hood.
The answer is search first. Every ClawOps bot keeps searchable context on its own VPS: QMD indexes your document collections, and OpenClaw’s builtin memory search covers the assistant’s memory, learned notes, saved files, and past conversations. Your assistant looks up the relevant parts before it asks an AI model to answer.
That matters because the expensive part of an AI assistant is not just the final answer. It is all the context you send with the question.
The Problem: Full-Context Loading
When you ask an AI assistant about a document, the naive approach is to load the entire thing into the model’s context window. Your 50-page knowledge base? That can be tens of thousands of tokens just to answer one question.
Do that often enough and your credits vanish into repeated context loading instead of useful reasoning.
This is how many document workflows still work: find the file, stuff most or all of it into the prompt, hope the model finds the answer. It works, but it is wasteful.
The Fix: Search First, Model Second
Local search changes the flow.
- Your assistant searches first. The indexes live on your VPS.
- Search returns the matching context. That might be a few relevant passages from files, session notes, learned rules, or a companion’s private collection.
- Only the useful context goes to the model. The assistant answers with a much smaller prompt.
The model still does the reasoning. Search does the retrieval.
That is the core savings: ClawOps avoids sending a whole document, folder, or memory archive when a handful of focused passages will do.
What Changed Since We First Wrote This
For a while, ClawOps ran QMD as OpenClaw’s memory backend, so QMD handled both documents and the assistant’s own memory. OpenClaw 2026.9.5 retired that backend and made its builtin memory engine the only one. The work is now split between two tools:
Builtin memory search (part of OpenClaw) covers:
- Memory and daily notes the assistant writes down.
- Agent learnings, so rules learned from past mistakes are searchable.
- User files in
~/files, especially markdown and text output saved by the assistant. - Session transcripts, so the assistant can recover useful context from earlier conversations.
It combines keyword search with semantic search, then favors recent and important notes and removes near-duplicates.
QMD (the standalone search tool) covers:
- Companion collections such as Entertainment Buddy’s taste profile and recommendation notes.
- User-added collections when you ask the bot to index a folder.
QMD is installed as the npm package @tobilu/qmd. Older setup notes that mention Bun are outdated for ClawOps users.
Two Layers: Keyword Index and Embeddings
Both engines use the same two layers:
- Keyword index for fast exact and close text matching.
- Embeddings for semantic search when the wording does not match exactly.
The Documents panel in the dashboard shows the QMD side: how many collections and documents QMD sees, and when the index last updated. Collections refresh when companions update their data, and you can refresh them any time.
Click Update Now to run a manual refresh. That triggers both:
qmd update
qmd embed
You do not need to run those yourself: the dashboard does it over the secure management connection to your VPS. Builtin memory search keeps itself up to date without any action from you.
Real-World Savings
The exact savings vary by document size and model, but the shape is consistent:
| Scenario | Naive approach | Search-first approach |
|---|---|---|
| Ask about a long note archive | Send large chunks repeatedly | Search and send the matching passages |
| Ask what happened in an old session | Load broad history | Retrieve the relevant transcript snippets |
| Ask for recommendations from a companion | Load the whole profile | Search the companion’s QMD collection |
| Update a saved report | Re-read everything manually | Search by path/topic, then edit the target file |
For document-heavy workflows, this is often the difference between “AI credits disappear quickly” and “included credits are enough for real daily use.”
We still avoid pretending the number is magic. Search does not make model calls free. It reduces the context you need to send to the model, and that is where the savings come from.
What You See in the Dashboard
Open Dashboard -> Content -> Documents and you will see the QMD status panel:
- Collections: the named indexes available to your assistant.
- Documents: total files currently indexed.
- Last Indexed: when the index last refreshed.
- Auto-indexing: whether ClawOps has seen recent indexing activity.
- Update Now: a manual refresh button.
Collections may include companion data and any folders you have asked the bot to index. Your assistant’s memory, learnings, and conversations are searched by builtin memory search, and you can read them in the Memory tab.
Examples:
Index all markdown files in ~/my-notes
Search my docs for information about AI models
What’s in my workspace about configuration?
The point is not that you learn a new command. The point is that your assistant can use search before it spends model context.
Privacy and Scope
QMD and the memory index both live on your dedicated ClawOps VPS. Your files and collections stay on that server. To power semantic memory search, short passages are sent to an embeddings model through your OpenRouter key, the same way your chat messages are.
When a model needs to answer, it receives the selected snippets your assistant sends as context. That is still an AI model request through your configured provider, usually OpenRouter on ClawOps, but it is much smaller than sending the full source material.
That is the privacy and cost story in one sentence: local retrieval first, external model only for the focused answer.
Credit Where It’s Due
QMD is open source, created by Tobias Lutke. For a stretch it powered OpenClaw’s memory, and it still powers document collections on every ClawOps bot, configured, monitored, and wired into the dashboard.
ClawOps is built on open-source tools like QMD, OpenClaw, Tailwind CSS, Astro, Node.js, and more. We take that seriously: 1% of subscription revenue goes back to open-source projects every quarter. Read more in our open-source commitment post.
Try It Yourself
Every ClawOps bot comes with QMD and builtin memory search set up. Your document index is visible in the dashboard, and you can add collections by asking your bot in chat.
If you are self-hosting OpenClaw instead, start with the OpenClaw memory docs and the QMD project itself: github.com/tobi/qmd.