Loading video player...
Note: This video was made with an AI and scripting workflow as part of my build-in-public journey. Please let me know if you spot any inaccuracies or discrepancies so I can continue improving the process over time. LangGraph's core primitives — StateGraph, reducers, conditional edges, and the checkpointer — run identically against local models by subclassing BaseChatModel, with no hosted LLM or API key required. Most LangGraph tutorials assume a cloud endpoint; this video shows the exact interfaces that make the framework provider-agnostic, so the same compiled graph runs in production, on-prem, or on a laptop. What you'll learn: - How StateGraph makes pipeline topology explicit: named nodes, a rendered diagram, and doctor validation replace grepping through imperative control flow - Why subgraphs compile a cluster of related nodes into a single callable, enabling safe refactoring of any stage without touching the surrounding topology - How reducer annotations (operator.add) turn list-typed state fields into append-only delta streams so nodes accumulate results instead of clobbering each other's contributions - How to subclass BaseChatModel and implement _generate to make any local backend — Ollama, a CLI tool, or a HuggingFace pipeline — fully compliant with every LCEL combinator - How with_retry, with_fallbacks, and with_structured_output stack at the runnable level and apply identically to local and cloud models with no code changes - How the checkpointer plus interrupt_before config pauses a run at a named node, saves full state to a thread ID, and resumes with a None payload — one config line replaces an orchestration rewrite Chapters: CHAPTERS_PLACEHOLDER Who this is for: intermediate-to-senior Python engineers building production LLM pipelines who want to understand LangGraph's orchestration primitives beyond tutorial-level examples. Prerequisites: comfort with async Python and at least one LLM API; no prior LangGraph or LangChain experience assumed. Chapters 0:00 Langgraph Local First 0:51 The Shape Problem 1:43 StateGraph: Topology as Code 2:33 Subgraphs: Scope and Cohesion 3:27 Reducers: State as a Stream of Deltas 4:23 Conditional Edges: Routing as a First-Class Citizen 5:15 Local Models: Custom BaseChatModel 6:15 LCEL: Same Composition, Local or Cloud 7:10 The Free Wins: Retries, Fallbacks, Structured Output 8:03 Human in the Loop: Interrupt and Resume 8:58 The CLI Shape: Thin Command, Fat Graph 9:56 What to Take Home