Comparisons

Letta vs. LangMem

Letta is better when you want a complete stateful agent that manages its own memory. LangMem is better when you build on LangGraph and want to add memory tools to your own agent.

Last updated December 2026

Letta is the better choice when you want a complete stateful agent that manages its own memory, because it gives you the agent runtime, persistent memory blocks, a hosted service and apps in one platform. LangMem is the better choice when you already build on LangGraph and want to add long-term memory to your own agent, because it is a small MIT library of memory tools and a background manager that plug into LangGraph’s store.

We make Exabase, which appears as a short third option near the end. This is a neutral comparison of two open-source approaches to agent memory, based on Letta’s GitHub README, documentation and pricing page and LangMem’s GitHub README, all checked on 4 December 2026.

Quick verdict

Choose Letta if you want an agent that keeps its identity, memory and conversations across sessions and devices, with a terminal app, desktop and web apps and a cloud service ready to use.

Choose LangMem if you run LangGraph, you want to keep control of your agent loop, and you only need memory extraction, search and consolidation added on top.

Consider Exabase if you want a managed memory API that works with any framework, plus isolated storage and search per user or tenant.

Comparison table

Letta

LangMem

What it is

Platform for building stateful agents with memory, formerly MemGPT

Library of memory tools and a background memory manager for agents

Maker

Letta

LangChain Inc

Licence

Apache-2.0

MIT

GitHub stars (4 Dec 2026)

About 25.4k (main repo)

About 1.7k

Scope

Agent runtime, memory, apps, channels and cloud

Memory only; you bring the agent

Memory model

Memory blocks always in context, plus agent-managed storage

Memories extracted to a LangGraph store and searched on demand

Who decides what to remember

The agent, by editing its own memory blocks

Your agent through tools, or a background manager after each conversation

Storage

Letta server or Letta Cloud; memory repositories

Any LangGraph BaseStore, such as Postgres

SDKs and apps

Letta Agent SDK for TypeScript, Letta Code terminal UI, desktop and web apps

Python library

Hosted service

Letta Cloud: Free; Pro $20 a month; Enterprise custom

None; LangSmith hosts LangGraph apps

Best for

Long-lived assistants and coding agents

LangGraph agents that need memory added

What each project is

Letta began as MemGPT, the research project that treated an LLM’s context window like an operating system treats RAM, paging information in and out so an agent could remember beyond its window. See MemGPT and virtual context management for that idea. Today Letta describes itself as a platform to build stateful agents with memory that can learn and improve over time. Its current source lives in the Letta Code repository, which includes the agent harness, a terminal UI, an App Server and the runtime behind its desktop and web apps.

LangMem is a library from LangChain that helps agents learn and adapt from their interactions over time. It does not run your agent. It gives you two pieces: tools your agent can call to store and search memories during a conversation, and a background memory manager that extracts, consolidates and updates knowledge after the fact. It is built for LangGraph’s storage layer.

So one is a place your agent lives, and the other is a part you add to an agent you already have.

Winner: Letta for completeness. LangMem for fitting into an existing stack.

How memory works

Letta’s core idea is memory blocks. Each block has a label, a description, a value and a character limit, and blocks are prepended to the agent’s prompt so the model always sees them, with no retrieval step. The agent reads its block descriptions to decide what to write where, and edits its own blocks as it learns: a block for the user, one for its persona, one for the current project. Blocks can be marked read-only, and one block can be attached to several agents so they share the same facts. Letta also gives agents storage beyond the window that they search when needed.

LangMem keeps memories outside the prompt. Its manage-memory tool lets your agent create, update and delete memories as it talks, and its search tool lets it look them up. The background manager runs after a conversation, extracting new facts and consolidating them with what is already stored, which keeps the hot path fast. LangMem’s documentation describes semantic, episodic and procedural memory, including updating an agent’s own instructions from feedback; see episodic vs semantic memory and procedural memory.

The trade-off is visibility against scale. Letta’s blocks are always in context, which makes the agent’s knowledge transparent but bounded by the block limits. LangMem’s store can grow much larger, but the agent only sees what it retrieves.

Winner: Letta for agents that should always know a core set of facts. LangMem for large, searchable memory.

Self-editing versus background extraction

Letta’s agents manage their own memory with tool calls, which is the MemGPT approach. It works well for long-lived assistants and coding agents where the model can judge what matters. The cost is extra model calls and tokens on the main path, and a risk that the agent writes something wrong into a block it will see on every turn.

LangMem lets you choose. Use the tools for in-conversation memory, the background manager for memory consolidation after the fact, or both. Background processing keeps latency down and lets a separate model do extraction, at the cost of memory lagging slightly behind the conversation.

Neither removes the need to handle contradiction resolution carefully. Test both with conversations where a user changes their mind.

Winner: LangMem for flexibility in where memory work happens.

Framework fit

LangMem is LangGraph-native. Its tools work in any LangGraph app, and its storage is LangGraph’s BaseStore, with an in-memory store for development and a Postgres-backed store recommended for production. Its core primitives work with any storage system, but the examples assume LangGraph. If you are choosing an orchestration framework too, see CrewAI vs LangGraph, and compare LangGraph’s own memory in Exabase vs LangGraph memory.

Letta is its own runtime. You build the agent in Letta, and reach it through its apps, channels such as Slack, Telegram and Discord, the Letta Agent SDK for TypeScript, or Letta Cloud. It does not slot inside another framework’s agent loop, so adopting it means adopting Letta’s way of running agents.

Winner: LangMem for teams on LangGraph. Letta for teams starting fresh.

Developer experience

