Migrating from mem0

Key differences and migration steps for teams moving from mem0 to the Unison brain.

I'm using mem0. How different is Unison, and how do I migrate?

The core idea is the same — persistent memory for AI agents — but the model differs in a few important ways.

Key differences

mem0Unison
Memory modelPer-user flat memory storeHierarchical paths with team/workspace/private scopes
Retrievalsearch(query, user_id)GET /v1/brain/context?q=&mode=auto
Temporal modelLatest fact winsBitemporal — old facts are retired, not deleted
Team memoryNot first-classNative: /workspace/ and /workspace/teams/<slug>/
ExtractionOn addAsync extraction on conversation ingest
Data formatKey-value memoriesMarkdown pages + structured entity facts

Migration steps

1. Export your mem0 memories.

Use the mem0 SDK or API to dump all memories for each user to a local file or structured dict.

2. Provision a Unison account.

curl -X POST https://brain.unisonlabs.ai/v1/auth/provision \
  -H 'content-type: application/json' \
  -d '{"email": "you@example.com"}'

3. Write memories as Unison pages.

For each user, write their memories to their actor-scoped private path:

# For each user_id + memory pair:
curl -X PUT "https://brain.unisonlabs.ai/v1/brain/doc" \
  -H "Authorization: Bearer $UNISON_TOKEN" \
  -H "X-Unison-Actor: ${USER_ID}" \
  -H 'content-type: application/json' \
  -d "{\"path\": \"/private/migrated/${USER_ID}/${MEMORY_SLUG}.md\", \"bodyMd\": \"${MEMORY_TEXT}\", \"title\": \"${MEMORY_TITLE}\"}"

4. Update your recall calls.

Replace mem0.search(query, user_id=...) with:

GET /v1/brain/context?q={query}
# + header X-Unison-Actor: {user_id}

5. Update your add calls.

Replace mem0.add(messages, user_id=...) with:

POST /v1/brain/ingest
# + header X-Unison-Actor: {user_id}
# + body: {"items":[{"type":"conversation","turns":[...],"sourceRef":"...","visibility":"private"}]}

For a deeper comparison of capabilities, see the full mem0 comparison.

On this page