SESSION 8
Session 8 — Building Agents with LangChain
Build your first agent, add memory, streaming, structured output, and multi-agent handoffs.
3 hours•11 exercises · 3 groups
What you'll build by the end
- ✓ A ReAct agent that autonomously reasons and calls tools
- ✓ A multi-turn chatbot with persistent memory
- ✓ A streaming agent that shows progress in real time
- ✓ An agent gated by human approval for dangerous operations
- ✓ A sales/support handoff system with state-driven routing
- ✓ A supervisor that orchestrates research + writing subagents
Prerequisites
Finished Session 6 (LangChain basics) and Session 7 (architecture choice)Session8 folder with .venv, langchain + langchain-openai + langgraph installedOPENAI_API_KEY in Session8/.envComfortable with @tool, bind_tools, Pydantic from Session 6
The arc
Single agent
00–03
Memory & output
04–07
Advanced
08–10
Exercises
Single agent
Create, inspect, configure, and error-proof your first agent.
Memory & output
Add persistence, handle long chats, stream tokens, return structured data.
Advanced
Human approval gates, conversational handoffs, supervisor orchestration.