Is Memory Part of Context Engineering?
The Detailed Answer
Context engineering is the practice of deciding what goes into the context window on each call, and its techniques group into four strategies: write information out of the window, select the relevant part back in, compress what stays, and isolate context across calls. Memory is precisely the write and select strategies applied to information that the system accumulates over time rather than information that arrives pre-written in documents. When a system stores a fact a user stated and recalls it in a later session, it is writing then selecting, which are core context-engineering moves. Memory is therefore not adjacent to context engineering, it is one of its components.
The reason memory deserves its own name within the discipline is the kind of information it handles. Most context sources are either authored, the system prompt, or external and static, a document corpus. Memory handles information that is dynamic and self-generated: what a specific user told you, what an agent learned during a task, which facts have been confirmed or contradicted over many interactions. This information does not exist in any document and is not known at design time, so it has to be captured as it arises and recalled when relevant. That capture-and-recall job is the memory layer, and without it a system resets to blank at the start of every session no matter how good its document retrieval is.
How Memory Implements the Strategies
The write strategy in a memory system means persisting durable facts outside the window. At the end of a session or a task, the system extracts what is worth keeping, a stated preference, a decision, an outcome, and stores it so a future window can include it. This is the same write principle a scratchpad uses within a task, extended across sessions. The select strategy means querying that store for the facts relevant to the current request and placing only those in the window, the same precision-of-inclusion that makes document retrieval work, applied to accumulated facts.
Done well, memory also raises relevance density, the central objective of context engineering. Rather than replaying an entire conversation history to remind the model what the user said, a memory layer surfaces the two or three specific facts that bear on the current request and leaves the rest in storage. This is far more token-efficient than carrying full history forward, and it scales: a user with years of history still contributes only the handful of relevant facts to any given window. Memory is how a system carries knowledge across time without drowning every window in the past.
Why This Matters for Building Systems
Treating memory as part of context engineering, rather than as a separate feature, changes how you design. It means your memory layer is held to the same standard as the rest of your context pipeline: it must select with precision, stay within budget, and raise relevance density rather than lower it. A memory system that dumps everything it has stored into the window on every call is failing at context engineering exactly the way a retrieval system that returns fifty passages is. The job is the same, bring in what matters and leave out what does not, applied to a different source.
This is the design philosophy behind Adaptive Recall. It stores facts with confidence scores that rise as information is independently corroborated and fall when it is contradicted, so the select step can prefer well-supported memories and avoid pulling stale or conflicting ones into the window. Because memories are scored and queried by relevance, the layer brings back the few facts that matter for a request and leaves the rest in storage, which is relevance density pursued through the persistent half of the pipeline. The broader role of memory in applications is covered in the AI memory pillar, and the system design behind it in memory architecture.
Memory is the persistent half of context engineering: it writes accumulated facts out of the window and selects the relevant ones back in across sessions. Held to the same relevance-density standard as the rest of the pipeline, it is what lets a system carry knowledge across time without bloating every window.
What Memory Adds That Other Sources Cannot
It is worth being precise about why a system needs memory as a distinct source rather than folding its job into document retrieval or a long conversation history. Document retrieval cannot do memory's job because the information memory handles does not exist in any document, it is generated by the interactions themselves and must be captured as it arises. A long conversation history cannot do memory's job either, because history is bound to a single session and is expensive to carry forward in full, while memory persists across sessions and surfaces only the relevant facts. Memory occupies the specific niche of information that is self-generated, durable, and needed selectively, which neither static documents nor in-session history covers.
Memory also adds something the other sources structurally lack: a model of reliability over time. A document is as authoritative as its source, and a conversation turn is simply what was said, but an accumulated fact can be confirmed by later interactions or contradicted by them, and a memory layer can track this. That tracking lets the selection step prefer facts that have held up over facts that have been challenged, which is a quality dimension that plain retrieval over documents or history does not have. This is why a memory layer is not just a place to dump conversation summaries but a distinct component with its own logic for storing, scoring, and reconciling what the system knows.
Designing Memory as Part of the Pipeline
Because memory is a context source, it should be designed against the same constraints as the others: a token budget, a selection step, and observability. The budget means memory gets a fixed allocation of the window and must return its most relevant facts within it, not everything it holds. The selection step means memory needs ranking and filtering of its own, so the facts it surfaces are the ones that bear on the current request, ordered by relevance and reliability. Observability means you can see which memories entered a given window and judge whether they helped, so you can improve recall the same way you improve document retrieval.
Designed this way, memory slots into the context pipeline as a peer of document retrieval and history, each contributing its allocation to the assembled window. This is the design behind Adaptive Recall, which exposes memory as a queryable, scored source that returns relevant facts within a budget rather than a raw store you have to manage by hand. Treating memory as a first-class pipeline component, rather than an afterthought bolted onto a vector database, is what keeps it raising relevance density instead of lowering it, and it is the difference between memory that helps and memory that floods the window with stale recollections.