
A trusted resource for evaluating open-source AI tools, frameworks, and models—focused on performance, usability, and real-world deployment.
Compare the best Letta (MemGPT) alternatives for 2026 with Open Source AI Review: Cognee, Mem0, Zep, and LangMem for memory in your existing runtime.
For teams keeping an existing agent runtime, Cognee is our first Letta alternative for graph-backed external memory-an architectural fit recommendation, not a benchmark ranking. This Open Source AI Review comparison provides documentation-based editorial guidance, checked November 12, 2026. We also cover Mem0, Zep/Graphiti, and LangMem as workload-dependent alternatives. Cognee’s CrewAI and LangGraph adapters support retaining your framework, though integration work remains. Letta remains relevant when adopting a stateful agent harness is desirable. Searches for “MemGPT alternatives” address the same decision: MemGPT names the original research and memory-management pattern, while Letta is the agent framework.
A stateful agent harness manages agent execution and memory together; an external memory service is called by an application that retains its own orchestration. Open Source AI Review uses that distinction as this article’s evaluation framework, with Cognee first for teams seeking graph memory without replacing their harness. Cognee documents Python, TypeScript, HTTP, and MCP interfaces, with graph, vector, or code-context retrieval. Keeping your runtime still requires integration: your application must decide when to store information, retrieve it, and inject the results into the agent’s context.
MemGPT refers to the original research and design pattern built around self-editing memory tools; Letta is the agent framework. Letta’s September 2024 naming announcement makes that distinction, so searches for “MemGPT alternatives” belong in this comparison rather than treating MemGPT as an independent competing vendor. In its April 2026 architectural explanation, Letta also describes MemGPT as a stateful agent harness, not a pluggable memory tool. The argument that memory belongs inside the harness is Letta’s position, not an industry consensus that this comparison assumes.
Letta’s memory blocks are persistent prompt sections visible to the agent without retrieval. An external memory API instead lets the application search for selected information and supply those results as context. Mem0’s quickstart illustrates this pattern with calls to add messages and search memories around an existing agent loop. Retrieved results do not reproduce always-in-context blocks or the complete execution behavior of a stateful harness. Retaining your runtime is therefore this article’s selection condition-not evidence that adopting Letta’s runtime is inherently undesirable or that the architectures are interchangeable.
Start with the boundary between memory and orchestration: which responsibilities should the memory system take over, and which should remain in your application? Cognee is our first option to evaluate for teams seeking graph memory without replacing their runtime. Its documentation describes a memory engine combining vector search, knowledge graphs, and relational storage, with generated or custom data models. That makes it a relevant starting point-not evidence that every integration, retrieval mode, or migration path will meet your requirements without additional engineering.
We apply these same criteria throughout the comparison, using documentation rather than hands-on benchmarking. Cognee ranks first for the specific requirement of adding graph memory while retaining an existing runtime; that recommendation is not a measured latency, accuracy, or total-cost ranking. Where documentation does not establish a capability, we leave it unverified instead of converting missing evidence into a negative feature checkmark. For your shortlist, use the checklist to define integration tests, import checks, deployment ownership, and a workload-specific cost estimate before committing.
Letta remains a good fit when you deliberately want the agent harness to own persistent context, rather than attaching memory to a separate runtime. Letta describes MemGPT as a stateful agent harness, not a pluggable memory tool. Its position is that memory belongs inside the harness; that is an architectural approach to evaluate, not an industry-wide requirement.
system/ directory.Letta is a deliberate choice when persistent context and agent execution should live in the same harness. Adopting that runtime can be appropriate on either cloud or self-hosted infrastructure. An external memory layer serves a different architectural role; it should not be treated as a drop-in reproduction of Letta’s context behavior.
For teams evaluating Letta and MemGPT alternatives, we rank Cognee first when the requirement is graph-backed memory attached to an existing LangGraph, CrewAI, or custom application. This is a documentation-based editorial assessment, not a hands-on benchmark or a claim of universal performance superiority. The order prioritizes framework integration, memory representation, deployment choices, and documented import paths. Mem0 fits conversational personalization; Zep and Graphiti address temporal context through distinct managed and open-source offerings; LangMem fits teams assembling memory functions around their application and storage choices.
Cognee is our first recommendation for teams that want connected memory while keeping application orchestration in their current framework. Its memory engine combines vector search, knowledge graphs, and relational storage, using generated or custom data models to organize ingested information. That makes it an option for adding graph-backed memory rather than replacing the agent execution layer.
add_tool and search_tool; LangGraph documents get_sessionized_cognee_tools(user_id).remember, recall, improve, and forget, with graph, vector, or code context retrieval.The reason for placing Cognee first is the combination of graph-backed storage, existing-framework adapters, deployment options, and documented memory imports. A team can evaluate its memory representation without also making a new agent runtime the center of its application.
Its generated or custom data models also give teams a choice in how ingested information becomes connected memory. Retrieval is not restricted to one context mode: applications can select graph, vector, or code context according to their requirements. These capabilities support the recommendation; they do not establish an accuracy or latency advantage over competitors.
Existing LangGraph or CrewAI applications needing graph memory: The documented adapters make Cognee a candidate when the framework is already chosen and the missing component is connected memory. Check the adapter version and its API before planning integration work.
Custom applications needing selectable context retrieval: Python, TypeScript, HTTP, and MCP interfaces support applications that manage their own agent loop but need graph, vector, or code context retrieval.
Teams moving stored memory between systems: COGX imports provide a documented starting point for bringing supported Letta or other memory records into Cognee. They do not automatically migrate application tools, permissions, or runtime behavior.
Limitations: Keeping the existing framework does not mean zero integration work. Adapter APIs vary by version, import support is narrower than complete application migration, and the supplied documentation does not establish a benchmark win.
Processed tokens measure pipeline work, not just source-document size. Extraction, summarization, and embeddings can make processing exceed raw corpus tokens. Estimate spending with representative workloads rather than applying the headline rate directly to file token counts.
Mem0 is a good fit when the primary requirement is remembering information associated with individual users across conversations. Its hosted quickstart shows an external API called around an existing agent loop: add messages with a user identifier, then search for relevant memory using filters. It also offers an Apache-2.0 library and a self-hosted server, so it should not be treated as cloud-only.
MemoryClient.add(messages, user_id=...) and search(query, filters=...) support storing and retrieving user-associated context.Personalized conversational assistants: Applications that need to retrieve a user's previously stored preferences or context can use the documented user-scoped add/search pattern without replacing their agent loop.
Applications requiring explicit memory maintenance: Teams that need application-controlled updates and deletions can integrate those operations alongside conversation handling, or evaluate MCP for agent-directed management.
Teams evaluating managed versus self-hosted conversational memory: Mem0 provides both paths, although feature and operating-cost parity should not be assumed.
Limitations: Mem0's current hosted graph links shared entities; it does not assign typed relationship labels such as manages. That distinction matters if explicitly labeled relationships are central to the application. Hosted graph entitlements also need confirmation because the documentation and pricing page describe them differently.
The pricing page places graph memory under Pro. Current graph documentation instead says entity linking and retrieval boosts run on all plans, while dashboard graph visualization is restricted to Pro and Enterprise. Confirm the required entitlement before purchase; the available evidence does not justify saying graph retrieval necessarily requires the $249/month plan.
Zep is an external context layer accessed through SDKs or MCP, with positioning that includes governed company knowledge and agent skills. Graphiti is the separate open-source temporal knowledge-graph framework. They belong together in this shortlist because both address temporal context, but they are not interchangeable packages and should not be evaluated as operationally identical.
created_at and expired_at for system recording and invalidation, plus valid_at and invalid_at for inferred real-world validity.Managed applications that need changing facts over time: Zep is a candidate when the application needs to distinguish when information was recorded from when it was inferred to be valid in the real world.
Enterprise agents drawing on governed company context: Zep's external context-layer positioning fits teams evaluating managed company knowledge alongside their existing agent harness.
Teams building a self-hosted temporal graph: Graphiti is the relevant option when the requirement is an open-source framework for changing entities and relationships rather than the full managed Zep product.
Limitations: Timestamps do not verify factual truth. Temporal metadata can describe recording and validity intervals without proving that source content or derived facts are correct. Also, neither feature parity nor operational parity between Graphiti and managed Zep is established by the supplied documentation.
Zep episode ingestion uses one credit per 350 bytes or fraction. Retrieval and storage consume zero credits; threads, users, and graph storage also consume zero credits, while webhook invocations can consume one-eighth credit. Episode count alone is therefore insufficient for estimating a bill or comparing it with token- or request-based alternatives.
LangMem separates storage-independent memory functions from higher-level stateful integrations. Its core can extract, update, consolidate, and remove memories outside LangGraph. Its ready-made persistence and agent tools integrate most directly with LangGraph's BaseStore. It is therefore an option for both existing LangGraph applications and custom applications willing to assemble their own storage integration.
BaseStore.Existing LangGraph agents needing persistent memory tools: LangMem fits teams already using LangGraph that want memory operations aligned with its store interface.
Custom applications needing extraction or consolidation functions: The storage-independent core lets teams use memory processing without adopting LangGraph as the entire application runtime.
Applications choosing when memory is formed: Hot-path and background processing options make LangMem relevant when teams need to decide whether extraction and consolidation happen during or outside the response path. This is an architectural choice, not a documented latency guarantee.
Limitations: The ready-made stateful integrations are most directly aligned with LangGraph, so other applications must account for their storage integration. The example InMemoryStore loses data on restart; production persistence requires a database-backed store.
Across these alternatives, billing units differ substantially: processed tokens, add/retrieval requests, ingestion credits, and separately operated infrastructure. None of those headline prices establishes a universally cheapest product.
The main distinction is runtime ownership: Letta supplies the stateful agent runtime, while the alternatives provide memory or context capabilities around application-owned orchestration. This documentation-based comparison separates mechanisms, deployment responsibilities, and billing units; it does not establish equivalent durability guarantees, operating costs, or performance.
| Criterion | Letta | Cognee | Mem0 | Zep | Graphiti | LangMem |
|---|---|---|---|---|---|---|
| Runtime ownership | Adopt Letta’s runtime through its Agent SDK; hosting need not be vendor-managed. | Attach a memory engine through Python, TypeScript, HTTP, or MCP; orchestration stays in your application. | Call an external memory API around your existing agent loop. | External context layer for existing agents, models, and harnesses through MCP or SDKs. | Integrate an open-source temporal knowledge-graph framework; distinct from managed Zep. | Storage-independent core functions are portable; higher-level stateful tools integrate most directly with LangGraph. |
| Context delivery | MemFS root files enter the system prompt each turn; indexed subdirectories stay outside context until needed. Persistent memory blocks are prepended without retrieval. | Recall can select graph, vector, or code context. | Add messages, then search using queries and filters; update/delete operations also exist. | Delivers context through SDKs or MCP, including historical and point-in-time fact retrieval. | Represents changing entities, relationships, and facts with historical context; exact context-delivery interface is not established in supplied sources. | Core functions extract, update, consolidate, and remove memories; higher-level integration uses LangGraph’s BaseStore. |
| Graph/temporal semantics | MemFS has no semantic/vector index by default; an optional search mod adds keyword and optional semantic/hybrid search. Graph/temporal semantics are not established in supplied sources. | Combines knowledge graphs, vector search, and relational storage using generated or custom data models. | Hosted graph connects memories through shared entities, combining entity boosts with vector and BM25 scores-not typed relationship labels. | Facts have system recording/invalidation and inferred real-world validity timestamps. Timestamps do not establish factual truth. | Temporal knowledge graph preserves historical context as entities, relationships, and facts change. | Core memory transformation is documented; graph/temporal semantics are not established in supplied sources. |
| Persistence responsibility | Persistent memory is part of the runtime; self-hosting means operating the complete App Server. | Managed service or self-hosted engine; self-hosting leaves infrastructure and configured model costs with the operator. | Managed platform or self-hosted library/server; feature and operating-cost parity should not be assumed. | Managed service with enterprise deployment options; uniform durability guarantees are not established in supplied sources. | Self-hosted framework; specific persistence guarantees are not established in supplied sources. | Application supplies storage. Example InMemoryStore loses data on restart; production needs a persistent database-backed store. |
| Deployment options | Letta Cloud or self-hosted Letta App Server. | Cloud, open-source self-hosting, or custom-priced enterprise BYOC. | Managed platform, Apache-2.0 library, or self-hosted server. | Managed plans; enterprise options include BYOC. | Self-hosted open-source framework; do not transfer Zep’s managed-product claims to it. | MIT-licensed SDK; portable core or LangGraph-integrated deployment. |
| Letta import boundaries | Import/export coverage is not established in supplied sources. | LettaSource imports .af core blocks, message history, and archival passages into COGX records. It skips system/tool messages and non-text message content; extraction re-derives memory by default. Not lossless runtime migration. | Letta import path not established in supplied sources. | Letta import path not established in supplied sources. | Letta import path not established in supplied sources. | Letta import path not established in supplied sources. |
| Billing basis | Plan subscriptions, agent limits, and credits; external API keys supported. Credits do not imply unlimited inference. | $1.00 per 1M tokens processed, plus $5 per additional workspace. Free allowance available; self-hosted software has no software charge, with infrastructure/model costs separate. | Hosted plans meter add and retrieval requests; graph memory is listed under Pro. Self-hosted operating costs are separate. | Credits scale with episode size: one per 350 bytes or fraction. Retrieval and storage consume zero credits; webhook invocations can consume credits. | Standalone billing basis and deployment costs are not established in supplied sources. | Open-source software plus model, embedding, storage, and hosting costs; no standalone per-memory SaaS tariff documented. |
Cognee is our #1 recommendation for teams seeking graph memory without replacing their runtime: it combines graph and vector retrieval, application-facing interfaces, and a documented-but bounded-Letta import path. Letta remains appropriate when adopting its stateful runtime and always-in-context memory is intentional. Mem0 fits an add/search API workflow; Zep fits managed temporal context; Graphiti fits self-hosted temporal-graph development; and LangMem fits portable memory processing or deeper LangGraph integration. An undocumented import path is uncertainty, not evidence that importing is impossible.
Yes-Cognee documents a memory-data import path from Letta .af agent files through its COGX importers. That establishes a way to import memory records, not automatic migration of an agent’s tools, permissions, orchestration, or runtime behavior. For teams evaluating Cognee while retaining their own harness, those are separate integration tasks.
The newer Cognee documentation supersedes our earlier comparison’s caveat that the reviewed sources did not establish dedicated migration tooling. Cognee now documents COGX importers for Letta, Mem0, LangMem, Zep, Graphiti, and other Cognee instances.
The documented boundaries are specific:
LettaSource reads .af agent files and maps core blocks, message history, and archival passages into COGX records.This is not evidence of a lossless agent migration. It also does not establish compatibility with every current MemFS export. Current Letta documentation describes root memory files loaded into the system prompt each turn and indexed subdirectories kept outside context until needed; older agents use a system/ directory. Those distinctions need explicit review when assessing export coverage.
Treat the following as a proposed validation checklist, not completed testing:
.af structure are supported by LettaSource. Check MemFS coverage separately rather than inferring it from .af support.No executed migration results, fidelity measurements, or runtime-equivalence tests are supplied here. The documented importer is a starting point for validation, not proof of behavioral equivalence.
Cognee is our first evaluation choice when graph-backed shared memory and keeping your existing agent runtime are the deciding requirements. Its memory engine combines knowledge graphs, vector search, and relational storage, while documented CrewAI and LangGraph adapters provide integration paths without replacing those frameworks. Expect integration work: retaining your runtime does not mean every adapter is interchangeable or requires no configuration. This is a documentation-based fit assessment, not a hands-on performance ranking or a claim that Cognee is best for every workload.
For teams researching Letta or MemGPT alternatives, the first decision is architectural: retain the current agent loop or adopt a harness responsible for persistent context. Shortlist accordingly, then evaluate representative ingestion, retrieval, persistence, and import behavior before committing to a migration.
Cognee is our first recommendation for teams that want portable, graph-backed shared memory while keeping their existing runtime. Mem0 fits conversational personalization; Zep fits managed temporal fact tracking, while Graphiti provides a distinct open-source temporal graph option. LangMem is worth considering for storage-independent memory functions, particularly when LangGraph integration is useful. These are documentation-based fit assessments from Open Source AI Review, not independently benchmarked performance rankings. The central decision is whether you need an attached memory layer or Letta’s agent framework and persistent-context approach.
MemGPT and Letta are related, but the names do not describe two competing products. Letta’s naming announcement distinguishes MemGPT, the original research and design pattern built around self-editing memory tools, from Letta, the agent framework. Developers searching for “MemGPT alternatives” should therefore evaluate alternatives to that memory-management approach and, when relevant, the Letta framework implementing it. Listing MemGPT as a separate vendor alongside Letta would obscure that relationship. For an architecture decision, distinguish the memory behavior you want from the runtime you are prepared to adopt.
Yes. Cognee documents installable adapters for LangGraph and CrewAI, plus Python, TypeScript, HTTP, and MCP interfaces for custom applications. The CrewAI adapter exposes add_tool/search_tool, while the LangGraph integration provides get_sessionized_cognee_tools(user_id). Cognee also documents remember, recall, improve, and forget operations, with graph, vector, or code-context retrieval. These interfaces let the application retain orchestration rather than adopt a replacement agent runtime. Integration still requires implementation work: adapter APIs vary by version, so validate the documented interface against the package version you actually deploy.
Mem0’s documentation says native entity linking and retrieval boosts run automatically on all plans, but its pricing page lists graph memory under Pro. The graph documentation separately limits dashboard graph visualization to Pro and Enterprise. Those statements leave hosted graph entitlements unresolved; they do not justify confidently saying either that every graph feature is universally available or that graph retrieval necessarily requires the $249-per-month Pro plan. Before selecting a tier, confirm whether your required capability is entity linking, retrieval behavior, or visualization, and request explicit entitlement confirmation.
No. LangMem separates storage-independent core functions from higher-level stateful integration with LangGraph’s BaseStore. Its core functions can extract, update, consolidate, and remove memories in other applications, so using them does not inherently require adopting LangGraph as your runtime. The ready-made persistence integrations and agent tools are more directly aligned with LangGraph, however. Outside that integration, plan how your application will store and retrieve memory. LangMem’s example InMemoryStore loses data on restart; a production deployment needs a persistent database-backed store rather than relying on that example.
Cognee offers an open-source engine for self-hosting without a software charge. Mem0 provides an Apache-2.0 library and self-hosted server. Graphiti is Zep’s open-source temporal knowledge-graph framework; self-hosting it is not equivalent to deploying the full managed Zep product. LangMem can run within your application, but you remain responsible for persistent storage and associated model, embedding, and hosting costs. Letta itself also supports self-hosting its complete runtime through Letta App Server. The distinction is therefore deployment responsibility and runtime ownership, not simply cloud versus open source.
No complete-runtime preservation guarantee is established by Cognee’s documented importer. LettaSource imports .af agent files, mapping core memory blocks, message history, and archival passages into COGX records. It skips system and tool messages, excludes non-text message content, and defaults to re-deriving memory through Cognee extraction. That documents memory-record ingestion, not preservation of tool execution, permissions, or the original agent’s behavior. Check export compatibility and semantic preservation before relying on the result. Treat the import as a memory migration requiring validation, not a lossless transfer of a running Letta agent.
Compare representative workloads, not headline rates: Cognee bills processed tokens, Mem0 meters add/retrieval requests, Zep meters byte-sized episode credits, and Letta uses subscriptions and credits. Cognee Standard is $1.00 per 1M tokens processed, plus $5 per additional workspace. Processing can exceed source-document tokens because extraction, summarization, and embeddings contribute work. Zep’s episode size affects credit consumption; Letta subscriptions do not mean unlimited inference. For self-hosted options and LangMem, budget infrastructure, storage, model, and embedding costs separately. The supplied documentation provides no common-workload totals establishing a universally cheapest option.



