Skip to main content

Key differences

Installation

API mapping

Session management

Adding memories

Searching

Getting all memories

Migration steps

  1. Replace client initialization - Use Supermemory client instead of Zep
  2. Map sessions to namespaces - Replace session_id="user_123" with namespace: "user_123"
  3. Update method calls - Use add() and search() instead of memory.add() and memory.search()
  4. Change search parameter - Use query instead of text
  5. Handle async processing - Documents process asynchronously (status: queued → done)

Complete example

Important notes

  • No session creation needed - Just pass namespace on each call
  • Messages are documents - Store with metadata.role and metadata.type
  • Async processing - Documents may take a moment to be searchable. Pass dreaming: "instant" on add when you need memories right away
  • Response structure - search returns results, each with a memory or chunk and a similarity score

Migrating existing data

Quick migration (all-in-one)

Complete migration in one script:

Full migration script

For a complete migration script with error handling, verification, and progress tracking, copy this TypeScript script:

Resources