Top 10 GitHub Repos for AI Agent Memory in 2026 (Verified)
The 10 best open-source AI agent memory repos on GitHub in 2026, verified with live stars and licences, plus how to choose one your team can trust.

The most-starred open-source AI agent memory repos on GitHub in November 2026 are Mem0, Cognee, Graphiti, Supermemory, Letta, Memori, MemOS, Basic Memory, MCP Memory Service and LangMem. Choose by whether facts change over time, who must audit the memory, where data must live, how many agents share it, and the licence.
On this page
- Key takeaways
- What is AI agent memory, and why does it matter now?
- What are the top 10 GitHub repos for AI agent memory in 2026?
- Do you need a memory layer, or is RAG enough?
- How do you choose the right agent memory repo?
- Why is memory the hard part of building a reliable AI agent?
- What should you do next?
- Frequently asked questions
Key takeaways
- AI agent memory lets an agent store, update and recall information across sessions instead of starting from zero each time.
- Mem0 leads on GitHub stars (69,253 on 20 Nov 2026), followed by Cognee, Graphiti and Supermemory.
- Pick by your data, not by stars: time-aware facts, auditability, data residency, multi-agent scoping and licence matter most.
- Vendor benchmark scores aren’t comparable; test memory on your own workflows before trusting it.
- Reliability comes from the wiring: sourced, dated, human-correctable memory with monitoring around it.
Ask most AI agents what you told them last Tuesday and you’ll likely get the polite blank stare of a goldfish with a law degree. Smart, articulate, and completely unaware that you’ve met before.
That’s the problem agent memory solves. AI agent memory is the layer that lets an agent store, update and recall information across sessions, so it can remember people, past decisions and how a job is done, instead of starting from zero every time the context window resets.
The open-source world has been busy here. We pulled every repo on this list from the GitHub API on 20 November 2026, read each README, and checked who is still shipping. Star counts below are a snapshot from that day. They tell you about attention, not quality, so treat them like restaurant queues: interesting, not decisive.
What is AI agent memory, and why does it matter now?#
AI agent memory is persistent storage plus the logic that decides what to keep, what to update and what to bring back into the model’s context. A large context window is not memory. It’s a very big desk that gets cleared every night.
The idea went mainstream with the 2023 MemGPT paper from UC Berkeley, which borrowed a trick from operating systems: move information between fast memory (the prompt) and slow memory (external storage) so the model looks like it has far more room than it does. Since then, research has focused on harder questions. Can memory handle facts that change? Can it tell what happened when? Benchmarks such as LongMemEval now test exactly that, scoring systems on information extraction, multi-session reasoning, temporal reasoning, knowledge updates and knowing when to say "I don’t know".

It matters now because agents have moved from demos to doing jobs. A support agent that forgets a customer’s open refund is not just annoying. It’s a second refund.
What are the top 10 GitHub repos for AI agent memory in 2026?#
Here’s the shortlist, sorted by stars on the day we checked. Every repo below is public, not archived, and had commits within the last two months.
| # | Repo | Stars (20 Nov 2026) | Licence | Best for |
|---|---|---|---|---|
| 1 | mem0ai/mem0 | 69,253 | Apache-2.0 | Drop-in memory layer for apps and agents |
| 2 | topoteretes/cognee | 33,422 | Apache-2.0 | Self-hosted knowledge-graph memory |
| 3 | getzep/graphiti | 32,947 | Apache-2.0 | Facts that change over time |
| 4 | supermemoryai/supermemory | 31,675 | MIT | Memory plus RAG and connectors in one API |
| 5 | letta-ai/letta | 25,496 | Apache-2.0 | Stateful agents (the MemGPT lineage) |
| 6 | MemoriLabs/Memori | 17,601 | Custom (see repo) | Memory on top of your existing database |
| 7 | MemTensor/MemOS | 12,456 | Apache-2.0 | A full "memory operating system" |
| 8 | basicmachines-co/basic-memory | 4,635 | AGPL-3.0 | Human-readable Markdown memory via MCP |
| 9 | doobidoo/mcp-memory-service | 2,137 | Apache-2.0 | Shared memory across multi-agent pipelines |
| 10 | langchain-ai/langmem | 1,776 | MIT | Memory for LangGraph agents |

