
An XDA writer gave Claude Code persistent memory between sessions and their whole workflow changed. That’s the kind of quiet upgrade that reads small and lands big — most agentic coding tools forget everything the moment you close the terminal, so the developer becomes the memory. Persistent memory closes that gap. We tested seven AI coding agent memory apps for desktop that give agents recall across sessions, projects, and machines.
Every option here works on Windows, macOS, and Linux. Some are libraries that plug into a custom agent; some are hosted services with an API. Two are memory features built into existing coding tools.
What to look for in an agent memory layer
The label “agent memory” hides three different things:
- Episodic memory: what happened last session (“we tried Vitest but hit a peer-dep issue”).
- Semantic memory: durable facts about the project (“this repo uses Deno v1.45, not Node”).
- Procedural memory: workflows (“when the user asks for a refactor, always run prettier first”).
The best stacks separate these three and let you edit each. Others store one big pile of text and hope the agent finds the relevant parts.
Other axes that matter for coding agents:
- Self-hostable vs SaaS. Code memory contains proprietary information; a lot of teams need on-prem.
- Model-agnostic vs locked in. mem0, Letta, Zep, and Cognee work across models. Cursor and Windsurf memories are locked to their own tools.
- Structured recall. Vector search alone misses “the last time we tried X”; graph or event stores handle it better.
Quick comparison
| Tool | Best for | Free plan | Starting price | Standout |
|---|---|---|---|---|
| mem0 | Drop-in memory API for any LLM agent | Yes, generous | Free tier | Layered memory (user, session, workspace) |
| Letta | Model-agnostic agent framework with memory | Yes, open-source | Free (self-host) | MemGPT-style paging and archival memory |
| Zep | Long-term memory with graph store | Yes, open-source | Free tier | Temporal knowledge graph, fact updates |
| Cognee | Semantic memory pipeline for agents | Yes, open-source | Free (self-host) | Ontology-first, RDF-friendly |
| Claude Code memory | Native persistent memory for Claude Code | Included | Anthropic pricing | Auto-summarised session memory |
| Cursor Memories | Project-level memory inside Cursor | Included | Cursor Pro from $20 | Auto-captured “rules” per repo |
| Windsurf Memories | Cascade agent’s persistent context | Included | Windsurf Pro from $15 | Cross-file semantic recall |
The 7 agent memory apps we tested
1. mem0 — best drop-in memory API for any LLM
mem0 is the easiest way to add persistent memory to a coding agent that doesn’t already have one. The API accepts a user id and a message stream and returns a curated memory list on every call. The layered memory model (user, session, workspace) means the agent remembers “this project uses Vitest” separately from “this user prefers TypeScript strict mode.” The Python and TypeScript SDKs both hit v1 in 2026.
Where it falls short: SaaS model by default; self-hosted is possible but community-maintained. Vector store defaults may need swapping for large codebases.
Pricing: Free tier with a monthly memory quota. Pro from around $19/month.
Platforms: Windows, macOS, Linux (via SDK or hosted API).
Download: mem0.ai
Bottom line: The pick when you’re building your own agent and want memory in 10 lines of code. Not the pick for regulated environments needing full on-prem.
2. Letta — best MemGPT-style agent framework
Letta (formerly MemGPT) implements the paging model where the agent moves facts between an in-context “working memory” and an archival store as needed. Fully open source, self-hostable, and model-agnostic. Ships with an agent server so you can point Cursor or a custom CLI at it and let it manage memory transparently.
Where it falls short: Setup is heavier than mem0. Requires you to run a Postgres or SQLite backend and understand the paging model to tune it.
Pricing: Free, open-source. Managed cloud pricing on request.
Platforms: Windows, macOS, Linux.
Bottom line: The pick for teams that need on-prem memory and can invest a day in setup. The paging model handles very long conversations gracefully.
3. Zep — best graph-based long-term memory
Zep stores memory as a temporal knowledge graph. When facts change (an API endpoint moves, a config value gets updated), Zep tracks the change instead of stacking contradicting statements. That is the memory model coding agents need most, since project facts drift constantly.
Where it falls short: The graph store shines on semantic recall but adds complexity for pure episodic use cases. The pricing gap between community and cloud is steep.
Pricing: Community edition is free, open-source. Cloud from $34/month.
Platforms: Windows, macOS, Linux.
Download: getzep.com · GitHub
Bottom line: The pick when your project facts change often and you want the memory layer to update, not append. Best fit for agentic dev-ops or infra work.
4. Cognee — best ontology-first memory pipeline
Cognee goes further into the semantic side. It builds an ontology from your codebase and conversations, then retrieves along typed relationships. If your agent needs to reason “which files depend on this schema,” Cognee is closer to a knowledge graph than a memory store.
Where it falls short: The ontology-first model is overkill for casual use. Requires ontology tuning to shine.
Pricing: Free, open-source. Managed offering is early-access.
Platforms: Windows, macOS, Linux.
Bottom line: Pick this when memory needs to model relationships (dependencies, schema evolution) rather than plain notes.
5. Claude Code memory patterns — native session persistence for Claude Code
Claude Code now supports persistent project-level memory via CLAUDE.md files plus a memory bank pattern. Sessions auto-summarise their decisions into the memory file, and the agent reads that file on startup. It’s not a hosted memory service, but it’s the shortest path to “this agent remembers what we did last week” if you’re already using Claude Code.
Where it falls short: No cross-project graph, no querying, no editing UI beyond a plain-text file. It’s a convention, not a system.
Pricing: Included with Claude Code (Anthropic pricing).
Platforms: Windows, macOS, Linux.
Download: claude.com/code
Bottom line: The lowest-friction pick if you already use Claude Code. Graduate to mem0 or Letta when the memory file gets too big for a human to skim.
6. Cursor Memories — project-level memory in Cursor
Cursor Memories capture the rules and preferences the editor’s Composer picks up as you work. Rename a variable, and Cursor remembers the naming convention. Reject a suggested refactor twice, and it stops suggesting that pattern. All memory is per-repo, so switching projects doesn’t leak style.
Where it falls short: Locked to Cursor. No export path. Memory transparency is limited; users can see and edit rules but can’t inspect the full memory embedding.
Pricing: Included in Cursor Pro ($20/month).
Platforms: Windows, macOS, Linux.
Download: cursor.com
Bottom line: The pick when Cursor is already your editor. Not worth switching to Cursor for the memory alone.
7. Windsurf Memories — Cascade's persistent context
Windsurf’s Cascade agent has its own memory system that persists rules, preferences, and workflow patterns across sessions. Cross-file semantic recall is stronger than Cursor’s, and the memory model handles multi-repo mono-repos better in the tests we ran. Free tier includes basic memory, Pro unlocks the durable store.
Where it falls short: Locked to Windsurf. Cascade agent’s memory feels less polished than the core editor experience.
Pricing: Free tier with basic memory. Pro from around $15/month.
Platforms: Windows, macOS, Linux.
Download: windsurf.com
Bottom line: The pick if you’re already on Windsurf and want the durable memory tier. Not a reason to switch editors on its own.
How to pick the right one
- Building your own agent and want memory in an afternoon: mem0.
- Building your own agent and need on-prem: Letta or Zep (graph) or Cognee (ontology).
- Using Claude Code and want the shortest path: Claude Code memory patterns.
- Using Cursor or Windsurf as your daily driver: use their built-in memories, and swap in mem0 or Letta if you outgrow them.
For the XDA-style “my setup started running itself” experience: start with the memory that ships with your current editor, then layer a graph store (Zep) once the plain-text memory file gets unwieldy.
FAQ
What is the best free AI agent memory tool? mem0 has the most generous free tier for a hosted API. For fully open-source and self-hosted, Letta and Zep community edition are the picks.
Can I use these with Claude, GPT-5, and Gemini interchangeably? Yes for mem0, Letta, Zep, and Cognee. Cursor and Windsurf memories are locked to their own editor’s models.
Does agent memory leak between projects? With mem0 and Letta, only if you configure it that way. Cursor and Windsurf keep memory per-repo by default.
Do these run offline? Letta, Zep, and Cognee can be fully self-hosted with local models. mem0 defaults to SaaS; self-hosting is community-maintained. Cursor and Windsurf memories require cloud connection.
Is Claude Code’s native memory enough? For solo projects, usually yes. For team projects with rotating contributors, layer a hosted memory (mem0 or Zep) so everyone shares the same recall.