Module 14
LangGraph and Stateful Agent Workflows
Turn the hand-written agent loop into an explicit graph of nodes, edges and typed state that you can draw, test and inspect. You will design multi-branch agent graphs, debug them with streaming and time travel, persist conversations and overnight approvals in MongoDB, and learn when a visual builder like Langflow is the faster choice. The module ends with a sandboxed coding agent that fixes a failing test on its own.
By the end of this module you can
- build a LangGraph StateGraph with typed state, reducers, conditional edges and an agent loop
- design a routed agent graph with specialist branches, LCEL chains, ToolNode and subgraphs
- debug a graph with streaming, checkpoint history, time travel and recursion limits
- persist threads and human approvals across restarts with a MongoDB checkpointer and interrupt
- prototype an LLM workflow in Langflow, call it through its API and judge when to move it to code
- build a coding agent that edits a repo safely inside a Docker sandbox and stops when tests pass
Lessons
6 in this module- 01LangGraph core: nodes, edges, stateBuild and run a LangGraph StateGraph with typed state, reducers and conditional edges, trace its state step by step, and recognise your hand-written agent loop as a two-node graph.
- 02Designing complex agent graphsDesign and build a routed support graph with an LCEL router, an agent-loop subgraph using ToolNode and tools_condition, a fixed retrieval branch and a shared respond node, following four design principles.
- 03Debugging stateful workflowsFind and fix real graph bugs by drawing the graph, streaming state updates, reading checkpoint history, forking with time travel and setting deliberate recursion limits, with LangSmith and LangGraph Studio for heavier cases.
- 04Checkpointing with MongoDBPersist conversations and paused approvals in MongoDB with a checkpointer and thread IDs, pause and resume runs with interrupt and Command, and handle the privacy and retention duties that come with stored state.
- 05LangFlow for visual workflowsBuild a handbook Q&A flow in Langflow from components, test it in the Playground, call it through the API, and decide when a visual prototype should be handed off to code.
- 06Project: A Claude Code-like coding agentShip a LangGraph coding agent that explores a repo, makes exact-match edits, runs allowlisted commands in a Docker sandbox, stops only when tests pass, asks before risky actions and compacts its context for long sessions.