Comparisons

Letta vs. Cognee

Letta is better for stateful agents with memory built in, especially coding agents. Cognee is better as a self-hosted memory layer that builds a knowledge graph for any agent.

Last updated December 2026

Letta is the better choice for teams that want a complete stateful agent, with memory built into the agent harness, a terminal and desktop app for coding agents, and a $20 a month Pro plan that includes model credits. Cognee is the better choice for teams that already have an agent and want to add a memory layer that turns documents, code and conversations into a knowledge graph, open source under Apache 2.0 and free to self-host.

We make Exabase, which appears as a short third option near the end. This is a neutral comparison of Letta and Cognee, based on the Letta and Cognee GitHub pages and the Letta and Cognee pricing pages, all checked on 4 December 2026.

Quick verdict

Choose Letta if you want agents that keep their own memory across sessions without wiring a memory service into another framework, especially coding agents, and you are happy to run them on Letta’s harness.

Choose Cognee if you want a memory layer that sits beside your existing agent framework, builds a knowledge graph from your content, and runs on your own infrastructure.

Consider Exabase if you want memory, file storage and search for agents behind one hosted API, with an isolated environment per user or customer.

Comparison table

Feature

Letta

Cognee

What it is

Stateful agent platform with built-in memory (formerly MemGPT)

Open-source memory engine that builds a knowledge graph

Licence

Apache 2.0

Apache 2.0

Where memory lives

Inside each Letta agent, in a memory repository

In a graph and vector store that any agent can query

Main interface

Letta Code (terminal, desktop and web apps), App Server, Agent SDK

Python library and CLI: remember, recall, improve, forget

Self-hosting

letta server runs the App Server locally

Full engine self-hosted for free

Free plan

Up to 3 agents, 5 MiB per memory repository, bring your own keys

Cloud Standard at $0 a month with 100M tokens

Paid plans

Pro $20 a month with $20 of credits; Teams Pro (price not listed); Enterprise custom

Premium $99 a month; Business $499 a month, plus tokens; Enterprise BYOC

Usage pricing

Model credits; cloud sandboxes from $0.24 an hour

$0.10 per 1M tokens after the included allowance

MCP

Remote MCP tools supported

cognee-mcp server

Enterprise features

SSO, role-based access control, dedicated support

SSO, MFA, directory sync, EU data residency on Business

GitHub stars

About 25,400

About 31,200

What each tool does

Letta began as MemGPT, a research project on giving language models long-term memory by letting the agent manage what sits in its own context window. Today Letta is a platform for stateful agents. Its active code lives in the letta-code repository, which contains the agent harness, an interactive terminal UI, an App Server, chat channels such as Slack, Telegram and Discord, and the runtime behind Letta’s desktop and web apps. Agents keep their memory in a memory repository, and Letta Cloud keeps memory and conversations in sync across computers. The older Letta V1 API server has been moved to an archive branch.

Cognee is a memory engine rather than an agent. You call remember to store content, recall to retrieve context or answers, improve to enrich memory and apply feedback, and forget to remove an item or dataset. Cognee builds a knowledge graph with embeddings from what you give it and serves it back to whichever agent framework you use, using OpenAI by default or other providers, including local models.

The core difference is where memory sits. In Letta, memory is part of the agent. In Cognee, memory is a service the agent calls. For background, see MemGPT and stateful vs stateless agents.

Memory model

Letta’s approach comes from the MemGPT idea that the agent should edit its own memory. Instead of a separate system deciding what to keep, the agent reads and writes its memory as part of its work, so knowledge about the user, the project and its own instructions persists between sessions. That makes Letta agents good at working memory and procedural memory: how to do a task, and what is in progress. Memory repositories are small by design, 5 MiB each on Free and 50 MiB on Pro.

Cognee’s model is a graph. It extracts entities and relationships from documents, code and conversations, links them to vector embeddings, and lets an agent traverse those connections. Paid Cloud plans add auto-ontology and an Ontology Editor, so teams can define the ontology that shapes the graph. That suits large bodies of knowledge that many agents share, rather than one agent’s notes.

Winner: Letta for an agent’s own evolving memory; Cognee for shared knowledge built from content.

Building agents

Letta gives you the agent as well as the memory. Letta Code includes a terminal UI and desktop and web apps, client-side tools such as bash that run on your machine, cloud sandboxes for remote execution, and channels for chat apps. A TypeScript Agent SDK lets you embed Letta agents in your own applications. If you want a working coding assistant with memory, Letta is close to ready-made.

Cognee leaves the agent to you. It works with any agent framework, and you decide when to call remember and recall. That is more work for a single agent, and more flexible when several agents or services need the same knowledge.

Winner: Letta, if you want the agent and memory together.

A worked example

