Skip to content

feat: add Mem0 memory provider support and update docs#227

Open
kartik-mem0 wants to merge 1 commit into666ghj:mainfrom
kartik-mem0:feat/mem0-integration
Open

feat: add Mem0 memory provider support and update docs#227
kartik-mem0 wants to merge 1 commit into666ghj:mainfrom
kartik-mem0:feat/mem0-integration

Conversation

@kartik-mem0
Copy link

Adds Mem0 as an optional memory backend alongside the existing Zep Cloud integration. Users choose via MEMORY_PROVIDER env var (zep default, mem0 optional). Supports both Mem0 Platform (SaaS) and
Mem0 OSS (self-hosted). Zero breaking changes — all existing Zep behavior is untouched.

How it works

MEMORY_PROVIDER=zep (default) → existing Zep services, no change
MEMORY_PROVIDER=mem0 → Mem0 backend (Platform or OSS)

A thin MemoryProvider interface sits between API routes and the backend. ZepProvider delegates to existing Zep services (pure delegation, no behavior change). Mem0Provider implements the same
interface using mem0ai SDK.

Existing Zep service files (graph_builder.py, zep_entity_reader.py, zep_tools.py, zep_graph_memory_updater.py) are completely untouched.

Setup for Mem0

pip install mem0ai # only needed if using Mem0

Platform (managed)
MEMORY_PROVIDER=mem0
MEM0_API_KEY=your_key

OR OSS (self-hosted)
MEMORY_PROVIDER=mem0
OPENAI_API_KEY=your_key

Test plan

  • MEMORY_PROVIDER=zep (default) — full pipeline works unchanged
  • MEMORY_PROVIDER=mem0 + MEM0_API_KEY — Platform mode works
  • MEMORY_PROVIDER=mem0 + OPENAI_API_KEY — OSS mode works
  • No mem0ai installed + MEMORY_PROVIDER=zep — works fine (mem0ai is optional)

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. documentation Improvements or additions to documentation enhancement New feature or request Memory Layer Any questions related to RAG, GraphRAG and LLM Memory. labels Mar 17, 2026
@kartik-mem0 kartik-mem0 force-pushed the feat/mem0-integration branch from 44d0a4a to da3528e Compare March 17, 2026 12:27
Adds Mem0 as an optional memory backend alongside the existing Zep Cloud
integration. Users choose via MEMORY_PROVIDER env var (zep default, mem0
optional). Supports both Mem0 Platform (SaaS) and Mem0 OSS (self-hosted).
Zero breaking changes - all existing Zep behavior is untouched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request Memory Layer Any questions related to RAG, GraphRAG and LLM Memory. size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant