Comparisons

LangMem vs. Zep

Zep is better for production agents that need managed, graph-based memory across many users; LangMem is better for LangGraph teams that want free, open-source memory tools in their own code.

Last updated December 2026

Zep is the better choice for production agents that need managed memory across many users, because it builds a temporal knowledge graph from every message, serves ready-made context through Python, TypeScript and Go SDKs, and offers SOC 2 Type II, HIPAA BAA and in-VPC deployment on its Enterprise plan. LangMem is the better choice for LangGraph teams who want free, open-source memory tools inside their own agent code, because it is an MIT-licensed library that stores memories in LangGraph’s store and can also refine an agent’s prompts from feedback.

We make Exabase, which appears as a short third option near the end. This is a neutral comparison of two approaches to agent memory: a library you assemble (LangMem) and a managed context service (Zep). It is based on the LangMem GitHub README and conceptual guide, and on Zep’s pricing page and documentation overview, all checked on 4 December 2026.

Quick verdict

Choose LangMem if you already build on LangGraph, want memory logic in your own code and database, and care about procedural memory, where the agent’s instructions improve over time.

Choose Zep if you want a hosted service that turns conversations and business data into a graph of facts, with managed retrieval, published SDKs in three languages and enterprise compliance options.

Consider Exabase if you want managed memory that resolves contradictions, plus per-tenant file storage, extraction and multi-modal search in the same API.

Comparison table

LangMem

Zep

What it is

Open-source memory library from LangChain

Managed context layer built on temporal context graphs

Licence

MIT

Commercial service; Graphiti framework is open source

Hosting

Runs in your app; storage in LangGraph’s BaseStore

Zep Cloud, BYOK keys or BYOC in your VPC on Enterprise

Memory model

Semantic (collections and profiles), episodic and procedural

Users, threads, episodes, facts and entities in a graph

How memories are written

Agent tools in the hot path, or a background memory manager

Every episode sent to Zep is ingested into the graph

SDKs

Python

Python, TypeScript and Go

Pricing

Free library; you pay for LLM calls and storage

Free; Flex $125 a month; Flex Plus $375 a month; Enterprise custom

Compliance

Depends on your own deployment

SOC 2 Type II and HIPAA BAA on Enterprise

Best for

LangGraph agents with memory in your own stack

Multi-user production agents that want managed context

Architecture

LangMem is a library, not a service. Its core memory API works with any storage system, and its memory tools use LangGraph’s BaseStore for persistence. The README’s example uses InMemoryStore, which loses memories on restart, and points to AsyncPostgresStore or a similar database-backed store for production. On LangGraph Platform, LangMem plugs into the long-term memory store that every deployment gets by default. Everything runs where your agent runs, which keeps data in your infrastructure and makes you responsible for scaling it.

Zep is a managed platform that describes itself as a unified context layer for enterprise data. It organises business data, documents and conversations into temporal context graphs, served by its Context Lake on Konig, Zep’s graph database service. Its open-source temporal knowledge graph framework, Graphiti, is the engine underneath. You send data in and ask for context out; Zep runs the extraction, graph and retrieval infrastructure.

Winner: Zep for teams that want infrastructure handled; LangMem for teams that want memory as code they own.

Memory types and extraction

LangMem’s conceptual guide names three memory types. Semantic memory holds facts, stored either as a collection of searchable records or as a profile, a single document that is updated in place. Episodic memory keeps successful interactions as examples, including the reasoning and why an approach worked. Procedural memory encodes how the agent should behave, starting from the system prompt and refined through feedback with create_prompt_optimizer. Memories can be written in the hot path, where the agent calls create_manage_memory_tool during the conversation, or in the background, where a memory manager extracts, consolidates and updates knowledge after the conversation goes idle.

Zep’s model is built around users, threads and episodes. An episode is any data object you send, such as a chat message or a JSON payload, and Zep extracts entities and facts from it into the user’s graph. Its documentation also lists thread summaries, user summaries, observations and context templates, and paid plans let you define custom entity and edge types (five on Free, up to 20 on higher plans) so the graph reflects your domain, much like an ontology.

Winner: LangMem for range, since procedural memory and prompt optimisation have no direct Zep equivalent; Zep for structured, graph-shaped facts.

Handling facts that change

When a user changes job, city or plan, memory needs to reflect the new state without returning the old one. LangMem’s background manager consolidates and updates existing memories, and profiles are updated in place, which suits user profile data that only needs the latest value. Collections are harder: the guide notes that reconciling new information with old records can reduce precision or recall. Zep’s temporal graphs track facts over time, so a newer fact can supersede an older one while history stays available. That is the problem of memory drift and contradiction resolution, and a graph with time on its edges handles it more directly than a flat collection.

Winner: Zep, for time-aware facts as a built-in property of the store.

Retrieval

