What is a memory bank for coding agents?
Last updated
A memory bank is a set of Markdown files in your project that a coding agent reads at the start of every task and updates as it works, plus custom instructions that tell it to do so. The pattern was popularized by Cline's Memory Bank, which uses six files such as projectbrief.md, activeContext.md and progress.md, and community projects adapt it for Cursor. There is no service behind it: it's a documentation habit the agent follows. It works well for one project and one agent, and gets harder to keep accurate as the files grow or several agents edit them.
Where the idea comes from
Cline's documentation describes its Memory Bank as "a documentation methodology that transforms Cline from a stateless assistant into a persistent development partner," built "through structured markdown files." Its custom instructions start from a blunt premise: "my memory resets completely between sessions… I rely ENTIRELY on my Memory Bank."
The files in Cline's Memory Bank
Cline's version keeps these files in a memory-bank folder:
| File | What it holds |
|---|---|
projectbrief.md | The foundation document, with core requirements and goals |
productContext.md | Why the project exists, the problems it solves, UX goals |
activeContext.md | Current focus, recent changes and next steps; it "updates most frequently" |
systemPatterns.md | Architecture, design patterns, how components relate |
techContext.md | Tech stack, setup, constraints, dependencies |
progress.md | What works, what's left and known issues |
How it works
- You add the memory bank instructions to the agent's custom instructions or rules.
- At the start of a task, the agent reads every memory bank file.
- As it works, it updates the files. Saying "update memory bank" triggers "a full documentation review and update."
- When the context window fills up, Cline's docs suggest updating the memory bank, starting a new conversation, and saying "follow your custom instructions" so the new session reads the files again.
Memory banks in Cursor
Cursor has no built-in memory bank. People recreate Cline's pattern with Cursor's own tools: the instructions go in a rule (rules live in .cursor/rules), and the agent reads and updates a memory-bank/ folder. Community projects package this. The most-starred one we found, vanzan01/cursor-memory-bank (about 3,000 GitHub stars on October 31, 2026), describes itself as "a token-optimized, hierarchical task management system that uses Cursor 2.0 commands," where "each command reads from and updates a shared Memory Bank directory (memory-bank/)." Its author calls it "my personal hobby project," and the repository shows no license.
Cursor also had a feature called Memories, which it removed in version 2.1 in November 2025, pointing users to rules instead. See Cursor memory and Cursor rules.
What works well
- No service to run. It's files in your repository, under version control.
- Readable. You can open and edit every file yourself.
- A shared starting point. Every session begins from the same summary.
Where it gets hard
- It all loads, every time. Every file is read at the start of every task, so a growing memory bank costs more context in every session.
- Files drift. The agent rewrites summaries; details can be lost or contradicted, and old decisions can linger next to new ones.
- One project, one tool. The files live in one repository and are read through one tool's instructions. Another agent, or the same work in a chat app, doesn't see them unless you set it up again.
- Parallel agents collide. Two agents updating
activeContext.mdat once can overwrite each other.
Alternatives
- A short instruction file. Keep only what every task needs in CLAUDE.md, AGENTS.md or your tool's rules. See Keep CLAUDE.md short.
- A memory server. Store decisions and notes as many small entries the agent searches for when it needs them, instead of loading everything. Memlo is one, for Claude Code, Codex, claude.ai, ChatGPT and other MCP apps: every change is a version with its author,
edit_memoryrefuses a stale write instead of overwriting, and one memory is shared across agents and computers. Memlo's sign-in doesn't work from Cursor yet. - Both. Keep a short brief in files, and the long tail in a memory server.
Frequently asked questions
What is Cline Memory Bank?
A documentation method from Cline: six Markdown files in a memory-bank folder, plus custom instructions that tell Cline to read them at the start of every task and update them as it works.
Is a memory bank a plugin?
No. It's Markdown files and instructions. Some community projects package the instructions and templates, but nothing runs in the background.
Does a memory bank use more tokens?
Yes, as it grows: every file is read at the start of every task. Keep the files short, or move details somewhere the agent searches only when it needs them.
Can several agents share a memory bank?
Only if they all work in the same repository and follow the same instructions, and even then two agents can overwrite each other's updates. A memory server with conflict checks handles that case better.
Sources
Checked on October 31, 2026:
- Cline Memory Bank, Cline documentation
- vanzan01/cursor-memory-bank on GitHub
- Cursor rules, Cursor documentation
- Memlo: the setup page
Try Memlo
Memlo is invitation only for now. Join the waitlist and we'll email you when your invitation is ready.
Join the waitlist