Persistent long-term memory for OpenClaw agents. Once the m0 plugin is installed, your agent automatically remembers facts across conversations and recalls relevant context before each reply.
CapabilityHow It WorksAuto-CaptureAfter each conversation, extracts key facts via LLM and stores them in the cloudAuto-RecallBefore each reply, searches for relevant memories and injects them as contextHybrid SearchVector similarity (HNSW) + fulltext (BM25) + RRF fusion + rerankQuery RewriteResolves pronouns, splits compound questions, expands keywordsExperience LearningDistills successful tool-use patterns into reusable recipesCross-DeviceCloud-native — memories are available from any device, no sync needed
Use these tools to manage the agent's long-term memory:
Search memories by semantic similarity. Returns the most relevant memories.
text
memory_recall query="user's preferred programming language" limit=5
Use when:
Save an important fact, preference, or decision to long-term memory.
text
memory_store text="User prefers TypeScript over JavaScript for all new projects" metadata={"category": "preference", "importance": 0.9}
Use when:
Delete a specific memory by ID.
text
memory_forget id=42
Use when:
With default configuration, the agent does NOT need to call tools manually for basic memory operations:
Before each conversation: The m0 plugin automatically searches for relevant memories based on the user's message and injects them as context. The agent sees them as <relevant-memories> in the prompt.
After each conversation: The m0 plugin automatically extracts key facts from the conversation and stores them. No manual memory_store needed for routine facts.
Manual tools are for explicit user requests ("remember this", "forget that", "what did I say about X?").
The m0 plugin tracks successful tool-use patterns and distills them into reusable experiences.
View the full description of a distilled experience.
text
experience_detail id=7
Experiences are automatically injected alongside memories when relevant. They help the agent avoid repeating mistakes and reuse proven approaches.
memory_store for high-importance items the user explicitly wants remembered.category (preference, decision, fact, deadline) and importance (0.0-1.0) to help with retrieval.memory_recall at the start of every conversation — the plugin already injects relevant context automatically.memory_forget immediately.If the m0 plugin is not yet installed, run the setup skill:
text
/openclaw-m0-setup
Or install manually:
bash
openclaw add m0
Then configure in ~/.openclaw/openclaw.json:
json
{
"plugins": {
"entries": {
"m0": {
"enabled": true,
"config": {
"apiKey": "ak_your_key_here",
"baseUrl": "https://your-endpoint",
"autoCapture": true,
"autoRecall": true,
"recallLimit": 10
}
}
}
}
}