专为Python开发者设计的LangChain 1.x与AI Agent实战课程,通过20个动手练习,零成本使用Gemini免费API,掌握create_agent、RAG、记忆与结构化输出,构建综合AI助手。
原始标题:LangChain 20 Drills: Build AI Agents with create_agent & RAG

该课程是一门专为具备基础 Python 语法的开发者设计的 LangChain 1.x 与 AI Agent(智能体)端到端浏览器实战课程,旨在通过 20 个循序渐进的动手练习,帮助学员攻克“只会跑 Demo 却无法自主设计”的瓶颈。在无需配置本地 Python 环境(基于 CodeSandbox)且完全使用 Gemini 免费层 API 的零成本条件下,课程将带你完整走过 7 大核心章节:从使用 init_chat_model、提示词模板及 Pydantic 结构化输出夯实基础,到拆解 @tool 装饰器并利用 LangChain 1.x 最新的 create_agent 函数构建具备自主决策能力的智能体;随后深入 RAG(检索增强生成)的全流程开发并将其封装为工具,再到利用 checkpointer 和 thread_id 实现多用户对话记忆隔离;最终,课程将引领学员将工具、RAG、记忆和结构化输出四大核心拼图完美融合,亲手构建出一个能自主搜索、计算并直接输出 JSON 总结报告的综合性微型 AI 助手,为后续进阶 LangGraph 或 CrewAI 等复杂多智能体架构打下坚实的工程基础。
Published 8/2026
Created by M Sakai
MP4 | Video: h264, 1920×1080 | Audio: AAC, 44.1 KHz, 2 Ch
Level: All Levels | Genre: eLearning | Language: English | Duration: 49 Lectures ( 2h 55m ) | Size: 1.2 GB
What you’ll learn
⚡ Initialize an LLM with `init_chat_model`, use `invoke`, `stream`, and system prompts as needed, and understand why the return value is an AIMessage, not text.
⚡ Inject variables with prompt templates and receive replies as typed data via `with_structured_output` and Pydantic, designing output your program can use.
⚡ Write your own tools with `@tool`, understand how the docstring becomes the LLM’s instructions, and assemble agents that wield them with `create_agent`.
⚡ Build an agent with multiple tools, read tool_calls from the message history to trace what it thought and called, and chase the cause when it doesn’t work.
⚡ Understand every RAG stage—loading, splitting, embedding, and similarity search over a vector store—and build a QA bot over your notes or internal documents.
⚡ Wrap RAG retrieval in `@tool` and integrate it into an agent, letting the agent decide whether to search or calculate—a structure close to real-world work.
⚡ Give a chatbot memory with `checkpointer` and `thread_id`, isolating history per user, and explain why an LLM forgets a conversation in the first place.
⚡ Merge tools, RAG, memory, and structured output into one conversational mini AI assistant that searches, calculates, and closes with a JSON summary report.
Requirements
❗ Able to read and write basic Python (variables, functions, classes, `import`, list comprehensions, `with` statements). No library knowledge needed.
❗ A PC with an internet connection and a modern browser (Chrome recommended) is all you need. We use CodeSandbox, so there is no Python install or setup at all.
❗ Able to obtain one Gemini API key in Google AI Studio (free tier, no credit card). Section 0 walks you through the steps.
❗ No AI or LLM development experience required. Having used something like ChatGPT is plenty. No mathematical background in machine learning is needed either.
Description
This course contains the use of artificial intelligence.
“I keep hearing about AI agents. I can run the demos. But the moment I try to shape my own idea, I freeze.” — This course exists to get you out of exactly that state.
LangChain is a common layer that lets you write against any LLM the same way. And in 1.x, agent development has been consolidated into a single function: create_agent. Hand it a model, some tools, and memory, and you get an agent that decides on its own to call a tool, remembers the conversation, and searches documents when it needs to. This course builds those parts up one at a time, hands on, through20 practical drills.
Learning follows a roadmap of 7 chapters. Once Section 0 has your environment ready, Section 1 nails the foundation: calling an LLM, streaming, and system prompts. Section 2 covers prompt templates and the technique that pays off most in real work—structured output, receiving the LLM’s reply as a Python type (Pydantic) instead of a string—carried all the way through to building your own review analyzer.
Section 3 is the peak of the course: tools and agents. The “magic” that agents look like to so many learners is taken apart, starting from how a @tool decorator’s docstring becomes the LLM’s instructions. You’ll build an agent that picks between a calculator and a unit converter with create_agent, then peek into the message history to see what the agent thought and which tool it called—the basics of debugging.
Section 4 covers RAG (answering by searching) end to end. Loading and splitting documents, similarity search over embeddings and a vector store, a QA bot that answers questions about fictional company rules, and finally wrapping retrieval in @tool to integrate it into an agent—the “it clicked!” moment where Section 3 and RAG connect. In Section 5 you give a chatbot conversational memory (checkpointer and thread_id) so it remembers the name you just gave it, and in the final Section 6 you merge every part into aconversational mini AI assistant that searches, calculates, and emits a structured report.
No environment setup required. Using CodeSandbox, you run everything from your first LLM call through RAG and agents in the browser alone. No Python install either. Andthe Gemini free tier alone carries you to the finish (no credit card required). Without paying for a single API, you can run all 20 drills with your own hands.
Not just becoming able to run samples, but becoming able todesign your own agents. That is the goal of this course.
Who this course is for
⭐ Engineers and learners who can write Python but don’t know how to build AI agents or LLM apps, and aren’t sure where to start.
⭐ Those who have touched the ChatGPT API but bounced off LangChain because old articles and v1 contradict each other—or who want to start now.
⭐ Anyone who knows the words RAG and AI agent but wants to actually get hands on and understand how they work from the mechanics up.
⭐ Individual developers and students who want to experience AI development end to end on the free tier, without paying for an API.
⭐ Those who want a solid LangChain 1.x foundation before moving on to more advanced agent development such as LangGraph or CrewAI.
此处内容需要权限查看
会员免费查看



