$ show langchain-ai/langgraph-101
This repository is an educational tutorial for learning LangChain, LangGraph, and Deep Agents frameworks. It contains two tracks: 101 (fundamentals) and 201 (production patterns) with Jupyter notebooks and standalone agents runnable via `langgraph dev`. The code demonstrates multi-agent supervision, human-in-the-loop interrupts, middleware hooks, MCP tool integration, and a deep research agent with skills and memory. All agents use mock or simulated data (Chinook SQLite, Tavily search) and are designed for learning rather than production. The architecture centers on a centralized model configuration (`utils/models.py`) that supports multiple LLM providers, and reusable patterns like subgraph composition, dynamic prompts, and composite backends. While the code is educational and lacks production hardening (error handling, testing, security), it provides clear, well-commented examples of advanced agent patterns.
The LLM identified 4 files worth highlighting for reuse:
Centralizes LLM model initialization across all agents. Supports multiple providers (OpenAI, Anthropic, Azure, Bedrock, Vertex AI) with a single model object. Highly reusable for any LangChain project, allowing provider switching via environment variables. Demonstrates a clean factory pattern for model creation.
Implements a multi-step email triage and response agent with middleware hooks (dynamic prompts, request logging, safety checks) and human-in-the-loop via `interrupt()`. The `AgentMiddleware` subclass pattern is self-contained and can be extracted into other LangGraph projects for observability and control flow.
Demonstrates a research agent built with the Deep Agents framework, featuring a composite backend (ephemeral + persistent store), AGENTS.md for agent instructions, skill loading (LinkedIn, Twitter posts), and human-in-the-loop. The pattern of separating agent behavior into markdown files and skills is innovative and reusable for modular agent design.
A minimal MCP server exposing email and calendar tools using the `mcp` library. Includes a `load_mcp_tools()` function that converts MCP tools into LangChain-compatible `BaseTool` instances. This adapter pattern is reusable for integrating any MCP server into LangChain agents without tight coupling.