This guide maps Mem0 concepts to their Spectron equivalents and walks through an incremental migration strategy that lets you run both systems in parallel during transition.
Concept mapping
| Mem0 concept | Spectron equivalent | Notes |
|---|---|---|
| User ID | Scope dimension user | Spectron scopes are multi-dimensional; user is one axis |
| Agent ID | Scope dimension agent | Combine with user for agent-per-user isolation |
| Run ID | Session | Spectron sessions are first-class records with richer metadata |
| Memory (flat string) | Entities + attributes + relations | Spectron extracts structured triples from text |
add() | session.remember() | Spectron also deduplicates and reconciles on write |
search() | session.recall() | Spectron adds graph-density reranking |
get_all() | session.profile() | Returns structured snapshot, not a flat list |
delete() | session.forget() | Spectron supports scoped bulk forget |
| History | Session turns + temporal attributes | Spectron tracks valid_from/valid_until on attributes |
SDK migration
Python
Mem0:
Spectron:
JavaScript
Mem0:
Spectron:
Key differences
Structured extraction: Mem0 stores memories as flat text strings. Spectron extracts structured entities, attributes, and relations. When you write "Alice prefers vegetarian food", Spectron creates an entity Person/alice with attribute food_preference = "vegetarian". Future writes that contradict this (e.g. "Alice now eats fish") update the attribute with a supersession chain, so you can see the history.
Conflict resolution: Mem0 stores new memories alongside old ones. Spectron detects when a new memory contradicts a stored attribute and automatically supersedes the old value. The old value is not deleted – it is marked as superseded with a timestamp.
Scoped multi-tenancy: Mem0 uses separate user_id and agent_id parameters. Spectron uses scope tags (for example org, user, agent). A query at {org: "acme"} can retrieve org-wide memory across users.
Authoritative versus experiential: Mem0 treats all memory uniformly. Spectron models eight pillars of agent memory; among them, Authoritative curated content (ingested documents, knowledge nodes) is distinct from Experiential conversational memory (turns and the six memory categories). Reconciliation gives Authoritative precedence when they conflict. See Eight pillars and six categories.
Incremental migration strategy
Step 1: run both systems in parallel
Wrap your memory calls in a thin adapter that writes to both Mem0 and Spectron:
Step 2: validate recall quality
Compare recall results between the two systems for a sample of production queries. Use the use_spectron=True flag on a percentage of traffic while monitoring for quality regressions.
Step 3: migrate existing memories
Export existing Mem0 memories and replay them into Spectron:
Spectron's reconciliation pipeline deduplicates on write, so replaying memories that contain the same facts will produce correct structured state rather than duplicates.
Step 4: cut over
Once recall quality is satisfactory, remove the dual-write and switch reads to Spectron only.
Session management difference
Mem0's add() takes a user_id directly – there is no concept of a session. Spectron requires a session as context for each turn. The nearest equivalent to Mem0's add() is:
If your application does not have natural session boundaries (e.g. it stores individual facts rather than conversations), create a short-lived session for each batch of writes and close it immediately.