Letta gives you more out of the box. Install Letta Code with npm, start the terminal UI with the letta command, or run a local App Server with letta server. Agents keep memory, identity and conversations across machines through Letta Cloud, and you can inspect and edit memory blocks directly, which helps when debugging why an agent behaved as it did.

LangMem is a few functions. You add the tools to your agent, configure a store and, if you like, a background manager. There is less to learn and less to run, but also no UI for inspecting memory beyond what your store and agent observability tools provide. LangMem’s GitHub page shows a smaller project, about 1.7k stars and no published releases, so check its activity before depending on it.

Winner: Letta for tooling. LangMem for minimal surface area.

Hosting and pricing

Both are free to use as open source.

Letta Cloud has a Free plan at $0 a month with up to 3 stateful agents and 5 MiB of storage per memory repository, using your own API keys or purchased credits. Pro is $20 a month with $20 of credits for any model and remote sandboxes, up to 20 stateful agents and 50 MiB per memory repository. Teams Pro adds shared agents and access control at a price the page does not list, and Enterprise is custom with role-based access control, SSO and dedicated support. Cloud sandboxes cost from $0.24 an hour. See Letta pricing for more.

LangMem has no hosted service of its own. You pay for the model calls it makes, for your store, such as a Postgres database, and for LangSmith if you deploy LangGraph agents there; LangSmith Plus is $39 a seat a month.

As an illustration, a developer running five personal agents would pay $20 a month on Letta Pro with model credits included. The same developer on LangMem would pay only for model usage and a small Postgres instance, but would run and host the agent loop themselves.

Winner: LangMem on cost. Letta for a managed path.

Who should choose Letta

Letta suits developers building long-lived assistants and coding assistants, where one agent should carry its knowledge for weeks and you want to see and edit what it knows. A real-world example: a developer creates a Letta agent for their codebase with blocks for architecture decisions, team conventions and open tasks, and talks to it from the terminal and Slack. It updates its blocks as decisions change, so a new session starts with current context.

Who should choose LangMem

LangMem suits teams with production LangGraph agents that need memory without changing their runtime, such as personal AI assistants and support agents. A real-world example: a team adds LangMem’s background manager to its LangGraph assistant, storing extracted user preferences in Postgres per user namespace, and gives the agent a search tool so it can recall preferences when relevant.

A third option: Exabase

Exabase is managed memory and storage for agents, usable from any framework over a REST API or the TypeScript SDK. Exabase Memory runs on M-1, which extracts facts, preferences and events, builds a self-organising ontology and resolves contradictions as facts change, and Exabase reports 96.4% on LongMemEval. Memories are scoped per user, project or agent with Bases, each an isolated environment with file storage and Deep Search, and Workers can update memories on a schedule. Like LangMem, Exabase sits under your agent rather than replacing it; unlike LangMem, it is a hosted service rather than open source. The memory scoping guide shows how per-user memory works, and Exabase vs Letta and Exabase vs LangMem compare it directly. For how teams use it, see agent memory.

How we compared

We read Letta’s GitHub README, its memory blocks documentation and its pricing page, and LangMem’s GitHub README, on 4 December 2026. We compared scope, memory model, how memory is written, framework fit, developer experience, hosting and pricing. LangMem’s memory types are described from its documentation rather than its README. The cost example and real-world examples are illustrative.

Frequently asked questions

Is Letta better than LangMem?

Letta is better when you want a complete stateful agent platform with memory, apps and hosting. LangMem is better when you already use LangGraph and want to add memory to your own agent.

What is the difference between Letta and LangMem?

Letta is an agent runtime where agents edit memory blocks that stay in their context window. LangMem is a library that extracts and stores memories in a LangGraph store and lets your agent search them.

Is Letta the same as MemGPT?

Yes. Letta was formerly known as MemGPT, the research project that introduced self-editing memory for LLM agents.

Is LangMem open source?

Yes. LangMem is MIT-licensed. Letta is Apache-2.0. See the LangMem review and Letta review for more.

Does LangMem work without LangGraph?

Partly. Its core primitives work with any storage system, but its tools and examples are built for LangGraph and its BaseStore.

How much does Letta cost?

Letta Cloud is free for up to 3 agents with your own keys, and Pro is $20 a month with $20 of model credits and up to 20 agents. Enterprise is custom.

How much does LangMem cost?

LangMem is free. You pay for the model calls it makes, your storage, and any hosting such as LangSmith.

What are Letta memory blocks?

Memory blocks are labelled sections of an agent’s context window that persist across interactions. The agent reads and edits them, and they are always visible without a retrieval step.

Can multiple agents share memory in Letta?

Yes. A memory block can be attached to several agents, and each will see the same block in its context window.

Which is better for coding agents?

Letta, for most developers. Letta Code provides a terminal UI and agents that keep project memory across sessions.

How do I move from Letta to LangMem?

Export the contents of your Letta memory blocks and conversation history, write them into a LangGraph store under each user’s namespace, and give your LangGraph agent LangMem’s search tool.

What are the alternatives to Letta and LangMem?

Mem0, Zep and Cognee are the common alternatives. See Letta alternatives, LangMem alternatives and the best open-source agent memory.

How does LangMem compare with Mem0?

Mem0 is a standalone memory layer with Python and TypeScript SDKs and a managed platform, while LangMem is a LangGraph library. See LangMem vs Mem0.

Related pages: Mem0 vs Letta, Zep vs Letta, LangMem vs Mem0, LangMem vs Zep, Letta vs Cognee, Exabase vs Letta, Exabase vs LangMem, Best agent memory platforms, MemGPT, Agent 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.