This is a OpenClaw plugin that integrates with Mem0 to provide intelligent long-term memory capabilities for your agents.
- Auto-Recall: Automatically searches for relevant past interactions and injects them into the context before the agent starts (
before_agent_start). - Auto-Capture: Automatically analyzes conversation turns and stores key information into long-term memory after the agent finishes (
agent_end). - Hybrid Scope: Supports both Session Memory (short-term, current conversation) and User Memory (long-term, cross-conversation).
- Dual Mode: Supports both Mem0 Platform (Cloud) and Open-Source (Self-hosted) backends.
- Tools: Provides 5 powerful tools for agents to interact with memory manually:
memory_search: Search for specific information.memory_store: Explicitly save important facts.memory_get: Retrieve a specific memory by ID.memory_list: List all memories for a user.memory_forget: Delete specific or matching memories (GDPR compliant).
Install via OpenClaw CLI (npm registry):
openclaw plugins install @xray2016/openclaw-mem0-pluginYou can configure the plugin in your ~/.openclaw/openclaw.json, the apikey and host can get from the platform.
Use the managed Mem0 Cloud service.
// plugins.entries
"openclaw-mem0-plugin": {
"enabled": true,
"config": {
"mode": "platform",
"apiKey": "your-mem0-api-key",
"userId": "openclaw-user",
"host": "mem0-platform-host"
}
}Just enable the plugin. When you chat with your agent:
- It will automatically "remember" facts you shared in previous conversations.
- It will "recall" relevant context when you ask related questions.
Your agents can proactively use tools:
-
User: "Please remember that I'm allergic to peanuts."
-
Agent: Calls
memory_store({ text: "User is allergic to peanuts", longTerm: true }) -
User: "What was that book I mentioned last week?"
-
Agent: Calls
memory_search({ query: "book mentioned last week", scope: "long-term" })
This plugin extends the OpenClaw CLI with memory management commands:
# Search memories
openclaw mem0 search "hobbies"
# Show memory statistics
openclaw mem0 statsThis project is modified from mem0/openclaw.
Apache License Version 2.0