feat: Add self-hosted MemOS server support#73
Open
ChaoXu1997 wants to merge 2 commits intoMemTensor:mainfrom
Open
feat: Add self-hosted MemOS server support#73ChaoXu1997 wants to merge 2 commits intoMemTensor:mainfrom
ChaoXu1997 wants to merge 2 commits intoMemTensor:mainfrom
Conversation
added 2 commits
March 22, 2026 19:33
- Changed kind from 'lifecycle' to 'memory' to be recognized as memory slot plugin - Added comments for self-hosted mode API key skip logic - Self-hosted MemOS servers don't require API key authentication This fixes the issue where the plugin was not recognized as a memory slot plugin by OpenClaw Gateway, preventing automatic memory write functionality.
- Auto-detect server mode (cloud/self-hosted) based on baseUrl - Skip API key check for self-hosted mode - Use /product/* endpoints for self-hosted servers - Support both cloud and self-hosted response formats - Backward compatible with existing cloud users Tested: search and add operations work correctly with self-hosted MemOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for self-hosted MemOS servers to the cloud plugin, enabling users to deploy their own MemOS API while still using this plugin.
Changes
1. Self-hosted Mode Detection (
lib/memos-cloud-api.js)/search/memory,/add/message/product/search,/product/add2. Plugin Kind Change (
index.js,openclaw.plugin.json)kindfrom "lifecycle" to "memory"3. API Key Skip Logic
if (!cfg.apiKey && cfg.serverMode !== "self-hosted")Configuration Example
{ "memos-cloud-openclaw-plugin": { "enabled": true, "config": { "baseUrl": "http://localhost:8000", "userId": "openclaw-user", "agentId": "moss-server", "multiAgentMode": true, "recallEnabled": true, "addEnabled": true, "timeoutMs": 30000 } } }Testing
Related