A Generative AI Engineer is designing a support agent that calls tools, inspects each result and loops back to try another tool when one fails. Refund requests must pause for a human approver and resume hours later from the same point, with the conversation state intact. Which framework is the best fit for this control flow?
Choose one.
LangGraph adds stateful, cyclical and resumable control flow on top of LangChain components.
Two requirements decide it: loops (retry another tool after a failure) and durable state across a pause (human approval hours later). LangGraph models the agent as a graph whose edges can cycle and whose checkpointer saves state for resumption. A plain LangChain chain is linear and stateless, LlamaIndex is data-centric, and DSPy is an optimizer.
- Spot loops and branches in the requirement.
- Spot the need to pause and resume with saved state.
- Choose the framework that offers cycles plus checkpointing.
Exam tip: Loops, branches and pause-resume state point to LangGraph, not a linear chain.
Databricks GenAI Engineer: LangChain, Prompt Augmentation and Prompt Engineering — the lesson that teaches this.