When an agent gets something wrong, teams often inspect its final answer and the context retrieved for the last model call. That can explain what the agent believed at the end. It rarely explains how it got there.

For consequential systems, that distinction matters.

An agent needs memory: relevant knowledge from past interactions, retrieved documents, and working state for the task at hand. But memory is not history. Memory answers, “What should I recall now?” History answers, “What happened, in what order, and why did the system reach this state?”

Reliable agents need both.

Diagram contrasting memory, which asks what should I recall now, with history, an append-only ordered log that asks what happened, in what order, and why

Snapshots hide the path

A database record can tell you an order is cancelled. A vector index can retrieve a relevant support article. A session store can show the current plan. All are valuable views of the world.

None necessarily tells you that the agent first checked eligibility, then received a shipping-delay event, then requested approval, then retried an API call after a timeout, and finally cancelled the order under a particular policy version.

That sequence is not incidental metadata. It is the explanation of the outcome.

If an agent can call tools, make decisions, and change business state, its task should create an ordered record of the important things that happened. This record is often called a durable commit log, event history, or execution journal. The label matters less than the properties: it is append-only, ordered, attributable, and retained independently of the agent’s short-term context.

Diagram showing a snapshot that reads only “cancelled” beside the ordered history of events — eligibility checked, a shipping-delay event, an approval, a timeout, a retry — that explains how the order reached that state

What belongs in the history

Do not confuse a durable history with a transcript of private reasoning. Teams do not need to store every generated token to operate responsibly. They do need to preserve the observable events that explain and reproduce a task.

For a meaningful agent action, that usually includes:

  • task creation, objective, and initiating identity;
  • context sources consulted, their versions, and freshness;
  • tool calls, inputs, outputs, and failures;
  • policy evaluations, approval requests, and decisions;
  • state mutations and idempotency keys;
  • model and prompt-template versions where relevant;
  • completion, escalation, or cancellation.

Sensitive payloads can be minimized, redacted, encrypted, or represented by protected references. The goal is accountable operation, not indiscriminate collection.

History makes recovery possible

The first benefit is diagnosis. When a customer asks why a change happened, you can follow the chain of evidence instead of guessing from a final response.

The second is recovery. A durable record lets teams replay an execution up to a safe point, identify a duplicate action, reconcile a partial failure, or rebuild derived state after a defect. This matters especially when a workflow spans long-running tasks and unreliable downstream services.

The third is improvement. Evaluations become more useful when they can examine actual task traces. Teams can see which context sources were consistently stale, which tools caused retries, where agents escalated appropriately, and where a policy should have blocked an action earlier.

Memory should be a projection, not the truth

This leads to a useful architectural principle: treat fast memory stores as projections of durable history where appropriate, rather than as the only truth about an agent’s work.

An agent may retrieve a compact summary of prior activity because it is efficient. Another system may build a semantic index over resolved cases. A dashboard may show the current status of a task. These are all views optimized for a purpose. They can be updated, rebuilt, or corrected when the durable record remains available.

This does not mean every piece of knowledge needs event sourcing. It means that for decisions and actions with material consequences, a mutable snapshot alone is an inadequate operational record.

Diagram of a durable, append-only history feeding three projections: a compact summary, a semantic index, and a task dashboard, each rebuildable from the log

Design the journal with the workflow

The history should not be bolted on after an incident. Define task and correlation identifiers before building the agent. Make every tool call and event attributable to that task. Decide which events are business-relevant, which are operational, and how long they must be retained. Ensure that a write can be tied to the approval and policy that allowed it.

Then test a real failure: a tool succeeds but the response is lost; an approval arrives after context changes; a task restarts; an agent is revoked halfway through its work. If the architecture cannot explain and safely recover from these cases, it does not yet have enough history.

Memory helps an agent be useful in the moment. History helps the organization trust it over time.

Frequently asked questions

What’s the difference between an agent’s memory and its history?

Memory answers “what should I recall now?"—relevant knowledge, retrieved documents, and working state for the current task. History answers “what happened, in what order, and why did the system reach this state?” A snapshot can tell you an order is cancelled; only an ordered history explains the eligibility check, the delay event, the approval, and the retry that led there.

What should be captured in an agent’s durable history?

Task creation and initiating identity; context sources consulted with their versions and freshness; tool calls, inputs, outputs, and failures; policy evaluations and approval decisions; state mutations and idempotency keys; and completion, escalation, or cancellation. Sensitive payloads can be redacted or referenced—the goal is accountable operation, not capturing every generated token.

Does every agent action need event sourcing?

No. The principle is to treat fast memory stores—summaries, semantic indexes, dashboards—as projections that can be rebuilt from a durable log where one exists, not as the only record. Full event-sourcing discipline matters most for decisions and actions with material consequences; a mutable snapshot alone is inadequate for those, but not every piece of agent knowledge needs it.

Next: Events Are APIs Too.