A stateless prompt chain can be a good fit for a single request with a clear input and output. It becomes brittle when a workflow spans tool calls, retries, human review, or a process restart. Reconstructing state from conversation text leaves the application guessing which actions completed and which decisions were approved.
Persist workflow state, not a transcript
An agent workflow should store the fields needed to make its next transition: current step, validated inputs, tool results, approval status, retry count, and stable run identifiers. Keep the shape typed and version it when the workflow contract changes.
Redis-backed checkpoints provide a fast persistence layer for resumable execution. The checkpoint lets a worker continue from a known state after a timeout or deploy, instead of replaying a long prompt and hoping the model reconstructs the same plan.
Separate state recovery from side-effect safety
A checkpoint can tell the system what it believed before a crash. It cannot guarantee that an external write did not succeed just before the connection dropped. Use idempotency keys for external side effects, persist the intended action, and record the result before advancing the graph.
For example, a payment or CRM update should carry a stable operation ID derived from the workflow run. If a worker retries after an ambiguous timeout, the target service can return the original result instead of creating a duplicate.
Decide what belongs in Redis
Store the minimum state required to resume. Apply encryption, network isolation, access controls, expiry, and backup policies appropriate to the workflow. Avoid placing credentials or large unredacted documents into checkpoints. For sensitive records, store a protected reference and retrieve the source under the current authorization context when resuming.
A checkpoint format also needs a migration path. Deploy readers that understand the current and prior state versions before changing writers, and test restart behavior across that boundary.
Operate the graph as a distributed system
Track run ID, checkpoint version, current node, retry count, and duration as structured telemetry. Bound retries and execution cycles. Define terminal states for rejected, expired, and permanently failed work. When a human review pauses execution, persist the exact proposal and invalidate approval if that proposal changes.
The payoff is operational clarity: teams can resume, inspect, replay carefully, and explain what the workflow did. Redis checkpointing does not replace sound graph design or idempotent APIs, but together they turn multi-step automation into a workflow that can survive ordinary production failures.