Skip to main content

Explain state, nodes, edges and checkpoints in LangGraph.

Agents and tools · Pro 1

Short answer

The state is a typed object shared across the graph, such as messages and intermediate results. Nodes are functions that read the state and return updates. Edges decide what runs next, either fixed or conditional on the state, which allows loops. A checkpointer saves state after each step, enabling memory, resuming, human approval with interrupts and replay.

Deeper answer

This structure makes agent behaviour explicit and testable: you can unit test a node, draw the graph, and see in traces which path a run took. Reducers define how updates merge, for example appending messages rather than replacing them.

Checkpoints are what make human-in-the-loop practical: the graph pauses at an interrupt, the state is saved, and it resumes when a person approves, even hours later.

What a strong answer covers

Answer it out loud in the mock interview about 2 min

Follow-ups to expect

Common mistakes

Learn it

LangGraph: agents as graphs

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.