Skip to content
All paths
Build agentsAdvancedFor developers10 chapters205 min

Advanced agents

State at scale, Command and Send, subgraphs, time travel, loops that survive and loops that stop, planning, deep agents, and jobs that span sessions.

For developers who can already build agent systems. You work with large graphs and their state, route with Command and Send, rewind and fork runs, build loops that recover from failure and know when to stop, compare planning patterns, and run a deep-agent harness on a long job. Each lab runs real LangGraph.js 1.5.1 in your browser with a scripted model. The deep-agent harness is re-created, and the screens say so.

Chapters

  1. Chapter 1Open

    State at scale

    How LangGraph.js 1.5.1 merges writes to one state key: StateSchema fields with and without reducers, the order of parallel writes, Overwrite and UntrackedValue.

  2. Chapter 2Locked

    Command and Send

    A node can update state and choose the next node in one step with Command, and fan work out to parallel workers with Send, as many as the model asks for.

    20 min
  3. Chapter 3Locked

    Subgraphs and teams

    Build teams of agents from subgraphs, decide how they share state, read their namespaces in the stream, and compare multi-agent patterns by model calls and tokens.

    20 min
  4. Chapter 4Locked

    Time travel

    Every superstep saves a checkpoint, so you can read a run's history, replay from a past step, edit a past state and fork a second ending.

    20 min
  5. Chapter 5Locked

    Loops that survive

    Retry policies, timeouts, error handlers and checkpoints keep a long run going when a tool fails or the process stops.

    20 min
  6. Chapter 6Locked

    Loops that stop

    A loop needs stops that hold whatever the model does: a recursion limit, a budget of calls, a detector for repeated calls, and a person who can say no.

    20 min
  7. Chapter 7Locked

    Planning loops

    Plan-and-execute, ReWOO and LLMCompiler plan the work before they do it, and they differ in model calls, supersteps and time.

    20 min
  8. Chapter 8Locked

    Spending compute

    Evaluator-optimizer loops, reflection, best-of-n and tree search spend more model calls to get a better answer, and each needs a budget.

    20 min
  9. Chapter 9Locked

    A deep-agent harness

    A deep agent plans with a todo list, keeps notes in virtual files, hands parts of a job to subagents with a fresh context, and pauses before the tools you name.

    20 min
  10. Chapter 10Locked

    Long-horizon agents

    A job that spans sessions needs compaction inside a session, hand-off files and memory between sessions, and a check of its whole trajectory.

    25 min