Skip to content

API Endpoints Mismatch: Self-hosted MemOS Server uses /product/* instead of /search/memory and /add/message #71

@ChaoXu1997

Description

@ChaoXu1997

Problem Description

The plugin expects standard MemOS API endpoints (/search/memory and /add/message), but self-hosted MemOS Server (v1.0.1) only provides product-specific endpoints (/product/search and /product/add).

Related to #6 and #25

Environment

Plugin Version: 0.1.9
MemOS Server Version: 1.0.1
OpenClaw Version: 2026.3.13
Deployment: Self-hosted via SSH tunnel (localhost:8001)

Test Results

1. Plugin Expected Endpoints (NOT Working)

POST /search/memory  → 404 Not Found ❌
POST /add/message    → 404 Not Found ❌

2. Server Actual Endpoints (Working)

POST /product/search  → 200 OK ✅
POST /product/add     → 200 OK ✅

3. Server API Documentation

{
  "info": {
    "title": "MemOS Server REST APIs",
    "version": "1.0.1"
  },
  "paths": [
    "/product/search",
    "/product/add",
    "/product/get_memory",
    "/product/delete_memory",
    "/product/chat/complete",
    "/product/scheduler/allstatus",
    "... (all endpoints start with /product/)"
  ]
}

4. Plugin Configuration

{
  "plugins": {
    "entries": {
      "memos-cloud-openclaw-plugin": {
        "enabled": true,
        "config": {
          "baseUrl": "http://localhost:8001",
          "userId": "openclaw-user",
          "agentId": "local-pc"
        }
      }
    }
  }
}

Root Cause

The plugin code hardcodes standard endpoints:

// memos-cloud-api.js
export async function searchMemory(cfg, payload) {
  return callApi(cfg, "/search/memory", payload);  // 404 on self-hosted
}

export async function addMessage(cfg, payload) {
  return callApi(cfg, "/add/message", payload);  // 404 on self-hosted
}

But self-hosted MemOS Server uses a different API structure with /product/* prefix.

Impact

  • Memory recall is skipped (plugin receives 404)
  • Memory add is skipped (plugin receives 404)
  • No error is shown to user (silent failure)
  • Plugin is completely non-functional with self-hosted MemOS

Proposed Solutions

Option 1: Add endpoint configuration

Allow users to configure custom endpoints in plugin config:

{
  "endpoints": {
    "search": "/product/search",
    "add": "/product/add"
  }
}

Option 2: Server-side compatibility layer

Document how to add standard endpoint aliases in self-hosted MemOS Server:

@app.route('/search/memory', methods=['POST'])
def search_memory_standard():
    return handle_product_search()

Option 3: Auto-detect and adapt

Plugin could try standard endpoints first, fall back to /product/* if 404.

Additional Context

Questions

  1. Is self-hosted MemOS Server v1.0.1 an official release?
  2. What API version should self-hosted deployments use?
  3. Can the plugin support both endpoint formats?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions