Mem0 Config

v1.0.0

Install, configure, diagnose, and operate the openclaw-mem0 long-term memory plugin for OpenClaw agents. Use when the user wants to set up mem0 memory (platf...

0· 392·1 current·1 all-time
byCuong Pahm@nyrosveil
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The SKILL.md describes installing and configuring @mem0/openclaw-mem0 and the steps (plugin install, platform vs open-source mode, Ollama/Qdrant setup, config changes to openclaw.json, restarting the gateway) are coherent with that purpose. However the registry metadata claims no required env vars/credentials while the documentation shows a MEM0_API_KEY for platform mode and a userId—so the declared requirements do not fully match the documented runtime needs.
Instruction Scope
Instructions are concrete and stay on-topic: installing plugin, running brew/docker/ollama, checking local endpoints, editing openclaw.json, restarting the gateway, examining logs and DB file paths. They reference system files and service management (logs under ~/.openclaw, absolute historyDbPath, launchctl commands) which is expected for configuring an agent plugin but does require filesystem and service management actions by the operator.
Install Mechanism
This is an instruction-only skill (no install spec, no shipped code). That minimizes what the skill itself writes to disk. The instructions ask the operator to run external installers (brew, docker, ollama) and to install a plugin via `openclaw plugins install` — these are normal for this type of task.
!
Credentials
The registry lists no required env vars or primary credential, but SKILL.md shows a platform mode that requires MEM0_API_KEY (shown as ${MEM0_API_KEY}) and instructs including it in openclaw.json. This mismatch is material: a secret/API key is needed in at least one documented mode but is not declared by the skill metadata. No other unexpected credentials are requested, but the missing declaration reduces transparency and is a proportionality concern.
Persistence & Privilege
always: false and normal autonomous invocation settings. The skill's instructions involve editing openclaw.json and restarting the gateway — expected for plugin configuration. There is no instruction to modify other skills' configs or system-wide agent settings beyond the plugin's own config.
What to consider before installing
What to consider before installing: - The SKILL.md expects either a Mem0 API key (platform mode) or local services (Ollama + Qdrant) for open-source mode. The registry metadata does NOT declare the MEM0_API_KEY requirement — treat that as an omission and be prepared to supply a Mem0 API key if you choose platform mode. - This is an instruction-only skill: the skill bundle won't run code itself, but the instructions tell you to run commands that will install software, start services, and edit ~/.openclaw/openclaw.json. Only run those commands if you trust the plugin and the external software (mem0.ai, Ollama, Qdrant). - If you want to avoid sharing data with mem0.ai, use open-source mode with local Ollama and Qdrant, and ensure they are running on localhost. If using platform mode, understand that memories may be sent to Mem0's API under the provided API key. - Verify filesystem paths and permissions (historyDbPath must be an absolute, writable path or you'll hit SQLITE_CANTOPEN). The troubleshooting doc accurately warns about LaunchAgent working directories on macOS. - Because the skill source/homepage is listed as unknown and no package code is bundled for review, consider locating the actual @mem0/openclaw-mem0 package source (npm/github) and reviewing it before running `openclaw plugins install`. - Confidence is medium: the content is mostly coherent with the claimed purpose, but the undeclared MEM0_API_KEY and lack of provenance are notable gaps. Providing the declared env var requirement and a verifiable upstream homepage or package source would increase confidence.

Like a lobster shell, security has layers — review code before you run it.

latestvk97fg8kezqe7a3tbzffbtkmbas820kds
392downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

openclaw-mem0

Long-term memory plugin for OpenClaw agents, powered by Mem0. Extracts and injects memories automatically around each agent turn.

Installation

1. Install the plugin

openclaw plugins install @mem0/openclaw-mem0

This installs the plugin into ~/.openclaw/extensions/openclaw-mem0/ and adds it to openclaw.json.

2. Choose a mode and install dependencies

Platform mode — no local dependencies. Get an API key from app.mem0.ai and skip to Configuration.

Open-source mode — requires two local services:

# Ollama (embedder + LLM)
brew install ollama
ollama serve                        # or: brew services start ollama
ollama pull bge-m3:latest           # embedder (1024-dim)
ollama pull llama3.2                # LLM for memory extraction

# Qdrant (vector store)
docker run -d -p 6333:6333 qdrant/qdrant
# or: brew install qdrant && qdrant

Verify both are running:

curl -s http://localhost:11434/          # → "Ollama is running"
curl -s http://localhost:6333/health     # → {"status":"ok"}

3. Add to openclaw.json

Add under plugins.entries (see Configuration below).

4. Restart the gateway

openclaw gateway stop && openclaw gateway

Confirm the plugin loaded:

grep "openclaw-mem0: initialized" ~/.openclaw/logs/gateway.log | tail -1

Expected output: openclaw-mem0: initialized (mode: open-source, user: ..., autoRecall: true, autoCapture: true)


Modes

ModeConfigRequires
platformapiKey from app.mem0.aiInternet, Mem0 API key
open-sourceoss block (self-hosted)Ollama + Qdrant (or other providers)

Configuration

Minimal Config

Platform:

"openclaw-mem0": {
  "enabled": true,
  "config": { "mode": "platform", "apiKey": "${MEM0_API_KEY}", "userId": "your-id" }
}

Open-source:

"openclaw-mem0": {
  "enabled": true,
  "config": {
    "mode": "open-source",
    "userId": "your-id",
    "oss": {
      "embedder":    { "provider": "ollama", "config": { "model": "bge-m3:latest", "baseURL": "http://localhost:11434" } },
      "vectorStore": { "provider": "qdrant", "config": { "host": "localhost", "port": 6333, "collection": "memories", "dimension": 1024 } },
      "llm":         { "provider": "ollama", "config": { "model": "llama3.2", "baseURL": "http://localhost:11434" } },
      "historyDbPath": "/absolute/path/to/.openclaw/memory/history.db"
    }
  }
}

Always set historyDbPath to an absolute path. When openclaw runs as a LaunchAgent, process.cwd() is /, so the default relative "memory.db" resolves to /memory.db (unwritable on macOS), causing a SQLITE_CANTOPEN crash loop. See troubleshooting.md.

Key Config Options

KeyDefaultNotes
autoRecalltrueInject memories before each agent turn
autoCapturetrueStore memories after each agent turn
topK5Max memories injected per turn
searchThreshold0.5Min similarity score (0–1)
userId"default"Scope memories per user

CLI

openclaw mem0 stats                          # Total memories, mode, user
openclaw mem0 search "user's name"           # Semantic search
openclaw mem0 search "topic" --scope long-term   # long-term | session | all

Agent Tools

The plugin registers 5 tools for agents to call:

ToolDescription
memory_searchSemantic search (scope: session/long-term/all)
memory_listList all memories for a user
memory_storeExplicitly save a fact (longTerm: true by default)
memory_getFetch memory by ID
memory_forgetDelete by ID or query

Verifying It Works

# Check gateway log for injection events
grep "openclaw-mem0: inject" ~/.openclaw/logs/gateway.log | tail -5

# Confirm history DB created at configured path
ls -la /path/to/history.db

# No SQLITE errors since last gateway start
grep "SQLITE_CANTOPEN" ~/.openclaw/logs/gateway.err.log | tail -3

Troubleshooting

See references/troubleshooting.md for:

  • SQLITE_CANTOPEN crash loop (most common issue)
  • Qdrant / Ollama not reachable
  • Memories not being stored or recalled
  • Telegram allowFrom config warning

Comments

Loading comments...