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

Three kinds of "memory"

Conversation memory, project memory and a code index solve different problems.

  1. Conversation and agent memory

    Remember what happened across sessions.

  2. Project memory in your repo

    Decisions and conventions as plain files.

  3. Code knowledge graph

    Index the code so agents stop re-reading it.

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

ToolWhat it isStarsLicenseLast pushMaintenanceReleases, 90 daysCommits, 12 weeksInstall
lettaStateful agents with persistent, self-improving memory25.4kApache-2.02026-10-18Active0Commits, 12 weeks: 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0npm install -g @letta-ai/letta-code
mcp-memory-servicePersistent memory across AI sessions for MCP clients2.1kApache-2.02026-11-07Active30Commits, 12 weeks: 17, 72, 17, 50, 43, 33, 83, 59, 47, 59, 41, 85pip install mcp-memory-service
mexStructured project memory scaffold for AI coding agents with drift detection1.8kMIT2026-11-04Active8Commits, 12 weeks: 12, 182, 66, 95, 36, 51, 36, 32, 24, 90, 84, 2npx mex-agent setup
codebase-memory-mcpCode knowledge graph that cuts agent token use on codebases48.3kMIT2026-11-07Active12Commits, 12 weeks: 92, 153, 91, 86, 56, 139, 265, 218, 160, 163, 61, 34curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/mai…
gortexCode intelligence engine exposing a repo knowledge graph to coding agents2.0kn/a2026-11-07Active24Commits, 12 weeks: 180, 250, 227, 169, 113, 23, 337, 325, 160, 323, 969, 329OS=$(uname -s | tr '[:upper:]' '[:lower:]')
PrismerCloudMIT harness for long-running agents: context cache, memory, shared error-fix learning, task retry and messaging via SDK, CLI, MCP and a Claude Code plugin1.4kMIT2026-10-22Active9Commits, 12 weeks: 0, 0, 0, 0, 0, 0, 3, 0, 3, 2, 0, 0npm i @prismer/sdk
LycheeMemApache-2.0 memory framework for LLM agents with working, semantic and procedural stores on SQLite and LanceDB, plus MCP and an OpenClaw plugin1.1kApache-2.02026-08-06n/an/an/agit clone https://github.com/LycheeMem/LycheeMem.git
HeadroomLocal context compression with lossless verification and original retrieval79.1kApache-2.02026-11-07Active14Commits, 12 weeks: 77, 32, 30, 46, 24, 134, 141, 180, 54, 59, 61, 90python -m pip install --only-binary=:all: "headroom-ai[mcp]==0.43.1"
context-modeKeep raw tool output out of your agent's context window33.6kElastic License 2.02026-11-07Active30Commits, 12 weeks: 11, 11, 10, 10, 10, 9, 12, 13, 409, 872, 574, 139npm install -g context-mode
aoci-codeGit-versioned map of your codebase written by your coding agent and served by a local MCP server; FSL-licensed, source-available1.9kn/a2026-11-07Active26Commits, 12 weeks: 14, 9, 24, 19, 30, 19, 7, 19, 59, 0, 98, 52git 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