This repository contains hands-on tutorials for learning LangChain, LangGraph, and Deep Agents.
This is a condensed version of LangChain Academy, intended to be run in a session with a LangChain engineer. If you're interested in going into more depth, or working through tutorials on your own, check out LangChain Academy! LangChain Academy has helpful pre-recorded videos from our LangChain engineers.
- Python 3.11+
- uv (recommended) or pip
# 1. Install dependencies
uv sync
# 2. Configure environment variables
cp .env.example .env
# Edit .env and fill in your keys| Key | Required for | Get one |
|---|---|---|
OPENAI_API_KEY |
Modules 1-2 (default model) | https://platform.openai.com |
LANGSMITH_API_KEY |
Modules 1 & 2 (recommended for all) | https://smith.langchain.com |
TRUEFOUNDRY_API_KEY_GATEWAY |
All Modules | |
TAVILY_API_KEY |
Modules 1 & 2 (web search tool) | https://tavily.com |
# 3. Start Jupyter
uv run jupyter notebookOpen whichever module(s) your recipe calls for.
All modules import model from utils/models.py. Change one line there to swap providers — no notebook edits required.
# utils/models.py
# OpenAI (default)
# model = init_chat_model("openai:gpt-4.1-mini")
# Anthropic
# model = init_chat_model("anthropic:claude-sonnet-4-5")
# Azure OpenAI
# from langchain_openai import AzureChatOpenAI
# model = AzureChatOpenAI(azure_deployment="gpt-4.1-mini", streaming=True)
# AWS Bedrock
# from langchain_aws import ChatBedrockConverse
# model = ChatBedrockConverse(provider="anthropic", model_id="...")
# OpenAI via TrueFoundry (Default)
model = init_chat_model(
model="openai/gpt-5-nano-2025-08-07",
model_provider="openai",
base_url="<base_url>"
)utils/models.py ships a TrueFoundry Gateway block. Every model call is routed through the gateway and subject to organization policies.
modular-workshops/
├── README.md (this file — recipes + setup)
├── pyproject.toml (shared dependencies)
├── .env.example
├── langgraph.json (registers agents/deep_agent for langgraph dev)
├── utils/
├── agents/
│ ├── research_agent.py (shared agent factory — Module 2 references, Module 4 imports for eval)
│ └── deep_agent/ (deployable + governed agent for Module 3)
│ ├── agent.py
│ ├── AGENTS.md
│ └── skills/
│ ├── linkedin-post/SKILL.md
│ └── twitter-post/SKILL.md
├── images/ (diagrams used by the notebooks)
└── modules/
├── 01_deep_agents.ipynb (Module 1)
└── 02_langsmith.ipynb (Module 2)
Notebook can't find utils / agents
Each module's setup cell prepends project_root (the workshop root) to sys.path. If you moved a notebook, update the Path().resolve().parent line to point at the workshop root.
Please refer to this linked Notion document for instructions on setup and usage.