How to Migrate from Mem0 to REM Labs

Mem0 is a solid developer tool. But if you need higher recall accuracy, multi-signal retrieval beyond vector search, or features like Memory Synthesis -- it is time to switch. This guide covers the one-command migration, what gets transferred, and why the benchmark numbers matter.

The Benchmark Case

LongMemEval (ICLR 2025) is the standard benchmark for long-term AI memory systems. It tests 500 questions across six categories: single-session recall, preference extraction, knowledge updates, temporal reasoning, and multi-session synthesis. Here is how the two systems compare:

SystemLongMemEval ScoreQuestions Correct
REM Labs90%450 / 500
Mem066.9%~335 / 500
ChatGPT Memory52.9%~265 / 500

The 30-point gap is not about fine-tuning or parameter optimization. It is an architectural difference. Mem0 uses vector-only retrieval -- embeddings and cosine similarity. REM Labs runs four retrieval paths in parallel (vector, full-text, entity graph, structured metadata), fuses the results, and applies neural reranking. The full technical breakdown is in our LongMemEval deep dive.

Step 1: Get a REM Labs API Key

Sign up at remlabs.ai/console or run:

npx @remlabs/memory

This gives you an API key on the free tier. You can migrate and test before committing to a paid plan.

Step 2: Run the Migration

One command exports all memories from your Mem0 account and imports them into REM Labs:

rem migrate --from=mem0 --api-key=YOUR_MEM0_KEY

The migration tool handles both v1 and v2 Mem0 schemas automatically. For all available options, run rem migrate --help.

What Gets Migrated

What Gets Added

After migration, your memories are re-indexed with REM's full retrieval stack. Each memory gains:

Step 3: Update Your Code

Python

# Before (Mem0) from mem0 import Memory m = Memory() m.add("User prefers dark mode", user_id="alice") results = m.search("preferences", user_id="alice") # After (REM Labs) from remlabs import RemMemory mem = RemMemory(api_key="sk-slop-...") mem.set("user_pref", "User prefers dark mode", namespace="alice") results = mem.search("preferences", namespace="alice", limit=5)

Node.js

// Before (Mem0) import MemoryClient from 'mem0ai'; const client = new MemoryClient({ apiKey: '...' }); await client.add([{role:'user', content:'Prefers dark mode'}], {user_id:'alice'}); // After (REM Labs) import { RemMemory } from '@remlabs/memory'; const mem = new RemMemory({ apiKey: 'sk-slop-...' }); await mem.set('user_pref', 'User prefers dark mode', { namespace: 'alice' }); const results = await mem.search('preferences', { namespace: 'alice', limit: 5 });

Step 4: Verify

After migration, confirm your memories transferred correctly:

# Search for a known memory curl -X POST https://api.remlabs.ai/v1/memory-search \ -H "Authorization: Bearer sk-slop-..." \ -H "Content-Type: application/json" \ -d '{"query":"dark mode preference","namespace":"alice","limit":5}'

Non-Destructive by Default

The migration is non-destructive. Your data in Mem0 is never modified or deleted. You can run both systems in parallel during a transition period, routing reads to REM Labs while keeping Mem0 as a fallback.

Migration source code: The migration tool is open source. Review the implementation at github.com/remlabs/agent-apis.

Why Switch

Beyond the benchmark numbers, here is what you gain:

Migrate in one command

Non-destructive. Full metadata preserved. 90% recall accuracy.

Get started free →