Skip to content
Membase
How to Add Persistent Memory to OpenClaw

How to Add Persistent Memory to OpenClaw

MEMORY.md, Memory Plugins and MCP, and How to Share OpenClaw’s Memory with Every AI

Research
MembaseMembase Team
View the original post on Medium

Disclosure: Membase is our product. OpenClaw’s built-in memory is good, and for a single agent on one machine it may be all you need. We cover it first. Facts were checked against OpenClaw’s documentation in November 2026.

Quick answer

OpenClaw remembers by writing plain Markdown files in your agent’s workspace (by default ~/.openclaw/workspace). There’s no hidden state: the agent only remembers what’s saved to disk.

  • MEMORY.md holds long-term facts and decisions, loaded at the start of every session.
  • USER.md holds your preferences and profile.
  • memory/YYYY-MM-DD.md files hold daily notes, searchable with memory_search.
  • Dreaming moves the useful parts of daily notes into MEMORY.md in the background.

To swap or extend that memory, OpenClaw has a memory plugin slot and supports MCP servers. To give OpenClaw the same memory as Claude, ChatGPT and your coding agents, install the Membase plugin:

openclaw plugins install clawhub:@unibaseio/membase

In this guide: How OpenClaw memory works · What goes where · Memory tools · Dreaming and memory flush · Where OpenClaw memory stops · Memory plugins · Add memory with Membase · Connect memory over MCP · FAQ

How OpenClaw memory works

Your agent has four memory files:

FileWhat it holdsWhen it loads
USER.md (optional)Stable preferences, communication style, relationships, active projects, written as directivesStart of a session, with its own small budget
MEMORY.mdLong-term facts and standing decisionsStart of a session
memory/YYYY-MM-DD.mdDaily notes: running context and observationsToday’s and yesterday’s notes load on /new or /reset; older ones are searched
DREAMS.md (optional)Dreaming summaries for you to reviewNot loaded; for human review

To save something, just ask: “Remember that I prefer TypeScript.” The agent writes it to the right file.

What goes where

  • USER.md is the compact profile: preferences and facts about you. When a preference changes, it’s updated in place rather than adding a contradicting line.
  • MEMORY.md is the curated layer: durable facts, standing decisions and short summaries. It’s not a transcript or a daily log.
  • Daily notes are the working layer: detailed notes and session summaries. They’re indexed for search but not loaded into every turn.

