Letta vs Mem0

Choose a memory layer for agents that need to retain information across interactions.

At a glance

At a glanceLettaMem0
LicenseApache-2.0Apache-2.0
LanguagesPythonPython, TypeScript
DeploymentSelf-hosted / Managed cloudSelf-hosted / Managed cloud
MaturityGrowingGrowing
Stars24.5k64.3k
Star growth over the last 7 days+148 ★+509 ★
Forks2.6k7.5k
Open issues39703
Last commit23 Aug 202628 Aug 2026
ActivityActiveActive

What each one does

Letta

Treats the context window like RAM and everything else like disk, with the agent itself deciding what to page in and out. That framing makes indefinitely long-running agents tractable. It is a more opinionated commitment than bolting a memory library onto an existing stack.

Full entry →

Mem0

Extracts durable facts from a conversation and retrieves the relevant ones on later runs, instead of replaying an ever-growing transcript into the context window. Useful wherever an assistant should remember a user between sessions. What gets stored is model-decided, so verify the extraction quality on your own data before relying on it.

Full entry →

What you can do

Letta

  • Run an agent with memory locally — npm install -g @letta-ai/letta-code then letta launches an agent with memory on your own computer (Node.js 22.19+) that can code and do other tasks there; agents can also be run via the desktop app or channels like Slack.
  • Embed stateful agents in your app — The TypeScript Agent SDK creates one with createAgent, passing a model string such as anthropic/claude-opus-4-8 plus human and persona, then streams the reply through resumeSession and session.stream().
  • Switch backends with one field — The same SDK code runs against Constellation, Letta's agent cloud, against a self-hosted App Server, or with backend set to local, which spawns Letta Code on your machine as a subprocess.
  • Keep an existing V1 integration running — The previous-generation V1 SDKs — @letta-ai/letta-client for TypeScript and letta-client for Python — still target the Letta API directly; the README points new projects at the Agent SDK instead.
  • Start from letta-code, not this repo — This repository is the legacy server behind the Letta V1 API; active development moved to letta-ai/letta-code, and self-hosting an API server is now done through the App Server.

Mem0

  • Carry user facts between sessions — memory.add(messages, user_id=...) extracts durable facts from a conversation, and memory.search with a user_id filter and top_k returns only the ones the next prompt needs.
  • Turn on hybrid retrieval — Installing pip install mem0ai[nlp] together with the spaCy en_core_web_sm model adds BM25 keyword matching and entity extraction on top of dense vector search.
  • Inspect what got stored — The CLI from npm install -g @mem0/cli gives mem0 add and mem0 search with --user-id, so you can check what the extractor actually kept before trusting it in an application.
  • Self-host the memory server — make bootstrap in the server directory starts the stack, creates an admin and issues the first API key; auth is on by default, with AUTH_DISABLED=true reserved for local development.
  • Wire Mem0 into a repo — Pipeline skills added via npx skills add — /mem0-integrate then /mem0-test-integration — run a test-first integration inside Claude Code, Cursor and other tools supporting the skills standard.