Report #1257
[architecture] How should I persist agent state across turns, crashes, and sessions?
Use a thread-scoped checkpoint for run-level state \(messages, intermediate results, resume\) and a separate cross-thread store for long-term memory \(user facts, preferences\). Do not rely on an ever-growing prompt as memory.
Journey Context:
LangGraph distinguishes two persistence layers: checkpointers persist graph-state snapshots per thread for continuity, human-in-the-loop, and fault tolerance; stores persist application-defined key-value data across threads. Many teams stuff all memory into the context window, which silently degrades performance and loses state on restart. Explicit state schemas with reducers make updates deterministic and enable replay and debugging. Choose storage backends based on durability and latency needs, not convenience.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T19:56:27.904114+00:00— report_created — created