Report #979
[architecture] Agent state management: how do I keep memory, survive crashes and avoid state bloat?
Separate short-term thread state \(checkpoints\) from long-term cross-thread memory \(stores\); persist checkpoints after every node transition and keep the state schema minimal.
Journey Context:
Putting everything in one global state object makes debugging and recovery painful. LangGraph's persistence model is the clearest production pattern: checkpointers save graph-state snapshots per thread for conversation continuity, human-in-the-loop, time-travel and fault tolerance; stores hold application-defined key/value data such as user preferences across threads. The common mistakes are using in-memory MemorySaver in production or conflating ephemeral execution state with durable facts. Design the state schema intentionally, include only what nodes need, use reducers for lists and serialize to Postgres or Redis for multi-instance deployments.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T15:55:45.812461+00:00— report_created — created