LangChain Tutorial

Welcome to the LangChain tutorial. Based on official LangChain docs and the open-source langchain-ai/langchain project, this guide focuses on LangChain 1.0 agent development—from first run to production-ready apps.


Table of Contents

Basics

  1. Introduction — Ecosystem, 1.0 changes, LangGraph & LangSmith
  2. Installation — Python deps, API keys, virtual env
  3. Quick Startcreate_agent and your first agent chat

Architecture

  1. Architecture & Core Concepts — Agent loop, harness, LangChain vs LangGraph
  2. Models & Messages — Provider strings, messages, structured output

Development

  1. Tools & Agents@tool, tool calling, invoke / stream
  2. Middleware — Hooks, human-in-the-loop, context engineering
  3. Memory & Checkpoints — State, thread_id, persistence

Applications

  1. RAG — Loaders, vector stores, retrievers, agentic RAG
  2. LangGraph Workflows — Graphs, nodes, workflows vs agents

Operations

  1. Production & LangSmith — Tracing, eval, deployment
  2. Practical Examples — Q&A bot, multi-tool agent, orchestration
  3. Resources — Official docs and community

Learning Path

StageGoalChapters
Day 1Run an agentIntro → Install → Quick Start
Days 2–3Harness & toolsArchitecture → Models → Tools & Agents
Week 1RAG & persistenceMiddleware → Memory → RAG
Week 2Orchestration & prodLangGraph → LangSmith → Examples

Prerequisites

  • Python 3.10+ basics
  • Familiarity with LLM / Chat APIs
  • At least one provider API key (OpenAI, Anthropic, etc.)