Memory & Checkpoints
LangGraph state and checkpointers enable multi-turn memory and human-in-the-loop resume.
State and messages
Default agent state includes a messages list. With a checkpointer, each invoke merges into persisted history.
Without a checkpointer, each call is isolated.
thread_id
Same thread_id shares history; use distinct ids per user/session.
Checkpointer backends
Plan for concurrency and retention in production.
Custom state
Extend with state_schema or middleware (user_id, retrieved_docs, etc.):
See official Memory docs for create_agent integration.
Short vs long-term memory
Memory is a harness concern in 1.0, not one legacy Memory class.
Interrupts & HITL
LangGraph interrupts pause before tools; resume with another invoke. HITL middleware wraps this; checkpoints store the pause point.
Context limits
Use summarization middleware, sliding windows, or external RAG for long histories.