LangMem retrieves through create_search_memory_tool or direct store access, with semantic search and metadata filtering from LangGraph’s storage primitives, organised by namespaces such as organisation, user and application. You decide when the agent searches and how results enter the prompt. Zep’s retrieval returns assembled context for a user or thread, combining facts, entities and summaries, and it exposes a Context MCP Server on every plan. Zep does not charge for retrieval, which makes frequent context calls cheap to experiment with. Both rely on semantic search; Zep adds graph traversal over related entities.

Winner: Zep, for ready-to-use context rather than raw search results.

Deployment and data control

With LangMem, data lives in the store you configure, usually Postgres, so data residency and encryption are whatever your database provides. Zep’s self-serve plans run in Zep Cloud. Enterprise adds Zep Cloud with your own encryption keys (BYOK) or Bring Your Own Cloud inside your VPC, along with SSO, SCIM and one-year audit log retention. We did not find a self-hosted Zep server on the pages we checked; Graphiti is the open-source component you can run yourself.

Winner: LangMem for full control by default; Zep Enterprise if you need BYOC with a managed service.

Pricing

LangMem is free under the MIT licence. Your costs are the LLM calls it makes to extract, consolidate and optimise prompts, plus the database behind LangGraph’s store and any LangGraph Platform hosting you choose.

Zep prices by credits, billed monthly. The Free plan includes 10,000 credits a month, Flex is $125 a month with 50,000 credits and $25 per extra 10,000, and Flex Plus is $375 a month with 200,000 credits and $75 per extra 40,000. Enterprise is custom, and the annual toggle shows a 17% saving without listing annual amounts. One episode costs one credit up to 350 bytes, plus one credit per additional 350 bytes, and memory, retrieval, storage, threads, users and graph storage are not charged. As a worked example (our calculation), an agent that sends 150,000 short messages a month fits within Flex Plus at $375, while the same volume on Flex would cost $125 plus ten overage blocks at $25, also $375. See Zep pricing for more detail.

Winner: LangMem on licence cost; Zep for predictable, ingestion-based pricing with free retrieval.

Developer experience and framework fit

LangMem is Python-first and designed around LangGraph: you add two tools to a create_react_agent and give it a store. Outside LangGraph you can still use the core API, but most examples assume LangChain’s stack. Zep publishes Python, TypeScript and Go SDKs and lists integrations with LangGraph, AutoGen, LiveKit, CrewAI, Google ADK, Pydantic AI, Mastra and the Vercel AI SDK, which makes it the easier choice for teams on mixed agent frameworks.

Winner: Zep for breadth of SDKs and integrations; LangMem for LangGraph-native teams.

Who should choose LangMem

Choose LangMem if your agents are LangGraph graphs, your data must stay in your own Postgres, and you want the agent to learn behaviour as well as facts. A real-world example: an internal coding assistant runs on LangGraph Platform, stores project conventions as semantic memories per repository namespace, and uses the prompt optimiser to fold reviewers’ feedback into its instructions each week. For other library options, see LangMem alternatives and LangMem vs Mem0.

Who should choose Zep

Choose Zep if you run a multi-user product, such as a customer support agent or sales copilot, where each user’s facts, entities and history should be assembled into context automatically, and you would rather pay a predictable monthly fee than operate graph infrastructure. Its enterprise deployment options also suit teams that need BYOC. Compare it with other managed services in Zep alternatives and Mem0 vs Zep.

A third option: Exabase

Exabase Memory is a managed memory API built on the M-1 engine, which extracts facts, preferences and events, handles entity resolution and resolves contradictions when memories are written, and retrieves with hybrid search, recency weighting, query expansion and reranking at about 200 ms. M-1 scores 96.4% on LongMemEval in Exabase’s published research. Each user or tenant gets an isolated Base with memory, file storage, Deep Search, Extract and Workers, so documents and memories share one scope, as described in the about memories guide. Exabase offers a TypeScript SDK and REST API but no Python SDK, no self-hosting and no procedural memory or prompt optimisation, so LangMem fits better for Python-only, self-hosted LangGraph teams and Zep for teams that need BYOC. Pricing starts free at $0 a month with 1 GB storage and 200 credits, and Scale is $149 a month or $1,490 a year. See Exabase vs Zep and Exabase vs LangMem.

How we compared

We read the LangMem GitHub README and conceptual guide, and Zep’s pricing page and documentation overview, on 4 December 2026. We compared architecture, memory types, handling of changing facts, retrieval, deployment, pricing and developer experience. We did not run benchmarks, and the cost example is our own calculation from list prices.

FAQs

Is LangMem better than Zep?

LangMem is better for LangGraph teams who want free, open-source memory in their own database, including procedural memory. Zep is better for production multi-user agents that want managed, graph-based context with enterprise compliance options.

Is LangMem free?

Yes, LangMem is free and open source under the MIT licence. You pay for the LLM calls it makes and the database you use for storage.

Is Zep free?

