跳到主要内容

Memory Tools

ClawCentral

In ClawCentral, memory files are stored in ClawCentral's cloud storage — there is no local ~/.openclaw/ directory. All memory tools work the same way; only the storage location differs.

ClawCentral agents have access to a persistent memory store backed by Markdown files. Four tools let the agent read, write, and search memories:

ToolDescription
memory_writeWrite or append content to a memory file
memory_readRead a specific memory file by path
memory_searchSemantic keyword search across all stored memories
memory_getTargeted read of a memory file with optional line range

Memory file layout

Two memory layers are used by default:

  • MEMORY.md — curated long-term memory; always loaded at session start.
  • memory/YYYY-MM-DD.md — daily log; today's and yesterday's entries are loaded at session start.

memory_write

Writes content to a memory file. If the file exists, content is appended; a new file is created otherwise.

Example use: "Remember that my preferred language is TypeScript."

The agent writes this to MEMORY.md or today's daily log using memory_write.

memory_read

Reads the full content of a memory file. Useful when the agent needs to review an existing memory before updating it.

Performs semantic search across all memory files. Returns ranked snippets with file path and line range so the agent can retrieve more context via memory_get if needed.

Parameters:

  • query (required) — natural language query
  • maxResults (optional) — number of snippets to return (default: 5)

Returns: A list of snippets, each with:

  • text — the matched content (~700 chars, capped)
  • path — source file (e.g., MEMORY.md, memory/2026-03-15.md)
  • lineStart / lineEnd — exact line range
  • score — relevance score

Example: The agent searches for "home WiFi password" and gets back the exact line from a daily note where the password was stored, along with the file path so it can read more context.

memory_get

Reads a specific memory file or a line range within one. Used after memory_search returns a snippet to get surrounding context.

Parameters:

  • path (required) — file path, e.g., MEMORY.md or memory/2026-03-15.md
  • startLine (optional) — line to start reading from
  • lines (optional) — number of lines to read

Example:

memory_get({ path: "MEMORY.md", startLine: 42, lines: 20 })

When to use each tool

GoalTool
Store a fact for latermemory_write
Read an existing memory filememory_read
Find memories related to a topicmemory_search
Read a specific excerpt by linememory_get

Tips

  • Ask the agent to "remember" something and it will use memory_write automatically.
  • For persistent facts (preferences, credentials, project details), say "add this to MEMORY.md."
  • For session-specific notes, the agent uses today's daily log.
  • Memory search uses semantic similarity — you don't need exact keywords.
  • Memory concepts — full details on memory files, flush behavior, and vector search configuration.
  • Slash commands/memory command for manual memory management.