@tensakulabs/openclaw-mem0
v1.0.5
Published
Long-term memory plugin for OpenClaw agents, powered by Mem0
Readme
openclaw-mem0
Long-term memory plugin for OpenClaw agents, powered by Mem0.
Supports both the Mem0 cloud platform and self-hosted open-source deployments using any OpenAI-compatible provider (OpenRouter, DashScope, LocalAI, etc).
Features
- 5 memory tools —
memory_search,memory_store,memory_list,memory_get,memory_forget - Session + long-term scopes — short-term (session) and long-term (user) memory
- Auto-recall — injects relevant memories before each agent turn
- Auto-capture — stores key facts after each agent turn
- Dual mode — Mem0 platform (cloud) or open-source (self-hosted)
- Provider-agnostic — works with OpenRouter, DashScope, LocalAI, or any OpenAI-compatible API
- Lazy provider loading — only loads the SDKs you actually use, no bloated installs
Install
openclaw plugins install github:tensakulabs/openclaw-mem0Configuration
Add to your openclaw.json:
Platform mode (Mem0 cloud)
{
"plugins": {
"entries": {
"openclaw-mem0": {
"config": {
"mode": "platform",
"apiKey": "${MEM0_API_KEY}",
"userId": "default",
"autoCapture": true,
"autoRecall": true
}
}
}
}
}Open-source mode (self-hosted)
{
"plugins": {
"entries": {
"openclaw-mem0": {
"config": {
"mode": "open-source",
"userId": "default",
"autoCapture": true,
"autoRecall": true,
"oss": {
"embedder": {
"provider": "openai",
"config": {
"apiKey": "${OPENROUTER_API_KEY}",
"baseURL": "https://openrouter.ai/api/v1",
"model": "openai/text-embedding-3-small"
}
},
"vectorStore": {
"provider": "qdrant",
"config": {
"host": "localhost",
"port": 6333,
"collectionName": "memories"
}
},
"llm": {
"provider": "openai",
"config": {
"apiKey": "${OPENROUTER_API_KEY}",
"baseURL": "https://openrouter.ai/api/v1",
"model": "openai/gpt-4o-mini"
}
}
}
}
}
}
}
}What's different from the official plugin
The official @mem0/openclaw-mem0 has several issues that break self-hosted deployments:
- Auto-recall silently discards memories — wrong property name in the hook return (mem0ai/mem0#4037)
- Embeddings ignore your
baseURL— always hitsapi.openai.cominstead of your configured provider (mem0ai/mem0#4040) - Missing provider SDKs crash at startup —
mem0aieagerly imports 17 provider SDKs regardless of which you use - Qdrant version warnings — noisy compatibility warnings with newer Qdrant servers
This plugin fixes all of these. It vendors a patched build of the mem0 OSS module with lazy dynamic imports — only the SDKs you actually configure get loaded.
License
Apache-2.0
