Official lifecycle plugin for OpenClaw/Moltbot/ClawDBot that provides cross-session long-term memory for Agents via MemOS Cloud.
MemOS Cloud OpenClaw Plugin is an official plugin maintained by the MemTensor (OpenMem) organization, designed for OpenClaw, Moltbot, and ClawDBot Agent frameworks to inject long-term memory capabilities into Agent systems.
The plugin operates through lifecycle hooks: at the before_agent_start stage, it automatically calls the MemOS Cloud memory search API to perform semantic search based on the user prompt, injecting relevant memories into the Agent context as <memories> blocks; at the agent_end stage, it asynchronously writes the current turn's dialogue to MemOS Cloud for continuous memory accumulation.
Key Features#
Memory Recall: Supports global memory search (cross-session recall without conversation_id), configurable recall count (memoryLimitNumber) and relevance threshold (relativity).
Memory Write: Supports asynchronous writes (enabled by default, non-blocking), two capture strategies (last_turn / full_session), and custom tags on write.
Model-based Recall Filtering: Optionally sends recall candidates to a self-hosted OpenAI-compatible model (e.g., Ollama qwen2.5:7b) for secondary relevance filtering.
Multi-Agent Support: Data isolation via multiAgentMode + agent_id, with allowedAgents whitelist and agentOverrides for per-Agent configuration overrides.
Knowledge Base Enhancement: Binds global knowledge base IDs (comma-separated) for domain knowledge augmentation during retrieval.
Operations: Built-in Config UI auto-starts on gateway launch (default http://127.0.0.1:38463) for visual configuration editing.
According to official claims, intelligent memory retrieval can reduce token usage by approximately 72% compared to loading full chat history.
Installation#
Prerequisites: Node.js runtime; OpenClaw / Moltbot / ClawDBot gateway; MemOS Cloud API Key.
NPM Install (recommended):
openclaw plugins install @memtensor/memos-cloud-openclaw-plugin@latest
openclaw gateway restart
Manual Install (Windows workaround): Download .tgz from NPM, extract to local extension directory, configure load.paths in openclaw.json.
Get API Key: Register at MemOS Dashboard and copy the key.
Minimal config (~/.openclaw/.env):
MEMOS_API_KEY="mpg-..."
Key Configuration#
| Config | Description | Default |
|---|---|---|
MEMOS_API_KEY | Required, MemOS Cloud Token | — |
MEMOS_BASE_URL | API base URL | https://memos.memtensor.cn/api/openmem/v1 |
MEMOS_USER_ID | User identifier | openclaw-user |
MEMOS_KNOWLEDGEBASE_IDS | Global knowledge base IDs (comma-separated) | Empty |
MEMOS_RECALL_GLOBAL | Global search | true |
MEMOS_MULTI_AGENT_MODE | Multi-Agent isolation | false |
MEMOS_ALLOWED_AGENTS | Agent whitelist | Empty (all enabled) |
MEMOS_RECALL_FILTER_ENABLED | Model-based recall filtering | false |
MEMOS_RECALL_FILTER_BASE_URL | Filter model endpoint | http://127.0.0.1:11434/v1 |
MEMOS_ASYNC_MODE | Async writes | true |
MEMOS_CAPTURE_STRATEGY | Capture strategy | last_turn |
MEMOS_TAGS | Tags on write | openclaw |
Config priority: plugin config → env files (~/.openclaw/.env → ~/.moltbot/.env → ~/.clawdbot/.env).
Architecture#
- Entry file
index.js, core logic inlib/directory - Three framework adapter descriptors:
openclaw.plugin.json/moltbot.plugin.json/clawdbot.plugin.json - Recall results injected via
appendSystemContextfor stable protocol,<memories>blocks inprependContext - Authentication: Token Auth (
Authorization: Token <MEMOS_API_KEY>) - External APIs:
POST /search/memory(recall),POST /add/message(write)
Ecosystem#
- Parent project: MemOS — AI Memory OS with unified memory API, multimodal memory, knowledge base management
- Organization: MemTensor (OpenMem)
- Host frameworks: OpenClaw, Moltbot, ClawDBot
- Recall Filter dependency: User self-hosted OpenAI-compatible models
Unconfirmed Information#
- MemOS Cloud pricing and SLA not documented; Dashboard page not directly verifiable
- Recall Filter model performance requirements unspecified (only
qwen2.5:7bexample given) - Whether Cloud Plugin and Local Plugin can coexist is unclear
memos.memtensor.cndomain suggests China mainland node; other regional endpoints unconfirmed- Difference between
appendSystemContextandprependContextinjection methods not detailed - Full
agentOverridesconfiguration schema not provided