Skip to content

LangGraph

An extension over LangChain for creating complex cyclic agents: state graphs, branching, self-checking, and human-in-the-loop.

What Sets It Apart from LangChain

Regular chains follow a straight path: step 1 → step 2. LangGraph builds agents as graphs with branching: «execute → check → if error, go back and redo».

Example: Autonomous Developer

flowchart LR
    A[Coder] --> B[Executor]
    B --> C{Error?}
    C -->|Yes| A
    C -->|No| D[Done]

Human-in-the-loop

LangGraph can pause a process and wait for a human. For example, in refund processing: up to $50 the model approves automatically, above that it alerts the operator.

When to Choose

LangChain LangGraph
Architecture Straight chain Graph with cycles
Flow A → B → C A → B → if error → A
Human in loop Complex Native

See Also

← All terms