AI Memory and Curated Context

What is demand-driven context for AI agents?

Before generating a personalised outreach campaign for a segment of enterprise customers, an agent searches for relevant brand guidelines, previous campaign examples, and product documentation. It finds a great deal of relevant material. It doesn't find the contractual restriction on promotional messaging that applies to two of the accounts in the segment — because that restriction was never in a document it could reach.

The agent had good retrieval. It didn't have what it needed.

The campaign went out. Two accounts received promotional messaging they had contractually opted out of. The retrieval log showed everything the agent searched for. It showed nothing about what it didn't know to look for.

What Retrieval Optimises for

Standard retrieval — RAG over a document corpus — optimises for relevance. Given a query or a task, the system surfaces what is most semantically similar to what the agent is doing. That's a reasonable proxy for useful, and for many tasks it works well.

The gap is that relevance to the task and completeness for the task are different things. Retrieval can surface everything it has that relates to the agent's query and still leave out the one piece of knowledge that determines whether the output is correct. Not because the retrieval failed — because of a structural absence: the constraint was never encoded anywhere retrievable, or proximity-based search has no way to surface knowledge it wasn't asked for.

Retrieval is reactive and supply-bounded: it returns the best of what exists. It has no mechanism for identifying what the agent actually needs that isn't there.

What Demand-driven Context means

Demand-driven context inverts the sequence. Instead of the agent acting and retrieving as it goes, it interrogates its own knowledge gaps before it starts. What does this task require me to know? What do I have? Where are the gaps between the two?

That gap analysis produces a specific set of questions — not 'give me everything relevant to outreach campaigns', but 'do I have permission restrictions for this account segment, and if so, what are they?' The knowledge surfaced in response to those questions is what the agent actually needs, not just what the retrieval system happened to have.

The difference matters most for tasks with high stakes or narrow compliance windows. An agent that starts from a complete brief — including explicit acknowledgement of what it was asked and what it was given — is in a fundamentally different position from one that starts from a general retrieval pass and proceeds on the assumption that what came back was sufficient.

Retrieval as One part of a Larger Process

Demand-driven context doesn't replace retrieval. For most tasks, a retrieval pass over a document corpus remains part of assembling what the agent needs. What changes is the architecture around it.

In a demand-driven model, retrieval is one input into gap resolution, not the whole of context assembly. The agent's identified gaps shape what retrieval is asked to surface. Where retrieval comes back empty — where the gap is real and the knowledge doesn't exist anywhere retrievable — that absence is surfaced explicitly rather than silently proceeding as if it were filled.

Silent gaps are where most agent failures concentrate. The agent didn't know it didn't know. Demand-driven context makes the gap visible before execution begins.

Engramic's approach

How Engramic Approaches it

There are multiple ways to implement demand-driven context. This is one approach.

Engramic's agent onboarding process is built around this principle. Before an agent is deployed to a task, it maps what the task requires against what exists in the knowledge graph — identifying gaps not as retrieval failures but as explicit open questions. Those questions are surfaced for resolution: answered by the humans who hold the knowledge, authored into the graph, and available for the agent before it acts. What the agent carries into a task is a brief assembled from what was actually needed, not a retrieval pass over what happened to exist.