Memory
Why AI agents need persistent memory (and how to give them some)
Coding agents are astonishing for the length of one session and frustrating across many. The gap between those two experiences is memory.
If you've worked with an AI coding agent for more than a day, you've felt it. In a single session it's brilliant: it reads the code, follows your reasoning, makes a good call about which library to use, and explains why. Then the session ends, and the next one starts from zero. It re-reads the same files, re-derives the same conclusions, and sometimes cheerfully re-introduces a bug you already fixed together yesterday.
That's not a model quality problem. It's a memory problem, and it's structural.
Why agents forget
A language model is stateless. Each request is answered using only what's in its context window right now: the system prompt, your messages, and whatever files or tool results got loaded this session. When the session closes, none of that persists. The model doesn't have a diary. There is no "yesterday" for it to consult.
Your source code survives, of course, because it lives in git. But code is only half the story. The other half, why the code looks the way it does, mostly evaporates:
- The decision to use one approach over another, and the reasons behind it.
- The dead ends you already explored so nobody wastes time re-exploring them.
- The debugging trail that finally explained a flaky test.
- The handoff notes for whoever (or whatever) picks the task up next.
That context is exactly what a good teammate carries between sessions. Agents don't, unless you give them somewhere to keep it.
Why bigger context windows don't solve it
A reasonable objection: context windows keep growing. Won't a big enough window just hold everything? No, for a few reasons.
Windows are per-session, not persistent. A million-token window is still wiped when the session ends. Size doesn't create continuity.
Stuffing context is expensive and noisy. Re-loading a project's entire history into every session costs tokens and latency, and it buries the three facts that actually matter under thousands that don't. Models also attend less reliably to information in the middle of a very long context.
It doesn't cross tools or teammates. Even a perfect within-session memory is trapped in that one app, that one chat. The moment you switch from one agent to another, or a colleague's agent needs the same context, the window is useless.
What you actually want is not a bigger short-term memory. It's a small, durable, searchable long-term memory that any session can write to and read from on demand.
What a real memory layer looks like
Think about how a person works. You don't hold your entire project in your head. You keep notes, and you retrieve the relevant one when you need it. A memory layer for agents works the same way:
- Durable. Notes live outside any single session or context window, in storage that persists.
- Searchable. An agent retrieves only the notes relevant to what it's doing right now, by keyword, and ideally by meaning, instead of re-loading everything.
- Structured. Notes carry projects, statuses, and tags, so memory is organized the way work actually is, not one undifferentiated blob.
- Shared. The same memory is reachable from any MCP-compatible agent and by every teammate on the workspace, so context flows between tools and people, not just within one chat.
Crucially, this is a complement to git, not a replacement. Code stays in version control where it belongs. Memory holds the reasoning around the code: decisions, trails, and handoffs. Together they give an agent both the what and the why.
How to give an agent memory today
The clean way to do this is over the Model Context Protocol (MCP). An MCP memory server exposes a couple of tools, one to write a note, one to search, and any MCP client can call them. Your agent stores a decision the moment it's made and searches for relevant context the moment it needs it, all without you copy-pasting anything.
That's what Knownbase provides: a hosted MCP server for project memory, with upsert_note and search_notes (plus semantic search, revisions, and backlinks) available to whatever agent you use. Notes are scoped to your workspace, full-text and vector searchable, and portable. You can export everything at any time.
Once memory is in place, the next problem becomes a workflow one: how do you write a handoff the next session can actually use? We cover that in Agent handoffs.
Stop letting context evaporate between sessions
Knownbase gives your agents a durable, searchable memory over MCP. Store decisions and handoffs once; recall them from any agent. Free plan, no card required.
Create free workspace