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
| mem0 | Unison | |
|---|---|---|
| Memory model | Per-user flat memory store | Hierarchical paths with team/workspace/private scopes |
| Retrieval | search(query, user_id) | GET /v1/brain/context?q=&mode=auto |
| Temporal model | Latest fact wins | Bitemporal — old facts are retired, not deleted |
| Team memory | Not first-class | Native: /workspace/ and /workspace/teams/<slug>/ |
| Extraction | On add | Async extraction on conversation ingest |
| Data format | Key-value memories | Markdown 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.