Consider a five-person engineering team. With Letta, each developer runs a coding agent in Letta Code that remembers the repository’s conventions, the decisions from last week’s refactor and the tasks still open, because the agent maintains that memory itself between sessions. With Cognee, the team instead feeds its design documents, code and incident write-ups into one knowledge graph, and every agent or internal tool that needs that knowledge queries it with recall. The first is personal, agent-centred long-term memory. The second is shared organisational knowledge. Many teams end up wanting both, and neither is a substitute for a bigger prompt; see memory vs context window.

Self-hosting and openness

Both are Apache 2.0. Letta’s README shows letta server starting the App Server for local or self-hosted agents, and points active projects to the letta-code repository. Cognee runs locally with a Python install or Docker Compose, can work without an API key using local extraction and embedding models, and offers a BYOC Enterprise engagement in your own cloud.

Winner: Cognee, slightly, for running fully offline with local models.

Pricing

Letta’s Free plan costs $0 a month for up to three stateful agents with 5 MiB per memory repository, using your own API keys or purchased credits. Pro costs $20 a month, billed monthly, and includes $20 of credits for any model and remote sandboxes, with up to 20 agents and 50 MiB per memory repository. Letta’s own estimates are that chat users often stay within the $20, casual coding runs to about $100 or more a month, and heavy users reach $200 or more. Cloud sandboxes cost from $0.24 an hour. Teams Pro has no listed price, and Enterprise is custom. See Letta pricing.

Cognee’s open-source engine is free. Cognee Cloud’s Standard plan is $0 a month with 100 million tokens, then $0.10 per million tokens; Premium is $99 a month and Business $499 a month, both plus token usage.

The two price different things. Letta’s bill is mostly model usage for agents doing work. Cognee’s bill is tokens spent building and querying memory.

Winner: a tie, because the products do different jobs.

Who should choose Letta

Choose Letta if you want stateful agents with memory built in, particularly coding agents and personal assistants that should remember a project or a person across sessions. It suits individuals and small teams who want a working agent quickly, and teams that like the MemGPT model of agents managing their own context. Our post on why coding assistants need project memory covers the use case.

Who should choose Cognee

Choose Cognee if you already have agents in LangChain, CrewAI or your own code and want a shared memory layer, need a knowledge graph from documents and code, or must keep data on your own infrastructure. It suits research agents, internal knowledge tools and multi-agent systems that draw on the same knowledge.

A third option: Exabase

Exabase is infrastructure for AI agents, closer to Cognee than to Letta: it gives any agent a Memory API rather than an agent runtime. Memory extracts facts, preferences and events, tracks relationships, resolves contradictions and consolidates knowledge over time, and its M-1 engine scores 96.4% on LongMemEval, per Exabase research. Exabase also stores and searches files with Resources and Deep Search, gives each user or customer an isolated Base, and lets a Worker maintain memories on a schedule. It is hosted and not open source, and it does not include an agent harness, so teams that want a ready-made coding agent should look at Letta and teams that must self-host at Cognee. See agent memory or memory scoping.

How we compared

We read the Letta and Cognee GitHub pages and the Letta and Cognee pricing pages on 4 December 2026. Prices are monthly unless stated, and usage estimates for Letta are Letta’s own. We did not run a memory benchmark.

Frequently asked questions

Is Letta better than Cognee?

Letta is better if you want a stateful agent with memory built in. Cognee is better if you want a memory layer and knowledge graph for agents you build elsewhere.

Is Letta the same as MemGPT?

Letta was formerly called MemGPT. The project grew from MemGPT research into a platform for stateful agents.

Is Letta open source?

Yes. Letta is Apache 2.0, and letta server runs the App Server for self-hosted agents. Active development is in the letta-code repository.

Is Cognee open source?

Yes. Cognee is Apache 2.0 and can be self-hosted for free.

How much does Letta cost?

Letta has a free plan for up to three agents with your own API keys, and Pro at $20 a month with $20 of included credits. Teams Pro and Enterprise prices are not listed.

How much does Cognee cost?

The open-source engine is free. Cognee Cloud has a $0 Standard plan with 100 million tokens, then $0.10 per million tokens; paid plans start at $99 a month.

Can I use Cognee with Letta?

In principle, yes: a Letta agent can call Cognee through MCP or a custom tool to read and write shared knowledge. Neither project documents this as an official integration.

Which is better for coding agents?

Letta, which ships Letta Code with a terminal UI, desktop app and client-side tools for coding work.

Which is better for building a knowledge graph?

Cognee, which extracts entities and relationships into a graph and offers ontology tools on paid Cloud plans.

How do I move from Letta to Cognee?

Export the content your Letta agents rely on, store it in Cognee with remember, and add recall calls to your agent so it retrieves that knowledge at run time.

Is Exabase an alternative to Letta and Cognee?

For agents that need hosted memory plus file storage and search, yes. For a ready-made agent harness, Letta fits better; for self-hosted memory, Cognee does.

Related pages: Letta alternatives, Cognee alternatives, Exabase vs Letta, Exabase vs Cognee, Zep vs Cognee, Cognee vs Mem0, Mem0 vs Letta, Letta vs LangMem, Best open-source agent memory, 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.