Best Memory Tools for AI Agents and Coding Assistants
Most AI assistants forget everything when the context window fills up or a new session starts. Memory tools fix that in different ways: some store facts from conversations, some keep a structured picture of your project, and some index your code so the agent can look things up instead of reading whole files.
Decide which kind of memory you need before you compare. The tools below fall into three groups: agent memory frameworks, memory for coding assistants, and code-intelligence graphs.
AgentIndex · Updated 2026-10-20
Conversation memory, project memory and a code index solve different problems.
- Conversation and agent memory
Remember what happened across sessions.
Quick picks
- letta — a platform for stateful agents with persistent, self-improving memory; the most established option here.
- mcp-memory-service — persistent memory across AI sessions for MCP clients; pick it if you want one memory shared between clients.
- mex — structured project memory scaffold for coding agents, with a CLI that detects drift between memory and code.
- codebase-memory-mcp — indexes a codebase into a knowledge graph so agents use fewer tokens exploring it.
- LycheeMem — memory framework with working, semantic and procedural stores on SQLite and LanceDB; a young project.
- Headroom — open-source semantic context compressor and memory persistence proxy that keeps agent runs fast and cheap.
Side-by-side comparison
| Tool | What it is | Stars | License | Last push | Maintenance | Releases, 90 days | Commits, 12 weeks | Install |
|---|---|---|---|---|---|---|---|---|
| letta | Stateful agents with persistent, self-improving memory | 25.4k | Apache-2.0 | 2026-10-18 | Active | 0 | npm install -g @letta-ai/letta-code | |
| mcp-memory-service | Persistent memory across AI sessions for MCP clients | 2.1k | Apache-2.0 | 2026-11-07 | Active | 30 | pip install mcp-memory-service | |
| mex | Structured project memory scaffold for AI coding agents with drift detection | 1.8k | MIT | 2026-11-04 | Active | 8 | npx mex-agent setup | |
| codebase-memory-mcp | Code knowledge graph that cuts agent token use on codebases | 48.3k | MIT | 2026-11-07 | Active | 12 | curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/mai… | |
| gortex | Code intelligence engine exposing a repo knowledge graph to coding agents | 2.0k | n/a | 2026-11-07 | Active | 24 | OS=$(uname -s | tr '[:upper:]' '[:lower:]') | |
| PrismerCloud | MIT harness for long-running agents: context cache, memory, shared error-fix learning, task retry and messaging via SDK, CLI, MCP and a Claude Code plugin | 1.4k | MIT | 2026-10-22 | Active | 9 | npm i @prismer/sdk | |
| LycheeMem | Apache-2.0 memory framework for LLM agents with working, semantic and procedural stores on SQLite and LanceDB, plus MCP and an OpenClaw plugin | 1.1k | Apache-2.0 | 2026-08-06 | n/a | n/a | n/a | git clone https://github.com/LycheeMem/LycheeMem.git |
| Headroom | Local context compression with lossless verification and original retrieval | 79.1k | Apache-2.0 | 2026-11-07 | Active | 14 | python -m pip install --only-binary=:all: "headroom-ai[mcp]==0.43.1" | |
| context-mode | Keep raw tool output out of your agent's context window | 33.6k | Elastic License 2.0 | 2026-11-07 | Active | 30 | npm install -g context-mode | |
| aoci-code | Git-versioned map of your codebase written by your coding agent and served by a local MCP server; FSL-licensed, source-available | 1.9k | n/a | 2026-11-07 | Active | 26 | git clone https://github.com/aoci-spec/aoci-code.git |
Tools in this list with an in-depth AgentIndex review: 10/10
How to choose
- Separate conversation memory from project memory and from code indexing. They solve different problems.
- Check where memories are stored. Local SQLite or files keep data on your machine; hosted services send it elsewhere.
- Look for MCP support if you want the same memory across Claude, Cursor and other clients.
- Stored memory can contain sensitive conversation content, so check how to inspect, edit and delete it.
- Younger projects change fast; check the last-push date and whether the API is still moving.
FAQ
What is the difference between agent memory and RAG?
RAG retrieves from a fixed document collection to answer a question. Agent memory records what happened in conversations and work over time, such as preferences, decisions and past mistakes, so the agent can use it later. Some tools combine both.
Where is the memory stored?
It depends on the tool. Several here keep data locally in SQLite or files, while hosted offerings store it on their servers. Check the project's README for the storage location before you put personal or company data into it.
Do coding agents need a code knowledge graph?
Not for small projects. On large repositories, an index or knowledge graph lets the agent look up the relevant functions instead of reading whole files, which can cut token use and speed up answers.
How can I prevent context overflow and memory degradation in long-running agent sessions?
Instead of dumping entire chat transcripts into prompt context, use a hybrid memory strategy: tools like Headroom compress verbose tool outputs into semantically dense summaries, while Letta (MemGPT) separates core working memory from archival storage.
How we compiled this list
Tools are chosen by hand from the projects in our index, favouring those we have reviewed in depth. Stars, licence, last-push date and install command come from each repository and are refreshed with the site data. The maintenance column comes from the GitHub API (archived flag, last commit, releases in the last 90 days) and is refreshed daily. We read each project's README and docs; we have not run every tool ourselves, so test before you depend on one.
More lists
- Open-Source Multi-Agent Frameworks: CrewAI, Pydantic AI, Google ADK, Microsoft Agent Framework & More
- Self-Hosted AI Workflow Automation & Durable Execution: n8n, Activepieces, Temporal, Conductor & More
- Open-Source RAG Platforms & Deep Research Agents: RAGFlow, MaxKB, GPT Researcher, DeerFlow & More
- SDKs, Frameworks & Official Reference Servers for Building with MCP
- Best MCP Servers for Databases
- Best MCP Servers for Browser Automation