Memory Overview
OpenClaw remembers things by writing plain Markdown files in your agent’s workspace. The model only “remembers” what gets saved to disk — there is no hidden state.How it works
Your agent has two places to store memories:MEMORY.md— long-term memory. Durable facts, preferences, and decisions. Loaded at the start of every DM session.memory/YYYY-MM-DD.md— daily notes. Running context and observations. Today and yesterday’s notes are loaded automatically.
~/.openclaw/workspace).
Memory tools
The agent has two tools for working with memory:memory_search— finds relevant notes using semantic search, even when the wording differs from the original.memory_get— reads a specific memory file or line range.
memory-core).
Memory search
When an embedding provider is configured,memory_search uses hybrid
search — combining vector similarity (semantic meaning) with keyword matching
(exact terms like IDs and code symbols). This works out of the box once you have
an API key for any supported provider.
OpenClaw auto-detects your embedding provider from available API keys. If you
have an OpenAI, Gemini, Voyage, or Mistral key configured, memory search is
enabled automatically.
Memory backends
Builtin (default)
SQLite-based. Works out of the box with keyword search, vector similarity, and
hybrid search. No extra dependencies.
QMD
Local-first sidecar with reranking, query expansion, and the ability to index
directories outside the workspace.
Honcho
AI-native cross-session memory with user modeling, semantic search, and
multi-agent awareness. Plugin install.
Automatic memory flush
Before compaction summarizes your conversation, OpenClaw runs a silent turn that reminds the agent to save important context to memory files. This is on by default — you do not need to configure anything.CLI
Further reading
- Builtin Memory Engine — default SQLite backend
- QMD Memory Engine — advanced local-first sidecar
- Honcho Memory — AI-native cross-session memory
- Memory Search — search pipeline, providers, and tuning
- Memory configuration reference — all config knobs
- Compaction — how compaction interacts with memory