Start free
Guide Memory

How to give OpenClaw better memory

Updated 4 min read

The short answer

OpenClaw remembers things by writing plain Markdown files in your agent's workspace (OpenClaw docs), and the model only remembers what gets saved to disk, with no hidden state (OpenClaw docs). MEMORY.md is the long-term file for durable facts and decisions, loaded at the start of a session (OpenClaw docs), and memory/YYYY-MM-DD.md files are the working layer for detailed daily notes (OpenClaw docs). memory_search recalls notes with hybrid search (OpenClaw docs), the default built-in memory engine is SQLite-based and works out of the box with keyword, vector, and hybrid search (OpenClaw docs), and Dreaming is the default background consolidation path for memory (OpenClaw docs).

On this page9 sections
  1. How OpenClaw memory works
  2. The memory files
  3. How to save things to memory
  4. How to find things again
  5. Limits to plan around
  6. Consolidation and imports
  7. Where KnowMan fits
  8. Use the hosted KnowMan server
  9. Questions people ask

How OpenClaw memory works

OpenClaw remembers things by writing plain Markdown files in your agent's workspace (OpenClaw docs). The model only remembers what gets saved to disk, and there is no hidden state (OpenClaw docs).

The sections below cover the files, how to save things, how to find them again, the limits, and how memory is consolidated.

The memory files

Each agent has four memory-related files (OpenClaw docs). USER.md is optional and holds stable preferences and communication style (OpenClaw docs). MEMORY.md is the long-term memory file, for durable non-profile facts and decisions, and it is loaded at the start of a session (OpenClaw docs). It is not a raw transcript, daily log, or exhaustive archive (OpenClaw docs). The memory/YYYY-MM-DD.md files are the working layer, for detailed daily notes (OpenClaw docs).

How to save things to memory

Just ask your agent to remember something, and it writes the note to the appropriate file (OpenClaw docs).

OpenClaw also protects the moment context gets compressed. Before compaction summarizes the conversation, it runs a silent turn that reminds the agent to save important context to durable memory (OpenClaw docs). The automatic memory flush is on by default; you can turn it off with agents.defaults.compaction.memoryFlush.enabled: false (OpenClaw docs).

How to find things again

memory_search finds relevant notes using semantic search, even when the wording differs from the original (OpenClaw docs). It uses hybrid search, combining vector similarity for semantic meaning with keyword matching (OpenClaw docs).

memory_get reads a specific memory file or line range (OpenClaw docs). The intent tool creates, lists, or explicitly cancels event-conditioned standing intents, while time-based reminders continue to use scheduled tasks (OpenClaw docs). The default built-in memory engine is SQLite-based and works out of the box with keyword search, vector similarity, and hybrid search (OpenClaw docs).

Limits to plan around

If MEMORY.md grows past the bootstrap file budget, OpenClaw keeps the file on disk intact but truncates the copy injected into context (OpenClaw docs).

OpenClaw can exclude MEMORY.md from automatic memory context, logging a warning that memory provenance is untrusted (OpenClaw docs). Memory can preserve approval context, but it does not enforce policy (OpenClaw docs). For keeping what you inject into any model lean, see give your AI context.

Consolidation and imports

Dreaming is the default background consolidation path for memory (OpenClaw docs). It writes phase summaries and diary entries to DREAMS.md for human review, including rewrite counts and highlights (OpenClaw docs).

The Control UI can import existing local memory from Codex, Claude Code, and Hermes (OpenClaw docs). Imported memories are available through memory_get but are not merged into the agent's bootstrap MEMORY.md (OpenClaw docs). If you want durable memory to behave more like a maintained knowledge base than raw notes, the bundled memory-wiki plugin serves that use case (OpenClaw docs).

Where KnowMan fits

KnowMan saves articles and links, reads and tags them, answers questions with citations, and keeps memories of claims, decisions, and playbooks (KnowMan guide). Its open-source MCP client is a standalone local stdio server, package @knowman/mcp, run with npx -y @knowman/mcp on Node 22 or newer (KnowMan guide). It talks to KnowMan's HTTP API with a Bearer key in KNOWMAN_API_KEY (KnowMan guide). KnowMan also runs as a hosted remote MCP server at https://api.knowman.io/mcp, using OAuth sign-in or an API key.

Tools include kb_search for saved items by keyword or meaning, kb_ask for cited answers, kb_get_item for one item, kb_save to save a URL, kb_recent, and kb_memories for claims, decisions, and playbooks (KnowMan guide). Documented client setups include Claude Desktop, Claude Code, and Cursor (KnowMan guide). For the wider pattern, see persistent memory for AI agents.

Use the hosted KnowMan server

Open KnowMan at https://app.knowman.io and add https://api.knowman.io/mcp in an OpenClaw client that supports remote MCP servers. Sign in on the KnowMan consent page with OAuth and approve access, or use an API key as an Authorization: Bearer <key> header.

After connecting, ask OpenClaw to search your KnowMan or save a URL. The hosted server provides tools for searching, asking questions, reading items, saving links, and viewing recent items and memories.

Questions people ask

How do I make OpenClaw remember something?

Just ask your agent to remember it, and it writes the note to the appropriate file (OpenClaw docs). Before compaction summarizes the conversation, OpenClaw also runs a silent turn that reminds the agent to save important context to durable memory (OpenClaw docs).

Why does MEMORY.md seem cut off in a session?

If MEMORY.md grows past the bootstrap file budget, OpenClaw keeps the file on disk intact but truncates the copy injected into context (OpenClaw docs). OpenClaw can also exclude MEMORY.md from automatic memory context, logging a warning that memory provenance is untrusted (OpenClaw docs).

Can OpenClaw import memory from other agents?

Yes. The Control UI can import existing local memory from Codex, Claude Code, and Hermes (OpenClaw docs). Imported memories are available through memory_get but are not merged into the agent's bootstrap MEMORY.md (OpenClaw docs).

What does the KnowMan MCP server offer?

KnowMan saves articles and links, reads and tags them, answers questions with citations, and keeps memories of claims, decisions, and playbooks (KnowMan guide). Its open-source MCP client runs locally as a stdio server, with tools including kb_search, kb_ask, and kb_memories (KnowMan guide). KnowMan also runs as a hosted remote MCP server at https://api.knowman.io/mcp, using OAuth sign-in or an API key.

A library your agent can read

Try KnowMan Pro for 14 days with no credit card. Create your account

Start free

Every new account starts with 14 days of Pro. No credit card.