StudyVisuallyStart studying
Part 06 · LangChain / LangGraph · Card 8 of 14

Graph state

Data shared by every step in the graph, most often the messages array plus a few fields of your own.

Last updated

Analogy

The Redux store. Nodes read it, return updates, and the graph merges them in.

In an agent

State is what gets checkpointed, so it's what lets an agent pause and resume.

Practice

Flashcards

  • Interview: what does LangGraph add to LangChain?Explicit graphs with state, checkpoints, interrupts and routing, so complex agents are easier to control.

Questions people ask

What is state in LangGraph?

State is the data every node in the graph can read, most often the messages array plus a few fields of your own, such as the current route or a draft. A node returns updates, and LangGraph merges them into the state. It works much like a Redux store with reducers.

Why does graph state matter for pausing and resuming agents?

Because the state is what gets saved. A checkpointer stores the full state after every step, so the agent can stop, for example to wait for approval or after a crash, and continue later from exactly the same point. Anything kept outside the state would be lost when the run pauses.