Best AI Memory for Gemini CLI (2026)
Gemini CLI's memory is GEMINI.md — hierarchical context files you maintain by hand, loaded whole into every session. Six ways to give Gemini CLI persistent memory that auto-updates, recalls by meaning, and follows you across projects and tools — evaluated honestly.
The quick answer
If you want Gemini CLI to remember across projects and sessions without you maintaining context files: Ricord, installed as an MCP server. If you like hand-curating exactly what the model sees: GEMINI.md and the /memorycommand. If you're building agents on top of Gemini: Letta. The matrix below spells out the rest.
Why this matters for Gemini CLI specifically
Gemini CLI's memory model is GEMINI.md— a hierarchy of markdown context files (global, project, directory) that get loaded into the model's context, plus the /memorycommand to inspect and append to them. It's clean and transparent, and for stable project context it's great. But it's manual: you write and curate the files, the whole document loads into context every session regardless of relevance, and none of it carries semantic recall, a graph, or reach beyond Gemini CLI into your other tools.
The fixes cluster into six approaches that differ on a handful of axes — install effort, whether memory auto-updates, semantic recall vs whole-file loads, wiki browsability, cross-tool reach, conflict resolution, and cost.
The decision matrix
Eight criteria, six options. The two Gemini-native approaches (GEMINI.md context files and in-session transcript context) are evaluated separately because they answer different problems.
| Criterion | Ricord | Mem0 | Letta | Supermemory | GEMINI.md | Session context |
|---|---|---|---|---|---|---|
| MCP server install (one config block) | Limited | |||||
| Survives across separate projects/sessions | Per-dir files | |||||
| Auto-updates (no markdown to maintain) | Manual | |||||
| Semantic recall (not a whole-file context load) | Loads whole files | Whole transcript | ||||
| Browsable wiki + knowledge graph | Pro only | Raw markdown | ||||
| Same memory in Claude Desktop / Cursor / ChatGPT | API only | |||||
| Conflict resolution (old facts superseded) | Basic | Manual edits | ||||
| Cost (smallest paid tier with memory) | $12/mo annual | $249/mo for graph | Self-host + LLM | $29/mo | $0 (manual) | $0 (built in) |
Slot-by-slot — which fits you
If you run Gemini CLI across many projects
Ricord is built for this — add it as an MCP server once and every Gemini CLI session reads and writes the same memory, scoped per project automatically. No GEMINI.md to grow and prune by hand; the model saves and recalls through the MCP tools, and you get a browsable wiki of what it learned across all your projects.
If you keep one tidy GEMINI.md per project
GEMINI.mdis genuinely good for stable, curated context — architecture notes, conventions, the commands that matter. It's versioned in git and fully transparent. The cost is upkeep and bloat: it goes stale when you forget to update it, and the entire file loads into context every session whether it's relevant to the task or not.
If you're building an agent product on top of Gemini
Lettaships an agent runtime with memory built in. If you're already writing orchestration code, the integrated model is cleaner than wiring memory as a separate service. For memory inside Gemini CLI itself, it's overkill.
If retrieval quality is your edge and you want OSS
Mem0open-source is the right pick. Apache-licensed, vector-first, forks cleanly. You'll invest real engineering to get it production-ready, worth it if memory retrieval is your product. When OSS wins →
If Gemini CLI is one of several AI tools you use
A hosted layer wins here. Ricord keeps one memory every tool reads — what you teach Gemini CLI is live in Claude Desktop, Cursor, and Codex too. A GEMINI.md, by definition, only exists where you put the file.
Why Ricord wins for most Gemini CLI users
- It's GEMINI.md, automated. Same outcome — Gemini remembers your project — without you authoring and pruning the markdown. It extracts and updates as you work.
- Semantic recall, not a whole-file load. The model pulls the few facts relevant to the task instead of loading entire context documents into the window every session.
- One memory across projects and tools. Scoped per project, browsable as a wiki + knowledge graph, and reachable from Claude Desktop, Cursor, and Codex via the same MCP server.
bun add -g ricord ricord login ricord install # auto-detects Gemini CLI, Claude Code, Cursor, Codex
Restart Gemini CLI so it loads the MCP server. Ask it to remember something in one session; recall it in the next, or in a different project. The wiki populates as you work.
Getting started
Pick the option that matches your slot. If it's Ricord, the three commands above get you running. If it's GEMINI.md, you're already set up — just keep the files current. The signal that you picked right is whether you've stopped re-explaining the same context to Gemini after a week.