RESEARCH

Mem0

Hybrid vector + graph + KV memory layer.

Mem0: Hybrid Memory Layer for AI Agents

Mem0 is a memory layer that combines vector storage, knowledge graphs, and key-value stores to provide personalized AI experiences. It reported a 26% improvement over OpenAI's memory baseline on the LOCOMO benchmark.

Architecture

Mem0 uses a three-store hybrid approach:

  1. Vector Store - Embedding-based semantic search for fuzzy retrieval of facts and context.
  2. Graph Store - Knowledge graph (entities + relationships) for structured reasoning and multi-hop queries.
  3. Key-Value Store - Fast exact-match lookups for user preferences, settings, and frequently accessed facts.

All three stores are updated simultaneously on memory write, and queries fan out to all three for retrieval.

Memory Operations

  • Add: Extract facts from conversation, deduplicate against existing memories, store across all three backends.
  • Search: Query all three stores, merge and rank results, return top-k with provenance.
  • Update: When new information contradicts existing memory, update rather than append (conflict resolution).
  • Delete: Remove memories across all stores, with cascading graph cleanup.

Key Design Decisions

  • Automatic extraction: Mem0 uses an LLM to extract structured facts from conversations automatically.
  • Conflict resolution: When a new fact contradicts an existing one, the system updates rather than creating duplicates.
  • Multi-store consistency: All three stores are kept in sync on every write operation.
  • User/session/agent scoping: Memories can be scoped to different levels of granularity.

Benchmark Results

On the LOCOMO benchmark (long-context memory evaluation):

  • Mem0 achieved 26% higher scores than OpenAI's built-in memory
  • Graph-based retrieval was particularly effective for multi-hop reasoning questions
  • Vector search excelled at fuzzy/semantic matching
  • The hybrid approach consistently outperformed any single-store approach

Relevance to Memory Platform

Mem0's hybrid approach validates our design direction:

  • Our Postgres FTS + future pgvector covers the vector store role
  • The knowledge graph layer is a natural extension we could add
  • Their conflict resolution pattern (update vs. append) maps to our memory evolution system
  • The multi-scope design (user/org/project) aligns with our tenant model

References

  • Mem0 documentation and benchmarks
  • LOCOMO: Long-Context Memory benchmark
  • The hybrid retrieval pattern is becoming standard in production memory systems