Agent memory

Recall what matters.

Agent memory is how an agent keeps what it knows without carrying it in the prompt. Coresource holds intent, state, evidence and decisions in one authoritative world-model, and each step reads a focused slice of it rather than an ever-growing transcript.


Recall

Targeted execution

Every step is assembled fresh, against a token budget.

Candidates are scored by how specifically they match the step in hand, how many provenance hops away they sit, and how current they are. The list is then truncated to fit the budget, so what reaches the model is the relevant slice rather than everything that has ever happened.

That is what makes long runs affordable. Cost scales with what a step actually needs, not with how long the run has been going, and step 200 does not pay for the 199 steps before it.

It is also what keeps a smaller model viable. A focused slice of a coherent plan is a task a small model handles well. An unbounded scroll of prompt history is not.


Information on demand

Pull evidence when needed

Not everything belongs in the slice. The rest stays one call away.

Memory is not only pushed to the agent, it can be pulled. When a step needs something the slice did not include, the agent searches its memory, and reads the underlying item to inform its execution.

Evidence retrieved this way arrives with its provenance attached, which is why a decision can be required to cite what it was based on. The alternative, stuffing every document into the prompt in case it turns out to matter, is what makes long-context agents both expensive and vague.


Across runs

What the agent learned last time

Memory outlives the run that produced it.

Memory is not scoped to a single execution. Decisions, claims and evidence written during one run are there for the next, so an agent pointed at the same codebase or the same ledger a week later starts from what it already established rather than rediscovering it.

Lessons are the sharper form of this: a trigger, the action it suggests, and the evidence behind it, carried forward with the conditions that would falsify it. A later run that contradicts a lesson marks it contradicted rather than quietly ignoring it, so what accumulates is a record that can be corrected instead of a pile of stale advice.


The problem

Three ways a long run loses the thread

None of these are reasoning failures, and none of them are fixed by a bigger model. They are structure failures, and they are the default outcome on any task that runs longer than a few minutes.

01.

Drift

The agent starts with a plan, but after a few dozen steps the plan is stale. It does not notice. It keeps executing against assumptions that stopped being true an hour ago.

02.

Forgetting

A decision made at step 12 is the one step 47 depends on. Step 47 only sees the last few thousand tokens of prompt history, so it makes a contradictory choice without knowing it.

03.

Collapse

Something fails: a tool call, a test, an assumption. A short-lived agent restarts from zero, losing every intermediate result along with it.


Retrieval is not state

Beyond vector stores

A vector store answers a question about resemblance. That is the wrong question to ask about state.

Nothing about similarity tells an agent the current value of a field, or whether what it believed ten steps ago is still true. The world-model is the run’s authoritative typed state, and every value in it records what generated it and what invalidated it.

So when someone asks why an agent did what it did, the answer is a lineage you can walk back to the evidence, rather than a reconstruction after the fact.


Common questions

What is agent memory?

Agent memory is how an agent keeps what it knows without carrying it in the prompt. Coresource holds intent, state, evidence and decisions in one authoritative world-model, and each step reads a focused slice of it rather than an ever-growing transcript.

How does agent memory reduce token cost?

Each step is assembled fresh against a token budget. Candidates are scored by how specifically they match the step, how many provenance hops away they sit and how current they are, then truncated to fit. Cost scales with what a step needs rather than with how long the run has been going.

Can an agent retrieve evidence it was not given?

Yes. Memory is pulled as well as pushed. When a step needs something its slice did not include, an agent searches its memory and reads the underlying item to inform its execution.

Does an agent remember anything between runs?

Yes. Memory is not scoped to a single execution, so decisions, claims and evidence written during one run are available to the next. Lessons carry a trigger, the action it suggests and the evidence behind it, and a later run that contradicts one marks it contradicted rather than ignoring it.

How is a world-model different from a vector store?

A vector store retrieves passages that resemble a query. A world-model is the run's current typed state, and every value in it carries provenance: what generated it and what invalidated it. One is recall; the other is truth about the run.


See coherence hold across a real run