AI-ENGINEERING
    advanced

    LangGraph

    AI Engineer path · lesson 79 of 124
    The idea
    LangGraph is a board game: the state is the board, nodes are squares that change it, and the dice (router) read the board to decide where you go next — sometimes looping back, sometimes landing on FINISH.
    How to use
    Step through each node one at a time or hit Run to watch the full agent loop. Each step highlights the active node and shows the routing decision below the graph. Switch the four section tabs to explore State, Edges, and Durable Execution in depth.
    ready
    needs toolloopdoneagentroutertoolsEND
    state.messages
    user: population of the capital of France?

    Key insight

    The router read the state and branched — first to tools, then (after the result) to END. The tools → agent cycle is what makes it an agent rather than a one-shot chain, and explicit state is what makes it debuggable and resumable.

    The parts of a LangGraph app

    Sort

    Sort each concept by the role it plays in the graph.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    Does work

    Drop items here

    Decides what runs next

    Drop items here

    Carries data between steps

    Drop items here
    6 pieces left to place

    Test your knowledge

    20 questions
    Question 1 of 20
    Score: 0

    What does a conditional edge in LangGraph do?

    The short version

    LangGraph is a board game: the state is the board, nodes are squares that change it, and the dice (router) read the board to decide where you go next — sometimes looping back, sometimes landing on FINISH.

    In more depth

    LangGraph

    LangGraph models an app as a state machine: nodes mutate a shared state object and edges decide what runs next. Unlike a chain, edges can be conditional (branch) and cyclic (loop). The classic agent is agent → router → (tools → agent)* → END: the router inspects state (did the model request a tool?) and routes accordingly. Explicit state gives persistence, checkpoints, human-in-the-loop, and replay.

    Interview Questions

    LangChain
    Anthropic
    Microsoft
    LangChain
    Anthropic
    Anthropic
    LangChain
    Anthropic
    LangChain
    Palantir
    LangChain
    Microsoft

    Love this visualization?

    Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.

    100% free • No credit card required