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 three memory-related files: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.DREAMS.md(experimental, optional) — Dream Diary and dreaming sweep summaries for human review, including grounded historical backfill entries.
~/.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 Wiki companion plugin
If you want durable memory to behave more like a maintained knowledge base than just raw notes, use the bundledmemory-wiki plugin.
memory-wiki compiles durable knowledge into a wiki vault with:
- deterministic page structure
- structured claims and evidence
- contradiction and freshness tracking
- generated dashboards
- compiled digests for agent/runtime consumers
- wiki-native tools like
wiki_search,wiki_get,wiki_apply, andwiki_lint
memory-wiki adds a provenance-rich
knowledge layer beside it.
See Memory Wiki.
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.
Knowledge wiki layer
Memory Wiki
Compiles durable memory into a provenance-rich wiki vault with claims,
dashboards, bridge mode, and Obsidian-friendly workflows.
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.Dreaming (experimental)
Dreaming is an optional background consolidation pass for memory. It collects short-term signals, scores candidates, and promotes only qualified items into long-term memory (MEMORY.md).
It is designed to keep long-term memory high signal:
- Opt-in: disabled by default.
- Scheduled: when enabled,
memory-coreauto-manages one recurring cron job for a full dreaming sweep. - Thresholded: promotions must pass score, recall frequency, and query diversity gates.
- Reviewable: phase summaries and diary entries are written to
DREAMS.mdfor human review.
Grounded backfill and live promotion
The dreaming system now has two closely related review lanes:- Live dreaming works from the short-term dreaming store under
memory/.dreams/and is what the normal deep phase uses when deciding what can graduate intoMEMORY.md. - Grounded backfill reads historical
memory/YYYY-MM-DD.mdnotes as standalone day files and writes structured review output intoDREAMS.md.
MEMORY.md.
When you use:
DREAMS.mdstays the human review surface.- the short-term store stays the machine-facing ranking surface.
MEMORY.mdis still only written by deep promotion.
CLI
Further reading
- Builtin Memory Engine — default SQLite backend
- QMD Memory Engine — advanced local-first sidecar
- Honcho Memory — AI-native cross-session memory
- Memory Wiki — compiled knowledge vault and wiki-native tools
- Memory Search — search pipeline, providers, and tuning
- Dreaming (experimental) — background promotion from short-term recall to long-term memory
- Memory configuration reference — all config knobs
- Compaction — how compaction interacts with memory