BUILDING AI AGENTS WITH LANGGRAPH AND LANGCHAIN

3 Days  |  Introductory to Intermediate


OVERVIEW

LLM applications stop being chatbots the moment they need to make decisions, call tools, and recover from their own mistakes. This course takes students from a single model call to a durable, multi-step agent graph that runs reliably against real tools.

Students start with LangChain's building blocks — models, prompts, structured output, and tool binding — then move to LangGraph, where an agent becomes an explicit state machine: nodes, edges, conditional routing, persistence, and interruption. Along the way students confront the problems that actually break agents in production: unbounded loops, context growth, tool call failures, non-deterministic routing, and the need for a human in the loop before a consequential action.

By the end, each student has built and demoed a multi-agent system with checkpointed state, streaming output, human approval gates, and a test suite that runs in CI.


WHO SHOULD ATTEND

Python developers, data engineers, ML engineers, and solution architects who need to ship agent-based features rather than prototype them.


PREREQUISITES

Comfortable with Python (functions, classes, async basics), REST APIs, and Git. No prior LLM framework experience required.


WHAT YOU WILL LEARN

•  Choose between a prompt chain, a tool-calling agent, and a stateful graph, and justify the choice

•  Model an agent as a LangGraph state machine with typed state and explicit transitions

•  Build reliable tools, including schema design, validation, retries, and error surfacing back to the model

•  Persist and resume agent runs with checkpointers, and add human-in-the-loop approval

•  Coordinate multiple agents with supervisor and hand-off patterns

•  Control cost and latency with model routing, caching, and context management

•  Test agent behavior deterministically and wire it into CI


COURSE OUTLINE


DAY 1 — FOUNDATIONS AND TOOL USE

Module 1 · The Agent Landscape

•  What an "agent" is and is not; workflows vs. agents vs. autonomous loops

•  Anatomy of an agent: model, instructions, tools, memory, control loop

•  Where agents fail: cost, latency, loops, hallucinated tool calls, silent failure

•  LangChain and LangGraph in the ecosystem; versioning and what changed recently

Module 2 · LangChain Core

•  Runnables and composition; the LCEL pipe pattern

•  Prompt templates, message types, and system prompt design

•  Structured output: schemas, validation, and what to do when the model ignores them

•  Model configuration: temperature, max tokens, stop conditions, provider abstraction

Module 3 · Tools That Don't Break

•  Tool definition, docstrings as contracts, and argument schemas

•  Tool-calling loops; parallel tool calls

•  Error handling: validation errors, timeouts, partial results, and feeding failures back to the model

•  Dangerous tools: idempotency, dry-run modes, and confirmation patterns


DAY 2 — LANGGRAPH AND STATE

Module 4 · Graphs as Agent Architecture

•  State schemas, reducers, and why typed state matters

•  Nodes, edges, and conditional edges; routing functions

•  Cycles, recursion limits, and loop termination strategies

•  Subgraphs and composition

Module 5 · Persistence, Memory, and Interruption

•  Checkpointers: in-memory, SQLite, and Postgres

•  Threads, resumption, and time travel through run history

•  Short-term vs. long-term memory; summarization and context windowing

•  Interrupts and human-in-the-loop approval before consequential actions

Module 6 · Streaming and User Experience

•  Streaming modes: tokens, state updates, and custom events

•  Surfacing intermediate reasoning and tool progress without leaking internals

•  Cancellation and timeouts


DAY 3 — MULTI-AGENT SYSTEMS AND PRODUCTION READINESS

Module 7 · Multi-Agent Patterns

•  When a second agent helps and when it just adds latency

•  Supervisor, hand-off, and network topologies

•  Shared state vs. message passing; scoping each agent's tools

•  Planning and reflection loops, and their failure modes

Module 8 · Cost, Latency, and Reliability

•  Model routing: small models for routing, large models for reasoning

•  Prompt caching and response caching

•  Budgets, step limits, and circuit breakers

•  Guardrails: input validation, output filtering, and prompt-injection exposure through tools

Module 9 · Testing Agents

•  Deterministic testing: fakes, recorded responses, and fixed seeds

•  Unit-testing tools and nodes independently of the model

•  Behavioral assertions and regression suites

•  Agents in CI