1. Mem0: the memory layer most teams try first
Mem0 describes itself as "the memory layer for AI agents", and with 69,253 stars it’s the crowd favourite by a distance. It keeps user, session and agent state, and its 2025 paper laid out the extract, consolidate and retrieve pipeline, plus a graph-based variant. The April 2026 algorithm update moved to add-only extraction with semantic, keyword and entity matching fused together. One honest note from the README itself: headline benchmark scores come from the managed platform, and open-source users should expect different numbers.
2. Cognee: turn documents and chats into a graph you own
Cognee turns documents, code and conversations into a self-hosted knowledge graph that agents can search and reuse. The pitch that caught our eye: it can run locally on small CPU models, with no API key needed. It’s a strong fit when you want a "company brain" that links a decision to the discussion behind it.
3. Graphiti: memory that knows when something was true
Graphiti, from the team behind Zep, builds temporal context graphs. Every fact gets a validity window, so the agent knows that a customer was on the monthly plan and is now on annual. That sounds small until you’ve watched an agent confidently quote last quarter’s pricing. The design is written up in the Zep paper.
4. Supermemory: memory, RAG and connectors in one box
Supermemory bundles fact extraction, user profiles, hybrid search and connectors for tools like Google Drive, Gmail and Notion. It can also run locally as a single binary. Its README claims top spots on LongMemEval, LoCoMo and ConvoMem. Keep reading before you take any vendor’s leaderboard at face value.
5. Letta: the MemGPT lineage, now built around agents
Letta, formerly MemGPT, is where the "LLM as operating system" idea grew up. Heads-up: the README says active development has moved to letta-ai/letta-code, and the old V1 API server is archived on a branch. If you’re starting fresh, start there.
6. Memori: memory from what agents do
Memori focuses on turning agent actions and conversations into structured, persistent state, and it plugs into the datastores you already run. Check the licence file before you ship: GitHub doesn’t detect a standard licence for this repo.
7. MemOS: a full memory operating system
MemOS treats memory as a managed system resource, with a unified API to add, retrieve, edit and delete memories, multi-modal support and natural-language correction. The MemOS paper argues that RAG alone is "a stateless workaround without lifecycle control". Ambitious, and the heaviest option here.
8. Basic Memory: plain Markdown your team can actually read
Basic Memory stores everything as Markdown files that both humans and AI can read and edit, served over the Model Context Protocol. We love this for one reason: you can open the memory and see what the agent believes. Note the AGPL-3.0 licence if you plan to embed it in a product.
9. MCP Memory Service: shared memory for agent teams
mcp-memory-service is a self-hosted backend with REST, MCP and a knowledge graph with typed edges such as "causes" and "fixes". It tags memories by agent ID, which helps when several agents share one brain and you need to know who wrote what.
10. LangMem: memory for LangGraph builders
LangMem from LangChain gives agents tools to save and search memories mid-conversation, plus a background manager that consolidates knowledge. If you already build on LangGraph, it’s the shortest path.
Honourable mention: LightRAG (40,778 stars) is a fast graph-based retrieval system rather than a memory layer, but plenty of teams use it as one.
Do you need a memory layer, or is RAG enough?#
Retrieval-augmented generation (RAG) is enough when your agent only needs to look things up in documents that rarely change, like a policy handbook. A memory layer earns its keep when the agent must learn from its own work: who it spoke to, what it promised, which exceptions a manager approved.
The simplest test is this. If the answer to "what’s true?" depends on what happened yesterday, you need memory. If it only depends on what’s written in the handbook, RAG will do, and it’s cheaper to run and easier to debug.
Many teams end up with both, and several repos above (Supermemory and Cognee in particular) blur the line on purpose. That’s fine. Just be clear which store is the source of truth when they disagree, because sooner or later they will.
How do you choose the right agent memory repo?#
You choose by matching the repo to what your agent must remember and who must be able to check it. Stars won’t make this decision for you. These five questions will:
- Do facts change? Prices, owners and statuses change constantly. Pick something with time-aware memory, like Graphiti or Mem0’s temporal retrieval.
- Who needs to audit it? If a human must review what the agent "knows", readable storage (Basic Memory) or an inspectable graph beats an opaque vector store.
- Where must data live? Regulated teams should shortlist the self-hosted options: Cognee, MCP Memory Service, MemOS local mode or Supermemory local.
- How many agents share it? Multi-agent setups need scoping by agent and user, or one agent’s notes leak into another’s work.
- What’s the licence? AGPL and custom licences are fine for internal tools and a conversation with legal for anything you sell.
One more warning about benchmarks. Mem0, Supermemory and MemOS all publish strong LoCoMo and LongMemEval scores in their READMEs, and they can’t all be first at once. Each runs its own setup. Test on your own data. Benchmarks like LoCoMo are useful, but they measure conversations, not your invoice queue.
Why is memory the hard part of building a reliable AI agent?#
Memory is the hard part because a wrong memory is worse than no memory. An agent with amnesia asks again. An agent with a stale or poisoned memory acts, confidently, on something that stopped being true.
When we build specialised agents at Incube, memory is the piece we test hardest, before prompts, before tools. In practice that means a few unglamorous habits:
- Scope memory to the job. A support resolution agent needs customer history and policy. It does not need to remember last month’s small talk.
- Give every fact a source and a date. If the agent can’t say where a belief came from, a human can’t verify it.
- Let humans correct it. Ops leads should be able to fix a wrong memory in seconds, not file a ticket.
- Monitor drift. We watch for memories that contradict each other, the same way you’d watch an error rate, and we keep a way to stop the agent fast (see our guide to the AI agent kill switch).
Any repo on this list can be the engine. The reliability comes from the wiring around it: the tests, the checks, and the human who stays in control. That’s the difference between a clever demo and an inbox triage agent you’d trust with Monday morning.
What should you do next?#
Pick one workflow where forgetting costs you real money or goodwill, like repeat questions from the same customer or an approval rule that lives in one person’s head. Then ask your team a simple question: what would this agent need to remember, and who would check that it remembered correctly? Our 5-step task audit is a good way to run that conversation.
If you’d rather have a specialised agent built, tested and run for you, with memory you can inspect, that’s what we do at Incube.
Frequently asked questions#
What is AI agent memory?
AI agent memory is the persistent storage and logic that lets an AI agent keep, update and recall information across sessions. It covers past events, stable facts about people and accounts, and learned procedures. Unlike a context window, which is cleared after each session, memory survives, so the agent can build on earlier work instead of starting over.
Which open-source AI memory repo has the most GitHub stars?
Mem0 (mem0ai/mem0) had the most stars of the agent memory repos we checked, with 69,253 on 20 November 2026. Cognee, Graphiti and Supermemory followed with roughly 32,000 to 33,000 each. Stars reflect developer attention rather than quality, so test any option on your own workflow before adopting it.
Is RAG the same as agent memory?
No. Retrieval-augmented generation looks up information in a fixed set of documents. Agent memory also learns from the agent’s own interactions, updating facts when they change and recording what happened and when. RAG suits static knowledge like policies. Memory suits anything that depends on recent events, such as customer history or approved exceptions.
Is Letta the same as MemGPT?
Yes. Letta was formerly called MemGPT, after the 2023 UC Berkeley paper that introduced virtual context management for LLMs. According to the letta-ai/letta README, active development now happens in the letta-ai/letta-code repository, and the older V1 API server is kept on an archive branch for reproducibility.
How do you make AI agent memory reliable for business use?
Scope memory to the job, store a source and date with every fact, let humans review and correct memories, and monitor for contradictions and drift. Test memory on real workflows rather than relying on vendor benchmarks. This is how Incube approaches the specialised agents it builds, keeping a human in control of what the agent believes.
Put your first agent to work
Start with one workflow, clear guardrails and a measured pilot. We handle the audit, the build and the running.
Start a Pilot

