Phase 2 outline

Module 03 of 08 · Outline

LangGraph — Stateful Workflows & Routing

Model agent state, conditional routes, nodes, edges, and deterministic control flow.

Learning outcome: A graph, a state diagram, and branch tests.

Lesson outline

Lesson 3.1

Graph foundations

  • State schemas and reducers
  • Nodes, edges, START and END
  • Compiling and invoking graphs

Lesson 3.2

Conditional routing

  • Routing functions and structured decisions
  • Deterministic paths versus model decisions
  • Fallback branches and termination

Lesson 3.3

Testing graph state

  • Node input and output contracts
  • State updates and reducer behavior
  • Branch coverage with mock models

Practice assignment

Route support requests through a graph

  1. Define a typed request state.
  2. Route synthetic requests to answer, retrieve, or escalate nodes.
  3. Test each branch and the termination path.

Deliverable: A graph, a state diagram, and branch tests.

Independent practice · no submission or grading

Reference reading