Architecture Boundary Guide · Source-verified

Agent memory vs workflow state: do not store one as the other

Memory helps an agent use prior context. Workflow state records where an execution is and what must happen next. Treating either as the other creates recovery and data-governance failures.

State boundary

Memory is context; state is execution truth

Conversation / retrieval memory
inform
Model decision
propose next action
Workflow state
record execution truth
Retry + recovery
resume safely
External outcome
Use memory to inform a model. Use workflow state to know what completed, what can retry, and what must happen next.

What the sources establish

  • LangGraph documents memory and persistence as related but distinct application concerns.
  • LangGraph persistence uses checkpoints associated with execution threads.
  • Temporal documents event history as the basis for reconstructing workflow state.

Memory answers a context question

It helps decide what prior information should be available for the next model call.

Workflow state answers an execution question

It records completed steps, pending work, and the recovery point after interruption.

Deletion and replay differ

Memory retention is a data policy. Workflow replay is an execution mechanism. Combining them casually makes both harder to reason about.

Decision detail

  1. Store user or task context as memory only when retrieval and retention rules are explicit.
  2. Store execution progress in a state model designed for resume and recovery.
  3. Keep irreversible external side effects behind idempotent operations regardless of where state is stored.

Evidence

These claims are source-verified. We do not label this page hands-on or benchmarked because no reproducible test artifact is attached.

Continue the decision