The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.
Python agentic-memoryagentic-memory-systemagentsaiai-agentschatgptgenaillmlong-term-memorymemorymemory-managementpythonragstate-management
fix(openclaw): migrate platform search to mem0 v2 API (#4276)
Utkarsh7482c4869212
diff --git a/openclaw/CHANGELOG.md b/openclaw/CHANGELOG.mdnew file mode 100644index 000000000..55edccb25--- /dev/null+++ b/openclaw/CHANGELOG.md@@ -0,0 +1,33 @@+# Changelog++All notable changes to the `@mem0/openclaw-mem0` plugin will be documented in this file.++## [0.2.0] - 2026-03-09++### Added+- "Understanding userId" section in docs clarifying that `userId` is user-defined+- Per-agent memory isolation for multi-agent setups via `agentId`+- Regression tests for per-agent isolation helpers++### Changed+- Updated config examples to use concrete `userId` values instead of placeholders++### Fixed+- Migrated platform search to Mem0 v2 API++## [0.1.2] - 2026-02-19++### Added+- Source field for openclaw memory entries++### Fixed+- Auto-recall injection and auto-capture message drop++## [0.1.0] - 2026-02-02++### Added+- Initial release of the OpenClaw Mem0 plugin+- Platform mode (Mem0 Cloud) and open-source mode support+- Auto-recall: inject relevant memories before each turn+- Auto-capture: store facts after each turn+- Configurable `topK`, `threshold`, and `apiVersion` optionsdiff --git a/openclaw/index.ts b/openclaw/index.tsindex 74c9d4c2b..7fd1535a0 100644--- a/openclaw/index.ts+++ b/openclaw/index.ts@@ -165,13 +165,17 @@ class PlatformProvider implements Mem0Provider {async search(query: string, options: SearchOptions): Promise<MemoryItem[]> {await this.ensureClient();- const opts: Record<string, unknown> = { user_id: options.user_id };- if (options.run_id) opts.run_id = options.run_id;+ const filters: Record<string, unknown> = { user_id: options.user_id };+ if (options.run_id) filters.run_id = options.run_id;++ const opts: Record<string, unknown> = {+ api_version: "v2",+ filters,+ };if (options.top_k != null) opts.top_k = options.top_k;if (options.threshold != null) opts.threshold = options.threshold;if (options.keyword_search != null) opts.keyword_search = options.keyword_search;- if (options.reranking != null) opts.reranking = options.reranking;- if (options.source) opts.source = options.source;+ if (options.reranking != null) opts.rerank = options.reranking;const results = await this.client.search(query, opts);return normalizeSearchResults(results);diff --git a/openclaw/package.json b/openclaw/package.jsonindex 9ee6e9947..5639f1607 100644--- a/openclaw/package.json+++ b/openclaw/package.json@@ -1,6 +1,6 @@{"name": "@mem0/openclaw-mem0",- "version": "0.1.2",+ "version": "0.2.0","type": "module","description": "Mem0 memory backend for OpenClaw — platform or self-hosted open-source","license": "Apache-2.0",