跳至主要内容
小龙虾小龙虾AI
🤖

Openclaw Mem0

Adds intelligent long-term memory to agents for auto-capturing, recalling, and managing user facts and preferences across sessions.

下载778
星标4
版本1.0.2
效率工具
安全通过
💬Prompt

技能说明

OpenClaw Mem0 Plugin

Mem0 integration for OpenClaw. Adds intelligent long-term memory to your agents, allowing them to remember user preferences, facts, and past conversations automatically.

When to use

  • You want your agent to remember user details (name, job, preferences) across sessions
  • You need "infinite context" by retrieving relevant past interactions
  • You want to build a personalized assistant that learns over time
  • You need both cloud (managed) and self-hosted (local) memory options

Setup

Platform Mode (Recommended)

  1. Get a free API key at mem0.ai
  2. Add to your OpenClaw config:
{
  "plugins": {
    "entries": {
      "openclaw-mem0": {
        "enabled": true,
        "config": {
          "mode": "platform",
          "apiKey": "your-mem0-api-key",
          "userId": "default-user"
        }
      }
    }
  }
}

Open-Source Mode (Self-Hosted)

Connect to your own Mem0 instance (requires mem0ai package installed):

{
  "plugins": {
    "entries": {
      "openclaw-mem0": {
        "enabled": true,
        "config": {
          "mode": "open-source",
          "oss": {
            "vectorStore": {
              "provider": "chroma",
              "config": {
                "collectionName": "memories",
                "path": "./chroma_db"
              }
            }
          }
        }
      }
    }
  }
}

Usage

This plugin works automatically (Zero-Shot) but also provides manual tools.

Automatic Features

  • Auto-Recall: Before every agent turn, it searches memory for relevant context and injects it into the system prompt.
  • Auto-Capture: After every agent turn, it analyzes the conversation and stores key facts into memory.

Manual Tools

The agent can proactively call these tools:

ToolDescriptionParameters
memory_storeExplicitly save a facttext (string), longTerm (bool)
memory_searchSearch memoriesquery (string), scope ("session"|"long-term")
memory_getGet memory by IDmemoryId (string)
memory_listList all memoriesuserId (string)
memory_forgetDelete a memorymemoryId (string) or query (string)

Example

User: "I'm moving to Tokyo next month." Agent automatically captures this fact.

(Two weeks later) User: "What's a good restaurant for my farewell dinner?" Agent automatically recalls "User is moving to Tokyo" and suggests a restaurant in their current city.

Plugin structure

openclaw-mem0/
  package.json            # NPM package config (@xray2016/openclaw-mem0)
  index.ts                # Plugin implementation & tools
  lib/                    # Internal Mem0 client implementation
  SKILL.md                # This file
  README.md               # Detailed documentation

Author

Maintained by @xRay2016. Modified from the original Mem0 OpenClaw integration.

如何使用「Openclaw Mem0」?

  1. 打开小龙虾AI(Web 或 iOS App)
  2. 点击上方「立即使用」按钮,或在对话框中输入任务描述
  3. 小龙虾AI 会自动匹配并调用「Openclaw Mem0」技能完成任务
  4. 结果即时呈现,支持继续对话优化

相关技能