首页openclaw插件 › Mem0 Plugin — 插件工具

代码插件 扫描中

Mem0 Plugin — 插件工具

v1.0.6

Mem0 memory backend for OpenClaw — platform or self-hosted open-source

0· 5·0 当前
by @kartik-mem0·ClawHub
下载插件包 项目主页
License
ClawHub
最后更新
2026/4/12
安全扫描
VirusTotal
Pending
查看报告
OpenClaw
扫描中
medium confidence
The plugin appears to implement the advertised Mem0 memory backend, but there are mismatches between the declared metadata and the runtime needs (API keys, local DB), plus prompt-injection scanner hits and packaged data that warrant caution before installing.
安全有层次,运行前请审查代码。

License

ClawHub

请查看许可证条款了解详情。

版本

latestv1.0.62026/4/6
● Pending

安装命令 点击复制

官方npx clawhub@latest install @mem0/openclaw-mem0
镜像加速npx clawhub@latest install @mem0/openclaw-mem0 --registry https://cn.clawhub-mirror.com

插件文档

@mem0/openclaw-mem0

Long-term memory for OpenClaw agents, powered by Mem0.

Your agent forgets everything between sessions. This plugin fixes that — it watches conversations, extracts what matters, and brings it back when relevant. Automatically.

Quick Start

openclaw plugins install @mem0/openclaw-mem0

Platform (Mem0 Cloud)

Get an API key from app.mem0.ai:

openclaw mem0 init --api-key <your-key> --user-id <your-user-id>

Or configure manually in openclaw.json:

"openclaw-mem0": {
  "enabled": true,
  "config": {
    "apiKey": "${MEM0_API_KEY}",
    "userId": "alice"
  }
}

Open-Source (Self-hosted)

No Mem0 key needed. Requires OPENAI_API_KEY for default embeddings and LLM. Vectors are stored locally in SQLite at ~/.mem0/vector_store.db — no external database required.

Defaults: text-embedding-3-small for embeddings, gpt-5.4 for fact extraction.

"openclaw-mem0": {
  "enabled": true,
  "config": {
    "mode": "open-source",
    "userId": "alice"
  }
}

Customize the embedder, vector store, or LLM via the oss block:

"config": {
  "mode": "open-source",
  "userId": "alice",
  "oss": {
    "embedder": { "provider": "openai", "config": { "model": "text-embedding-3-small" } },
    "vectorStore": { "provider": "qdrant", "config": { "host": "localhost", "port": 6333 } },
    "llm": { "provider": "openai", "config": { "model": "gpt-5.4" } }
  }
}

All oss fields are optional. See the Mem0 OSS docs for supported providers.

How It Works

<p align="center"> <img src="https://raw.githubusercontent.com/mem0ai/mem0/main/docs/images/openclaw-architecture.png"; alt="Architecture" width="800" /> </p>

Auto-Recall — Before the agent responds, the plugin searches Mem0 for relevant memories and injects them into context.

Auto-Capture — After the agent responds, the conversation is filtered through a noise-removal pipeline and sent to Mem0. New facts get stored, stale ones updated, duplicates merged.

Both run silently. No prompting, no manual calls required.

Memory Scopes

    • Session (short-term) — Scoped to the current conversation via run_id. Recalled alongside long-term memories.
    • User (long-term) — Persistent across all sessions. Default for memory_add.

Multi-Agent Isolation

Each agent gets its own memory namespace automatically via session key routing (agent:<name>:<uuid> maps to userId:agent:<name>). Single-agent setups are unaffected.

Agent Tools

Eight tools are registered for agent use:

ToolDescription
memory_searchSearch by natural language query. Supports scope (session, long-term, all), categories, filters, and agentId.
memory_addStore facts. Accepts text or facts array, category, importance, longTerm, metadata.
memory_getRetrieve a single memory by ID.
memory_listList all memories. Filter by userId, agentId, scope.
memory_updateUpdate a memory's text in place. Preserves history.
memory_deleteDelete by memoryId, query (search-and-delete), or all: true (requires confirm: true).
memory_event_listList recent background processing events. Platform mode only.
memory_event_statusGet status of a specific event by ID. Platform mode only.

CLI

All commands: openclaw mem0 <command>.

# Memory operations
openclaw mem0 add "User prefers TypeScript over JavaScript"
openclaw mem0 search "what languages does the user know"
openclaw mem0 search "preferences" --scope long-term
openclaw mem0 get <memory_id>
openclaw mem0 list --user-id alice --top-k 20
openclaw mem0 update <memory_id> "Updated preference text"
openclaw mem0 delete <memory_id>
openclaw mem0 delete --all --user-id alice --confirm
openclaw mem0 import memories.json

# Management
openclaw mem0 init
openclaw mem0 init --api-key <key> --user-id alice
openclaw mem0 status
openclaw mem0 config show
openclaw mem0 config get api_key
openclaw mem0 config set user_id alice

# Events (platform only)
openclaw mem0 event list
openclaw mem0 event status <event_id>

# Memory consolidation
openclaw mem0 dream
openclaw mem0 dream --dry-run

Configuration Reference

General

KeyTypeDefaultDescription
mode"platform" \"open-source""platform"Backend mode
userIdstringOS usernameUser identifier. All memories scoped to this value.
autoRecallbooleantrueInject relevant memories before each turn
autoCapturebooleantrueExtract and store facts after each turn
topKnumber5Max memories returned per recall
searchThresholdnumber0.5Minimum similarity score (0-1)

Platform Mode

KeyTypeDefaultDescription
apiKeystringRequired. Mem0 API key (supports ${MEM0_API_KEY})
customInstructionsstring(built-in)Custom extraction rules
customCategoriesobject(12 defaults)Category name to description map

Open-Source Mode

All fields optional. Defaults: text-embedding-3-small embeddings, local SQLite vector store (~/.mem0/vector_store.db), gpt-5.4 LLM.

KeyTypeDefaultDescription
customPromptstring(built-in)Extraction prompt
oss.embedder.providerstring"openai"Embedding provider
oss.embedder.configobjectProvider config (apiKey, model, baseURL)
oss.vectorStore.providerstring"memory"Vector store provider (see list above)
oss.vectorStore.configobjectProvider config (host, port, collectionName, dbPath)
oss.llm.providerstring"openai"LLM provider
oss.llm.configobjectProvider config (apiKey, model, baseURL)
oss.historyDbPathstringSQLite path for edit history

License

Apache 2.0

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务