Report #101585
[architecture] How should I manage state across multi-turn agent executions so that runs are reproducible and recoverable?
Model agent state as an append-only event stream, not a mutable conversation object. Each LLM generation, tool call, tool result, and human message is an event; the current state is a fold over that stream.
Journey Context:
Most tutorials pass a mutable messages list around, which breaks reproducibility, makes retries non-deterministic, and complicates debugging. Event-sourced state makes every step inspectable and replayable. This is the foundation of LangGraph's state model and of durable execution systems like Temporal. The upfront cost is small: append events to a list and derive the prompt from the list, rather than mutating the prompt in place.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-07T05:06:19.103811+00:00— report_created — created