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
- State shared across the graph
- Nodes are functions that update state
- Edges, including conditional ones and loops
- Checkpointer saves state each step
- Enables memory, resume and human approval
Answer it out loud in the mock interview about 2 min
Follow-ups to expect
- How would you add a human approval step before a refund node?
- What does a reducer do?
Common mistakes
- Treating LangGraph as only a prompt library
- Forgetting persistence is needed for interrupts
Learn it
- What are common failure modes of agents, and how do you guard against them?
- What kinds of memory can an agent have, and how do you implement them?
- Your agent ran overnight and ran up a large API bill. What probably happened, and what do you change?
- How would you design a harness for an agent that has to work on one task for several hours?
- What is the difference between an agent and a workflow?
- What are computer-use or browser agents good for, and what are their risks?
- What is context engineering, and why does it matter for agents?
- An agent completes a task correctly most of the time but sometimes goes badly wrong. How do you debug it?
- What makes a good tool for an agent?
- Design an agent that handles refund requests for an online store.
- You changed your agent's harness. How do you prove the change made it better?
- What are verification gates in an agent harness, and how would you add them to a coding agent?
- How does tool calling work?
- When should an AI agent ask a human for approval before acting?
- What are planning and reflection in agents, and when do they help?
- Two coding agents use the same model, but one solves far more of your tasks. Why could that be, and how would you find out?
- What is an agent harness, and what is harness engineering?
- What is the Model Context Protocol, and why does it matter?
- When is a multi-agent system worth it, and what are the risks?