Getting Started

Use in Agents

Connect MemOS to Agent workflows through plugins, MCP, and APIs.

In addition to calling the cloud APIs directly, you can connect MemOS to your AI workflow through plugins, MCP, and other integration methods if you use:

  • Agent frameworks such as OpenClaw and Hermes.
  • AI clients such as Cursor, VS Code, Claude Desktop, Cline, and Chatbox.

These integration methods help you save tokens while adding long-term memory to your Agent workflows.


1. Before You Start


2. Use the Plugin

MemOS currently provides a cloud plugin deeply integrated with OpenClaw. If you use OpenClaw, prefer the plugin integration.

Configure the API Key

The plugin reads OpenClaw-related environment variables or .env files. The minimal configuration is:

MEMOS_API_KEY=YOUR_API_KEY

You can also write it directly into the OpenClaw environment file:

mkdir -p ~/.openclaw
echo 'MEMOS_API_KEY=YOUR_API_KEY' >> ~/.openclaw/.env

Install and enable the plugin

openclaw plugins install @memtensor/memos-cloud-openclaw-plugin@latest
openclaw gateway restart

Confirm that the plugin is enabled in ~/.openclaw/openclaw.json:

{
  "plugins": {
    "entries": {
      "memos-cloud-openclaw-plugin": { "enabled": true }
    }
  }
}

Start chatting

You can now have multi-turn conversations with OpenClaw:

  • First session: "I prefer using Python."
  • Second session after restart: "Do you remember which programming language I like?"
The OpenClaw plugin also supports multi-Agent isolation, Config UI, filters, and more detailed configuration. See the OpenClaw Cloud Plugin for full configuration.

3. Use MCP

Mainstream clients that support MCP include Cursor, Claude Desktop, Cline, VS Code / Trae, and Chatbox. Taking Cursor as an example, after configuration, Cursor can directly call MemOS memory tools and use memory across clients.

Add an MCP Server

In Cursor, go to:

Cursor Settings → Tools & MCP → Add Custom MCP

Then add this to mcp.json:

{
  "mcpServers": {
    "memos-api-mcp": {
      "timeout": 60,
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@memtensor/memos-api-mcp@latest"
      ],
      "env": {
        "MEMOS_API_KEY": "YOUR_API_KEY",
        "MEMOS_USER_ID": "your-user-id",
        "MEMOS_CHANNEL": "MODELSCOPE"
      }
    }
  }
}

After configuration, confirm that Cursor's MCP tool list shows tools such as add_message and search_memory.

Cursor Rules

To make Cursor use memories more reliably, add rules like these to User Rules:

Before answering the user's question, call MemOS search_memory to search long-term memories related to the current task.
After answering, if this turn contains new user facts, preferences, project background, or other information useful in the long term, call add_message to write it into MemOS.
Only use memories relevant to the current task. Ignore memories that are irrelevant, outdated, or about the wrong subject.
Do not expose internal implementation details such as "memory store" or "retrieval results" to the user.

Start chatting

  • First session: tell it who you are, your hobbies, and your profession, and ask it to remember.
  • Second session after restart: ask it who you are.
Claude Desktop, Cline, Chatbox, and other clients are configured similarly, though the entry points differ. For more examples, see the MCP Guide.

Which Integration Should You Choose?

IntegrationBest forPriority
PluginOpenClaw and other Agent environments deeply integrated with MemOSPrefer first; highest automation
MCPCursor, Claude Desktop, Cline, Chatbox, and other AI clientsUse when the client supports MCP
API / SDKSelf-built Agents, chatbots, or business applicationsMost control; best for production integration

Next Steps

OpenClaw Cloud Plugin

View full installation, enabling, and advanced configuration for the OpenClaw plugin

MCP Guide

Learn how to configure MCP in Cursor, Claude Desktop, Cline, and other clients

API / SDK

Start here if you are building your own Agent or application