OpenClaw × Nowledge Mem
Set up OpenClaw with persistent, cross-session memory in 5 minutes.
Once configured, your OpenClaw agent remembers what you said in the last session, the decision you made last week, and the knowledge you wrote into a document three months ago.
Before You Start
You need:
- Nowledge Mem running locally (installation)
- OpenClaw installed (OpenClaw getting started)
nmemCLI on your PATH
nmem status # should show Nowledge Mem is running
openclaw --versionSetup
Install the plugin
openclaw plugins install @nowledge/openclaw-nowledge-memEnable the plugin in OpenClaw config
Open ~/.openclaw/openclaw.json and add:
{
"plugins": {
"slots": {
"memory": "openclaw-nowledge-mem"
},
"entries": {
"openclaw-nowledge-mem": {
"enabled": true,
"config": {
"autoRecall": true,
"autoCapture": false,
"maxRecallResults": 5
}
}
}
}
}Restart OpenClaw and verify
openclaw nowledge-mem statusIf Nowledge Mem is reachable, you're done.
Verify It Works (1 Minute)
In OpenClaw chat:
/remember We chose PostgreSQL for task events/recall PostgreSQL— should find it immediately/new— start a fresh session- Ask:
What database did we choose for task events?— it remembers across sessions - Ask:
What was I working on this week?— weekly activity view - Ask:
What was I doing on February 17?— down to the exact day /forget PostgreSQL task events— clean deletion
If all seven steps work, the memory system is fully running.
What You Can Do
Remember anything, forever
Tell the AI /remember We decided against microservices — the team is too small. Next week, in a different session, ask "what was that decision about microservices?" It finds it.
Browse your work by date
Ask "what was I doing last Tuesday?" and the AI lists everything you saved, documents you added, and insights generated that day. You can ask for a specific date — not just "the past N days."
Trace a decision's history
Ask the AI "how did this idea develop?" and it shows you: the original source documents that informed it, which related memories were synthesized into a higher-level insight, and how your understanding changed over time.
Start every session already in context
Every morning, the Knowledge Agent produces a daily briefing: what you're focused on, open questions, recent changes. Your agent reads it at the start of every session. You never repeat yourself.
Save knowledge with structure, not just text
When you ask the AI to remember something, it doesn't just store text — it records the type (decision, learning, preference, plan…), when it happened, and links it to related knowledge. Searching by type, by date, by topic all work because the structure is there.
Slash commands: /remember, /recall, /forget
How the Hooks Work
Both autoRecall and autoCapture run in the background via plugin lifecycle hooks — they are not AI decisions. The agent never calls a hidden "save" function. The plugin code fires at specific moments, regardless of what the agent is doing.
autoRecall — What happens at session start
Before the agent sees your message, the plugin silently:
- Reads your Working Memory — the daily briefing the Knowledge Agent generates each morning (focus areas, open questions, recent changes)
- Searches your knowledge graph for memories relevant to your current prompt
- Prepends both as invisible context to the system prompt, along with guidance on which Nowledge Mem tools are available
The agent starts each session already aware of your context. You don't ask for it. It just works.
autoCapture — What happens at session end
By default, the agent only saves when you ask it to (autoCapture: false). Turn it on to capture automatically:
"autoCapture": trueAt the end of each session (and at context compaction and reset), two independent things happen:
1. The full conversation is saved as a thread. Every message — yours and the agent's — is appended to a persistent thread in Nowledge Mem, keyed to this session. This happens unconditionally on every successful session end, no matter what was said. You can browse threads chronologically with nowledge_mem_timeline, or search them from any tool.
2. A memory note may be extracted. If your last message contains a decision, preference, or stated fact — for example "I prefer TypeScript" or "we decided against microservices" — a separate structured memory is also created. Questions, short messages, and slash commands are skipped. The memory note is independent of the thread: both can happen, one, or neither.
Context compaction is when OpenClaw compresses a long conversation to fit the model's context window. The plugin captures the transcript at that moment too — messages that get compressed away still end up in your knowledge base.
Messages are deduplicated — if the plugin fires at both session end and reset, you won't get duplicate entries.
Use Across Multiple Machines
If OpenClaw runs on a different machine than Nowledge Mem, add your server address to the plugin config:
"apiUrl": "https://your-nowledge-mem-url",
"apiKey": "nmem_..."Or via environment variables:
export NMEM_API_URL="https://your-nowledge-mem-url"
export NMEM_API_KEY="nmem_..."The API key is passed only through the process environment — it never appears in logs or command history. See Access Mem Anywhere.
Troubleshooting
Plugin is installed but OpenClaw isn't using it
Check that plugins.slots.memory is exactly openclaw-nowledge-mem, and that you restarted OpenClaw after editing the config.
"Duplicate plugin id detected" warning
This happens if you previously installed the plugin locally (e.g. with --link) and then installed from npm. OpenClaw is loading it from both places. Fix it by removing the local path from your config:
Open ~/.openclaw/openclaw.json and delete the plugins.load.paths entry that points to the local plugin directory:
"load": {
"paths": []
}Then restart OpenClaw. The warning will be gone and only the npm-installed version will load.
Status shows not responding
nmem status
curl -sS http://127.0.0.1:14242/healthSearch returns too few results
Raise maxRecallResults to 8 or 12.
Why Nowledge Mem?
Other memory tools store what you said as text and retrieve it by semantic similarity. Nowledge Mem is different.
Knowledge has structure. Every memory knows what type it is — decision, learning, plan, preference — when it happened, which source documents it came from, and how it relates to other memories. That's what makes search precise and reasoning reliable.
Knowledge evolves. The understanding you wrote today connects to the updated version you saved three months later. You can see how your thinking changed, without losing the intermediate steps.
Knowledge has provenance. Every piece of knowledge extracted from a PDF, document, or web page links back to its source. When the AI says "based on your March design doc," you can verify it.
Knowledge travels across tools. What you learned in Cursor, saved in Claude, refined in ChatGPT — all available in OpenClaw. Your knowledge belongs to you, not to any one tool.
Local first, no cloud required. Your knowledge lives on your machine. Remote access is available when you need it, not imposed by default.
How search ranking works: Search & Relevance.
For Advanced Users
OpenClaw's MEMORY.md workspace file still works for workspace context. Memory tool calls are handled by Nowledge Mem, but both can coexist.
The plugin communicates with Nowledge Mem through the nmem CLI. Local and remote modes behave identically — configure the address once and every tool call routes correctly.
References
- Plugin source: nowledge-mem-openclaw-plugin
- OpenClaw docs: Plugin system
- Changelog: CHANGELOG.md