Watch the size of MEMORY.md. If it grows past the startup budget, OpenClaw keeps the full file on disk but cuts the copy it loads. Move detail into memory/*.md and keep a short summary in MEMORY.md. Check with /context list, /context detail or openclaw doctor.

Memory tools

The agent works with memory through three tools, provided by the active memory plugin (memory-core by default):

ToolWhat it does
memory_searchFinds relevant notes, even when the wording is different
memory_getReads a specific memory file or lines
intentCreates, lists or cancels event-triggered standing intents

With an embedding provider set up, memory_search combines meaning-based and keyword search. OpenClaw uses OpenAI embeddings by default, and supports Gemini, Voyage, Mistral, Ollama, LM Studio, local models and others.

From the command line:

openclaw memory status
openclaw memory search "query"
openclaw memory index --force

Moving from Claude Code or Codex? In the Control UI, open Settings > Import Memory to copy Markdown memory from Codex, Claude Code or Hermes into OpenClaw. Imported files are kept separate and searchable; your source files aren’t changed.

Dreaming and memory flush

  • Dreaming runs in the background by default. It scores what’s been recalled recently and promotes only qualified items into MEMORY.md, writing summaries to DREAMS.md for you to review.
  • Memory flush: before OpenClaw compacts a long conversation, it runs a silent turn that reminds the agent to save important context. It’s on by default.

Where OpenClaw memory stops

OpenClaw’s memory is designed for one agent’s workspace. Outside that, it doesn’t reach:

  1. Your other AI tools. Claude, ChatGPT, Claude Code, Codex and Cursor keep their own memory. A decision you made in OpenClaw doesn’t reach them, and the reverse.
  2. Another machine. Memory lives in the workspace on the machine running OpenClaw, unless you sync it yourself.
  3. What MEMORY.md can’t fit. Past the startup budget, the loaded copy is cut, so older facts may not be in context.
  4. What isn’t written down. If the agent doesn’t save a fact, the next session doesn’t know it.

OpenClaw memory plugins

OpenClaw has one memory slot. The plugin in that slot owns recall and the memory tools.

OptionWhat it isBest for
memory-core (default)SQLite-based, with keyword, vector and hybrid searchMost single-agent setups
LanceDBLanceDB-backed memory with auto-recall, auto-capture and local Ollama embeddingsLocal vector memory
HonchoCross-session memory with user modelingA deeper model of the user
memory-wikiA knowledge vault beside your memory plugin, not a replacementTurning memory into a maintained wiki
MembaseYour Membase account as OpenClaw’s memory, shared with your other AI toolsOne memory across OpenClaw, Claude, ChatGPT and coding agents

Add persistent memory to OpenClaw with Membase

The Membase plugin makes your Membase account OpenClaw’s memory. Before each turn you send, it recalls what you told other AIs, and it gives the agent three tools:

ToolWhat it does
membase_searchSearches your Memories; every result names the Memory it came from
membase_saveSaves a note, only when you ask the agent to remember something
membase_profileReads your profile facts, if your key has Profile access

There’s no delete tool. Removing memory stays in the Membase app.

Set it up:

  1. Get a key. Sign up at app.membase.com and open Connect > Developer keys. A Read key is enough to search. Choose Read & write if the agent should save, and have that key reach exactly one Memory. Tick Profile if it should read your profile.
  2. Install the plugin (OpenClaw 2026.10.1 or newer). Keep the clawhub: prefix:
openclaw plugins install clawhub:@unibaseio/membase

3. Configure it in ~/.openclaw/openclaw.json:

{
  plugins: {
    slots: { memory: "membase" },
    entries: {
      membase: {
        enabled: true,
        hooks: { allowConversationAccess: true },
        config: {
          apiKey: "${MEMBASE_API_KEY}"
        }
      }
    }
  }
}

allowConversationAccess lets the plugin read your message before a turn, which automatic recall needs.

4. Restart and check:

openclaw plugins reload membase
openclaw memory status

You should see provider: membase, health: ready.

Good to know:

  • One key is one person. The plugin is for a personal agent: your OpenClaw and your Membase. In group chats or conversations with others, your memory isn’t offered unless you turn on allowSharedConversations, and those conversations can never save.
  • Recall waits up to 8 seconds, then the turn continues without memory. The first search after a quiet spell is slower; the next is fast.
  • Saving is deliberate. The agent saves when you ask. Set autoCapture: true to also save durable facts before OpenClaw compacts a long session.
  • memory-core can keep running alongside as OpenClaw’s local consolidation.

The same Memory also works in Claude Code, Codex and Cursor over MCP, and in Claude and ChatGPT as a connector. Tell OpenClaw something on Monday, and Claude Code knows it on Tuesday.

Connect memory over MCP instead

OpenClaw can also use MCP servers, saved with openclaw mcp. This adds memory as tools the agent can call, without replacing the memory slot. To add a remote MCP server:

openclaw mcp add membase \
  --url https://api.app.membase.com/mcp-http \
  --transport streamable-http \
  --auth oauth
openclaw mcp login membase
openclaw mcp doctor membase --probe

Stop the Gateway before adding or changing saved MCP servers, or use the Control UI at /settings/mcp.

Plugin or MCP? Use the plugin if you want OpenClaw to recall automatically before every turn. Use MCP if you want to keep memory-core in the slot and call Membase only when needed.

Use it alongside MEMORY.md

You don’t have to choose:

LayerKeep here
USER.mdYour stable preferences
MEMORY.md and daily notesWhat this agent learns in its workspace
MembaseDecisions and context that must follow you across OpenClaw, Claude, ChatGPT and your coding agents

Frequently Asked Questions

Does OpenClaw have memory?
Yes. It writes Markdown files in your agent’s workspace: MEMORY.md for long-term facts, USER.md for your preferences, and daily notes in the memory folder.
Where is OpenClaw memory stored?
In your agent’s workspace, by default ~/.openclaw/workspace.
What is MEMORY.md in OpenClaw?
The curated long-term memory file: durable facts and standing decisions, loaded at the start of every session.
Why does OpenClaw forget things?
Usually because the fact was never saved, or MEMORY.md grew past the startup budget and the loaded copy was cut. Ask the agent to remember important things, and keep MEMORY.md short.
What is an OpenClaw memory plugin?
A plugin that fills OpenClaw’s memory slot and provides recall and memory tools. The default is memory-core; others include LanceDB, Honcho and Membase.
Does OpenClaw support MCP?
Yes. Use openclaw mcp add to save MCP servers for OpenClaw agents, or openclaw mcp serve to expose OpenClaw’s conversations to other MCP clients.
Can OpenClaw share memory with Claude Code or ChatGPT?
Not with its built-in memory. With the Membase plugin, OpenClaw uses the same memory as Claude Code, Codex, Cursor, Claude and ChatGPT.
Can I import Claude Code or Codex memory into OpenClaw?
Yes. In the Control UI, open Settings > Import Memory. It copies Markdown memory from Codex, Claude Code or Hermes.
Back to all posts