AI / LangGraph LangChain Interview questions
What is LangGraph?
LangGraph is a library for building stateful, multi-actor applications with LLMs using a directed graph model. Where LangChain chains are linear (or at most tree-shaped), LangGraph graphs can have cycles — a node can route back to an earlier node, making it possible to express iterative agent loops, retry-on-failure patterns, and human-in-the-loop pauses as explicit graph edges rather than implicit recursion.
The core concepts are:
- State — a typed Python dict (TypedDict) that persists across all nodes in the graph
- Nodes — Python functions that receive state and return a partial state update
- Edges — connections between nodes; can be unconditional or conditional (routing)
- StateGraph — the graph builder class; compile it to get an executable app
- Checkpointing — built-in persistence of state after every node, enabling resume, time-travel debugging, and human-in-the-loop
LangGraph is the recommended approach for anything beyond a simple linear chain: autonomous agents with retry loops, multi-agent coordination, chatbots with persistent memory, and workflows that need a human to approve or correct an intermediate step before proceeding.
More Related questions...