Yes, Zep has a Free plan with 10,000 credits a month, no rollover and two projects. Paid plans start at $125 a month.

How does Zep count credits?

Zep charges one credit per episode up to 350 bytes, plus one credit for each additional 350 bytes. Retrieval, storage, users, threads and graph storage are not charged.

Does LangMem need LangGraph?

No, LangMem’s core memory API works with any storage system, but its memory tools use LangGraph’s BaseStore and most examples assume LangGraph.

Can I self-host Zep?

Zep’s self-serve and Enterprise cloud plans are hosted, and Enterprise adds Bring Your Own Cloud inside your VPC. The open-source Graphiti framework can be run yourself.

Which handles changing facts better?

Zep handles changing facts more directly, because its temporal graphs record when facts held. LangMem profiles update in place, while collections need reconciliation that can reduce precision.

What is procedural memory in LangMem?

Procedural memory is LangMem’s term for how an agent should behave. It starts from the system prompt and is refined through feedback with the prompt optimiser.

Which languages do they support?

LangMem is a Python library. Zep has Python, TypeScript and Go SDKs.

Is Zep SOC 2 compliant?

Zep lists SOC 2 Type II and a HIPAA BAA on its Enterprise plan; the self-serve plan table shows neither. Your own reviewers should confirm what applies to your deployment.

How do I move from LangMem to Zep?

Export memories from your LangGraph store by namespace, map each user namespace to a Zep user, and send the facts or original messages to Zep as episodes so its graph is rebuilt from them.

Is there a managed alternative that also stores files?

Yes. Exabase combines memory with per-tenant file storage and search in one API. See the best agent memory platforms roundup for more options.

Related pages: LangMem review, Zep review, Letta vs LangMem, Zep vs Letta, Zep vs Cognee, best open-source agent memory, agent memory solution, episodic vs semantic memory, when to outgrow your framework’s built-in memory

Compare similar apps and tools:

LangGraph vs. OpenAI Agents SDK

CrewAI vs. AutoGen

n8n vs. Zapier

Relevance AI vs. Lindy

Temporal vs. Inngest

Inngest vs. Trigger.dev

E2B vs. Modal

E2B vs. Modal

E2B vs. Daytona

People Data Labs vs. Apollo

ScreenshotOne vs. Urlbox

Microlink vs. Iframely

AWS Rekognition vs. Google Cloud Vision

Twelve Labs vs. Mixpeek

Twelve Labs vs. Google Video Intelligence

ElevenLabs vs. Deepgram

Deepgram vs. Speechmatics

AssemblyAI vs. Gladia

Zyte vs. ScrapingBee

Bright Data vs. Oxylabs

Google Document AI vs. Azure Document Intelligence

Rossum vs. Nanonets

Mindee vs. Veryfi

Reducto vs. Extend

LlamaParse vs. Mistral OCR

LlamaParse vs. Docling

Bedrock Knowledge Bases vs. Vertex AI Search

Vectara vs. Ragie

LanceDB vs. Chroma

MongoDB Atlas vs. Pinecone

Weaviate vs. Milvus

Vespa vs. Elasticsearch

Algolia vs. Typesense

Typesense vs. Meilisearch

Elasticsearch vs. OpenSearch

LangMem vs. Zep

Vertex AI Memory Bank vs. AWS AgentCore Memory

AWS AgentCore Memory vs. Mem0

Letta vs. Cognee

Zep vs. Cognee

Bedrock Knowledge Bases vs. Azure AI Search

OpenAI file search vs. Pinecone

Docling vs. Unstructured

Azure Document Intelligence vs. Textract

Mistral OCR vs. Textract

Reducto vs. Unstructured

Apify vs. ScraperAPI

Firecrawl vs. ScraperAPI

turbopuffer vs. Pinecone

pgvector vs. Qdrant

Chroma vs. Weaviate

Qdrant vs. Milvus

Letta vs. LangMem

Cognee vs. Mem0

Supermemory vs. Zep

CrewAI vs. LangGraph

LangChain vs. LlamaIndex

Whisper vs. Deepgram

Deepgram vs. AssemblyAI

Textract vs. Google Document AI

Docling vs. Marker

LlamaParse vs. Reducto

LlamaParse vs. Unstructured

Firecrawl vs. Apify

Firecrawl vs. Jina

LangMem vs. Mem0

Mem0 vs. Supermemory

Zep vs. Letta

Mem0 vs. Letta

pgvector vs. Pinecone

Mem0 vs. Zep

Milvus vs. Pinecone

Chroma vs. Qdrant

Weaviate vs. Qdrant

Pinecone vs. Qdrant

Pinecone vs. Chroma

Pinecone vs. Weaviate

Cut your token spend and give your agent precise context.

Get started in minutes.

Cut your token spend and give your agent precise context.

Get started in minutes.

Cut your token spend and give your agent precise context.

Get started in minutes.