From the team behind aidrop.it — one workspace to build, host, and keep changing your code.

AI agent memory is built from three layers: the context window (working memory inside one session), retrieval / RAG (looking facts up from external storage on demand), and persistent memory (a durable store of accumulated knowledge that survives across sessions and tools). Models ship with only the first. The other two are infrastructure you add — and they're what separates a chatbot from an agent that actually knows you.

What is AI agent memory?

Agent memory is any mechanism that gives a model information beyond its training data at the moment it works. Training data is frozen and general; memory is live and specific — your project, your preferences, your decisions. Without a memory layer, every session starts from zero, because the model itself stores nothing between calls.

The context window: working memory

The context window is the text the model can see right now — prompt, conversation, files. It's complete and instantly accessible, but temporary and capped: end the session and it's gone; outgrow it and older content gets compacted into lossy summaries. It's RAM, not a hard drive, and it's the only memory a raw model has.

Retrieval (RAG): looking things up

Retrieval-augmented generation stores knowledge outside the model and pulls in only the chunks relevant to the current task. Good retrieval is hybrid — keyword search plus semantic vectors, often reranked — because each method alone misses things. Retrieval is what lets a small context window tap an arbitrarily large knowledge base, paying tokens only for what's needed.

Persistent memory: knowledge that accumulates

Persistent memory is the durable layer: facts written during work that survive sessions, compaction, and tool switches. The hard problem isn't storing — it's curation. An append-only log of observations turns to noise; useful memory gets merged, deduplicated, and updated as facts change, more like a maintained wiki than a transcript. Deciding how to run that layer — build it on a vector DB, adopt a framework, or connect a hosted one — is its own build-vs-buy choice.

A memory layer that speaks MCP serves Claude Code, Codex, ChatGPT, and any other MCP client alike — one persistent layer under all your tools, rather than one per tool.

How the three layers work together

A well-built agent uses all three: persistent memory holds everything learned so far; retrieval pulls the few facts relevant to the current task; the context window holds those facts while the model reasons. Long-term knowledge stays out of the window until needed — which is also why this architecture is both cheaper and more accurate than stuffing everything into context. Assembling these layers well is the core of context engineering.

FAQ

Is RAG the same as agent memory? RAG is the read path — finding and injecting relevant facts. Full memory also needs a write path (capturing knowledge during work) and curation (keeping it correct over time).

Does fine-tuning give a model memory? Not practically. Fine-tuning bakes patterns into weights: expensive, slow to update, impossible to audit fact-by-fact. Memory should be editable and inspectable, like data, not weights.

What is MCP memory? Memory exposed through the Model Context Protocol, the open standard AI tools use to connect external services. MCP memory is tool-agnostic: every client that speaks the protocol shares the same store.

aidrop.it

One workspace to build, host, and keep changing your code

The repository, what the project knows, the rules a change has to follow, and the path to an address — kept together, and reachable by the coding agent your team already uses.