Install
openclaw skills install openclaw-memory-skillMongoDB-backed long-term semantic memory for recalling, storing, searching, and managing facts, decisions, and user preferences across sessions.
openclaw skills install openclaw-memory-skillMongoDB-backed long-term memory with Voyage AI semantic search
Use OpenClaw Memory when:
NOT for:
memory_searchSemantically search long-term memory. Use this to recall prior decisions, preferences, context, or facts.
memory_search({
query: "What did we decide about the database schema?",
maxResults: 6 // optional, default: 6
})
Returns: Array of memories with similarity scores, text, tags, and metadata.
When to use:
Example output:
{
"results": [
{
"id": "507f1f77bcf86cd799439011",
"text": "Decided to use MongoDB for vector storage with Atlas Search",
"score": 0.89,
"tags": ["decision", "database"],
"createdAt": "2026-02-20T14:30:00Z"
}
]
}
memory_rememberStore a fact, decision, preference, or important context in long-term memory.
memory_remember({
text: "User prefers TypeScript over JavaScript for new projects",
tags: ["preference", "programming"], // optional
ttl: 2592000 // optional, 30 days default
})
Returns: Stored memory ID and confirmation.
When to use:
Best practices:
memory_getRead a specific memory file from the workspace. Use memory_search for semantic recall; use this for targeted file reads.
memory_get({
path: "MEMORY.md",
from: 1, // optional, starting line
lines: 50 // optional, number of lines
})
Returns: File contents (text).
When to use:
memory_forgetDelete a specific memory by ID. Use memory_search first to find the memory ID.
memory_forget({
memoryId: "507f1f77bcf86cd799439011"
})
Returns: Confirmation or error.
When to use:
memory_listBrowse stored memories by recency or tag.
memory_list({
tags: "decision,database", // optional, comma-separated
limit: 10, // optional, default: 10
sort: "desc" // optional, "desc" or "asc"
})
Returns: Array of memories with metadata (no similarity scores).
When to use:
memory_statusCheck memory system health and stats.
memory_status()
Returns: Daemon status, MongoDB connection, Voyage AI status, total memories, uptime.
When to use:
Memory tools connect to a daemon at http://localhost:7654 by default. Configuration is set in ~/.openclaw/openclaw.json:
{
plugins: {
entries: {
"openclaw-memory": {
enabled: true,
config: {
daemonUrl: "http://localhost:7654",
agentId: "openclaw",
maxResults: 6,
minScore: 0.5,
defaultTtl: 2592000 // 30 days
}
}
}
}
}
OpenClaw Memory includes lifecycle hooks that capture memories automatically:
auto-remember HookFires after every agent response. Extracts facts, decisions, and preferences using pattern matching:
Limits: Max 5 extractions per message, min 10 chars, deduplicates.
session-to-memory HookFires when starting a new session. Summarizes the ending session and stores it as a searchable memory.
memory-bootstrap HookFires on agent startup. Queries for relevant memories (preferences, recent decisions, pinned items) and injects them into context.
memory-enriched-tools HookFires before tool results are saved. Appends related memories as context annotations to Read/Grep/Glob/Bash outputs.
To disable hooks: Set hooksEnabled: false in plugin config.
User asks: "What did we decide about the API authentication?"
Agent response:
memory_search({ query: "API authentication decision" })User says: "I prefer Material UI over Tailwind for all React projects"
Agent response:
memory_remember({ text: "User prefers Material UI over Tailwind for React projects", tags: ["preference", "ui"] })User asks: "What CSS framework should we use?"
Agent response:
memory_search({ query: "CSS framework preference" })New session starts:
memory-bootstrap hook auto-runsDo:
memory_search before answering questions about past workpreference, decision, fact, project-name)Don't:
memory_forget sparingly)memory_remember calls (hooks handle most)Search Tips:
minScore: 0.5 filters low-relevance resultsTTL Guidelines:
"Memory daemon not reachable"
curl http://localhost:7654/healthcd openclaw-memory && pnpm dev:daemondocker compose up -d"No memories found"
memory_list({ limit: 5 })openclaw by default)minScore threshold in config"Memory search returns irrelevant results"
minScore threshold (default: 0.5)"Tools not available"
openclaw.jsonopenclaw plugins listFull installation includes a web dashboard at http://localhost:3002:
9-stage processing pipeline for:
Trigger reflection:
curl -X POST http://localhost:7654/reflect \
-H "Content-Type: application/json" \
-d '{"agentId":"openclaw"}'
Memories can be connected via edges:
SUPPORTS — reinforces/supports another memoryCONTRADICTS — conflicts with another memoryDERIVES_FROM — built upon another memoryCO_OCCURS — frequently appears togetherPRECEDES — temporal sequenceMENTIONS_ENTITY — references an entityAccess via web dashboard at /graph.
# Install plugin
openclaw plugins install openclaw-memory
# Start daemon
cd openclaw-memory
pnpm install && pnpm dev:daemon
# Or use Docker
docker compose up -d
OpenClaw Memory gives agents persistent, searchable memory across sessions:
memory_searchmemory_rememberUse it to build agents that remember, learn, and improve over time. 🧠
Version: 0.2.1
Author: Michael Lynn
License: MIT
Repository: https://github.com/mrlynn/openclaw-mongodb-memory