Memory System
How OpenClaw stores and uses memories
How OpenClaw stores and uses memories
OpenClaw's memory system stores conversations, context, and information as files in your workspace. This file-based approach means you can read, edit, search, and version control your memories just like any other files.
OpenClaw stores memories as Markdown files:
Memories are stored in your workspace (~/.openclaw/workspace by default):
~/.openclaw/workspace/YYYY-MM-DD.md~/.openclaw/workspace/sessions/Daily notes are created automatically:
# 2026-01-25
## Conversations
- Discussed project ideas with user
- Helped with configuration setup
## Important Information
- User prefers dark mode
- Workspace location: ~/projects
Memory search (finding relevant past context) may use embeddings. Depending on your setup, you may need to configure an embeddings model or API key in addition to your main LLM—it is not always enabled out of the box. OpenClaw supports several embeddings providers, including Voyage AI (native support). If memory search or “what the agent remembers” seems limited, check your configuration for embeddings provider settings. See Configuration and your provider’s docs for embedding options.
QMD & builtin (2026.2.21): With the QMD backend, per-agent memorySearch.enabled=false is respected at gateway startup; multi-collection searches run as per-collection queries. BM25-only search mode skips embed runs (e.g. memory index --force). The builtin backend avoids sync races on shutdown so onSearch/onSessionStart no longer fail with "database is not open" in ephemeral CLI flows. /status session summaries include cacheRead/cacheWrite for cache hit percentages.
RAG (retrieval-augmented generation) usually means: chunk documents, embed them, store vectors, retrieve top‑k chunks per question, then answer from that slice. The memory system on this page leans on workspace files, notes, and context you curate—not necessarily a dedicated vector database.
If you want the assistant to remember preferences and read a vault of notes, start with the patterns above plus skills. For a walkthrough, use personal knowledge base. Files are easy to grep, diff, and back up.
web_fetch is too slow or too fuzzy.Then you typically run embeddings and a vector store next to the Gateway and expose search through tools or skills. Wire formats change—confirm in official docs before production.
Keep memory files for identity and standing preferences, skills for repeatable procedures, and retrieval only for the big corpus (handbook, ticket archive, PDFs) so you do not pay an embedding bill on every chat turn.
For release-level embedding and API notes, see Releases and Memory management tutorial.
The agent automatically accesses memories:
You can also access memories directly:
View your memories:
~/.openclaw/workspaceEdit memory files directly:
Search your memories:
grep or text search toolsMemory files are stored locally:
OpenClaw’s built-in memory is file-based: daily notes, session history, and optional embeddings-based search. If you want structured long-term memory, automatic curation into a context tree, or higher-accuracy recall, you can add a community skill. ByteRover (on ClawHub) provides a memory skill with automatic memory flush at compaction, daily knowledge mining, and a context plugin that injects relevant context into prompts—see ByteRover’s OpenClaw integration docs. Browse Skills and ClawHub for other memory-related skills.