How does LangGraph's typed state differ from a plain conversation buffer?
LangGraph state is a typed object with named slots, per-slot reducers, and checkpointing at every node, turning agent memory into a first-class data model instead of an opaque conversation buffer.
Think of two ways to track a long project. The first is one big notebook where you write everything in order, meetings, decisions, todo lists, file references, all jumbled together. To find the latest decision you flip through pages and hope. The second is a binder with labeled tabs: Plan, Decisions, Open Questions, Files. Each tab has its own rule for what gets added. To find the latest decision you flip straight to that tab. The binder is what LangGraph state gives you. The notebook is what a plain conversation buffer gives you. Both work for short projects. Only one scales to long ones.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
LangGraph state is one of the clearer 2026 examples of a framework taking lessons from workflow engines and applying them to LLM agents. Where LangChain's older memory classes treated agent memory as a list of messages with limited structure, LangGraph treats it as a typed data model with named slots, per-slot reducers, and automatic checkpointing. The difference is structural and it shows up everywhere downstream: in how nodes are written, how trajectories are debugged, how durability works, and how parallel and conditional flow becomes safe. This deep dive walks through what typed state is, how reducers govern updates, what checkpointing enables, and where the abstraction is the right choice versus where simpler tools fit.
What typed state actually is
A LangGraph agent has a state schema defined as a TypedDict (or Pydantic model in TypeScript flavors). The schema lists the named slots the agent needs to track:
class AgentState(TypedDict):
messages: Annotated[list[BaseMessage], add_messages]
plan: str
tool_results: list[ToolResult]
documents: dict[str, Document]
user_profile: UserProfile
summary: str
step_count: int
Each slot is named and typed. The slot name is how nodes refer to that piece of memory. The type is enforced at runtime by the framework's validator.
Each slot is annotated with a reducer, a function (old_value, new_value) -> merged_value. The reducer says how an update is applied. add_messages is the built-in reducer for message lists: append the new messages while deduplicating by message ID. A replace reducer (the default) just overwrites the slot. A custom reducer might dedupe by URL, sort by timestamp, or apply any merge logic the slot needs.
Nodes in the graph are functions state -> partial_state_delta. They return only the slots they want to update, and the framework merges the delta into the full state through the reducers. This is the Redux pattern adapted for LLM agents: small typed deltas plus pure reducers equals a deterministic, replayable state evolution.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- LangGraph's MessagesState is the canonical 2026 working-memory shape for chat plus tools agents
- LangGraph Cloud uses checkpointed state as the foundation of its managed agent runtime
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you design the state schema for a multi-step research agent?
Slots for the user query (replace), the plan (replace), retrieved documents (dedup by URL), document summaries (append keyed by URL), notes the agent has taken (append), open questions (replace), and the running synthesis (replace). Keep verbatim document content in a separate store and reference by URL or ID in state. Each slot's reducer is chosen to match its update semantics.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Treating LangGraph state as just a fancier message list, missing that the typed slots and reducers are what enable checkpointing, time-travel debugging, and clean human in the loop interruption.
60 second bullets to scan on the way to the call.
Define what typed state means in LangGraph (TypedDict or Pydantic with named slots)
Explain the reducer pattern and give examples of common reducers
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.