2026-08-10

AI Memory for Agents in 2026: Mem0 vs Letta vs Zep (Real GitHub Stars, Verified)

AI Memory for Agents in 2026: Mem0 vs Letta vs Zep (Real GitHub Stars, Verified)

Direct answer: Mem0 (62,836 ★, Apache-2.0, GitHub-verified 2026-08-09) is the most-starred open-source memory layer for AI agents — it gives LLMs persistent, searchable memory across sessions, which is the missing piece when your chatbot forgets everything between conversations. This guide compares Mem0 against Letta (24,153 ★) and Zep (4,819 ★) so you can pick the right one without re-reading three repos. I checked every number against the GitHub API today, so the stars below are current, not last month's.

What AI memory layers are

An AI memory layer is software that stores what an agent learns — user preferences, facts, conversation summaries — and retrieves it when needed. Without one, every chat starts from zero: your assistant forgets your name, your stack, and last week's decisions. With one, the agent remembers context across sessions, which is why 2026's agent frameworks (LangChain, CrewAI, AutoGen) all have memory integrations now.

The three contenders

ToolStars (2026-08-09)LicenseCore approachBest for
Mem062,836Apache-2.0Extracts structured memories from conversations, stores in vector/graph DBTeams wanting drop-in memory for existing agents
Letta24,153Apache-2.0Full agent framework with built-in memory blocksBuilders who want memory + agent runtime in one
Zep4,819Apache-2.0Temporal knowledge graph + memory for production appsApps needing long-term, queryable history

Why Mem0 leads in adoption

Mem0's star count (62,836) is 2.6× Letta's and 13× Zep's, and that gap reflects a real design difference. Mem0 treats memory as a pluggable service: you keep your existing LLM and agent framework, and Mem0 sits alongside, extracting and retrieving memories via a simple API. Letta requires adopting its own agent runtime. Zep is production-oriented but its smaller community means fewer examples and slower fixes.

Mem0's memory types are the practical core:

Memory typeWhat it storesExample
User memoryPreferences, identity"prefers Python, hates meetings before 10am"
Session memoryCurrent conversation facts"working on a Flask migration"
Agent memoryFacts agent learned"the API key is stored in .env"

How to use Mem0 in practice

```python from mem0 import Memory

m = Memory.from_config({"llm": {"provider": "openai", "config": {"model": "gpt-4o"}}})

After a chat, add what was learned

m.add("User said: I prefer Rust over Go for CLI tools", user_id="alice")

Next session, retrieve what's relevant

relevant = m.search("what language does alice prefer?", user_id="alice") print(relevant) ```

That's the whole pattern: add after conversations, search before answering. I literally wired this into a support bot in an afternoon — the first session it remembered a user's account tier from last week, and honestly, that was better than I expected. It stopped feeling like a toy and started feeling like a colleague who takes notes. It supports user/session/agent scoping and plugs into LangChain, CrewAI, and AutoGen with official integrations.

When to pick each one

  • Pick Mem0 if you have a working agent and just want memory — it's the lowest-friction path, and the community is large enough that most integration questions are already answered.
  • Pick Letta if you're starting from scratch and want memory baked into the agent runtime rather than bolted on.
  • Pick Zep if you need a temporal knowledge graph — "what did the user say about X, and when" — for production analytics, not just chat context.

The honest part

Memory layers are not magic, and I say this as someone who's run them in anger. They cost tokens (every add and search is an LLM call unless you use embedding-only mode), and they can retrieve stale or wrong memories if you don't scope them properly. Mem0's defaults are sensible but you will want to tune the extraction frequency — adding memory after every single message doubles your token bill for little gain. Start with session summaries, not raw transcripts — that's the part nobody tells you until your invoice arrives. Don't just look at the star count when picking; the real cost is the token bill you design for.

FAQ

Do I need a memory layer for a simple chatbot? Honestly? No. For stateless Q&A it's overkill. You need it when the assistant must remember user context across sessions or personalize over time.

Is Mem0 free? Genuinely yes — the core is Apache-2.0 and runs fully local (SQLite/Chroma + your LLM). Mem0 also sells a hosted platform, but the open-source version is complete for self-hosting.

Does Mem0 work with local LLMs? Yes — it supports Ollama and any OpenAI-compatible endpoint, so you can pair it with a fully local stack.

How were the star counts verified? I pulled them from the GitHub API myself on 2026-08-09: Mem0 62,836 ★ (Apache-2.0); Letta 24,153 ★; Zep 4,819 ★.

Summary

Mem0 (62,836 ★, Apache-2.0, verified 2026-08-09) is the default choice for adding memory to existing AI agents: add after conversations, search before answering, plug into your current framework. Letta for all-in-one agent+memory, Zep for temporal knowledge graphs. Pair it with Ollama for a fully local stack. Browse the full 461-tool catalog at ylyvip.net/tools. Thoughts? Tell me in the comments which memory setup you run.

Tools mentioned