The full memory stack: more than just facts
Zep stores: conversation messages (full history, searchable), user facts (extracted automatically: 'user prefers dark mode'), session summaries (auto-generated after N messages), and metadata (custom key-value per user). When the agent starts a new session, Zep injects relevant context: recent messages, relevant facts, and a session summary. This means the agent gets a rich context without you managing prompt stuffing.
Semantic search over conversation history
Zep's killer feature: search past conversations by meaning, not keywords. Query 'user asked about refund policy' and Zep returns all conversations where a refund was discussed, even if the user said 'can I get my money back' instead of 'refund.' This is powered by vector embeddings over message content. The search is fast (under 50ms for 10K messages) and the results include the full conversation context around the match.
Auto-summarization: keeping context manageable
Zep automatically summarizes conversations after they exceed a token threshold (default: 12 messages). The summary captures key decisions, action items, and user preferences. The next session starts with the summary as context instead of the full 50-message history. This saves token costs (summary is 200 tokens vs full history at 5,000 tokens) while preserving the most important information.
Self-hosted with PostgreSQL: production reliability
Zep uses PostgreSQL with pgvector for storage. This means backups, replication, and monitoring work the same as your database. The Docker Compose setup pulls 3 containers: Zep server, PostgreSQL, and optionally an NLP service for entity extraction. Memory usage: 500MB for Zep + PostgreSQL at idle, 1.5GB under load with 10K conversations. The structured data model (messages table, facts table, summaries table) means you can query memory directly with SQL for analytics.
Zep vs Mem0 vs LangChain Memory
Zep: full memory stack, PostgreSQL, semantic search, production-ready. Best for production agents with high reliability requirements. Mem0: simpler, fact extraction focused, cloud or self-host. Best for prototypes and solo projects. LangChain Memory: basic conversation buffers, no search or summarization. Best when you need minimal memory and already use LangChain.