{"id":51599986,"url":"https://github.com/datawhalechina/deepagents-in-action","last_synced_at":"2026-07-11T21:02:19.135Z","repository":{"id":357752680,"uuid":"1229618308","full_name":"datawhalechina/deepagents-in-action","owner":"datawhalechina","description":"📚 《Deep Agents 实战》—— LangChain 官方大使出品，基于 LangChain / LangGraph 生态，从零构建生产级 AI Agent 的完整指南","archived":false,"fork":false,"pushed_at":"2026-07-06T11:43:12.000Z","size":471636,"stargazers_count":1053,"open_issues_count":2,"forks_count":97,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-07-06T13:16:19.751Z","etag":null,"topics":["agentic-ai","ai-agents","astro","chinese","context-engineering","course","deepagents","langchain","langgraph","tailwindcss","tutorial"],"latest_commit_sha":null,"homepage":"https://datawhalechina.github.io/deepagents-in-action/","language":"Astro","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datawhalechina.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-05T08:14:44.000Z","updated_at":"2026-07-06T10:33:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/datawhalechina/deepagents-in-action","commit_stats":null,"previous_names":["webup/deepagents-course","datawhalechina/deepagents-in-action"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/datawhalechina/deepagents-in-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawhalechina%2Fdeepagents-in-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawhalechina%2Fdeepagents-in-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawhalechina%2Fdeepagents-in-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawhalechina%2Fdeepagents-in-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datawhalechina","download_url":"https://codeload.github.com/datawhalechina/deepagents-in-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawhalechina%2Fdeepagents-in-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35375153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","ai-agents","astro","chinese","context-engineering","course","deepagents","langchain","langgraph","tailwindcss","tutorial"],"created_at":"2026-07-11T21:02:15.008Z","updated_at":"2026-07-11T21:02:19.130Z","avatar_url":"https://github.com/datawhalechina.png","language":"Astro","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# 《Deep Agents 实战》\n\n**基于 LangChain / LangGraph 生态，系统构建生产级 AI Agent**\n\n[![Bilibili](https://img.shields.io/badge/视频合集-B站-00A1D6?logo=bilibili\u0026logoColor=white)](https://space.bilibili.com/28357052/lists/7757577?type=season)\n[![小红书](https://img.shields.io/badge/图文合集-小红书-FF2442?logo=xiaohongshu\u0026logoColor=white)](https://www.xiaohongshu.com/collection/item/69c4fd2a0072000000000001?xhsshare=\u0026appuid=65032a0300000000120065e8\u0026apptime=1778152909\u0026share_id=2abb593f301a4e60a6e71fbbee3c8967)\n[![Deep Agents](https://img.shields.io/badge/Deep%20Agents-≥%200.5-1C3C3C?logo=langchain\u0026logoColor=white)](https://docs.langchain.com/oss/python/deepagents/overview)\n[![License: CC BY-NC-SA 4.0](https://img.shields.io/badge/内容协议-CC%20BY--NC--SA%204.0-lightgrey)](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen)](CONTRIBUTING.md)\n\n\u003ca href=\"https://trendshift.io/developers/10200?utm_source=developer-badge\u0026utm_medium=badge\u0026utm_campaign=badge-developer-10200\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg src=\"https://trendshift.io/api/badge/developers/10200\" alt=\"webup | Trendshift\" width=\"250\" height=\"55\"/\u003e\u003c/a\u003e\n\n\u003cbr/\u003e\n\n由 **[沧海九粟](https://space.bilibili.com/28357052)** 出品 \u0026nbsp;·\u0026nbsp; LangChain 官方认证大使 \u0026nbsp;·\u0026nbsp; 《LangChain 实战》《LangGraph 实战》作者 \u0026nbsp;·\u0026nbsp; B 站万粉 UP 主\n\n\u003ca href=\"https://datawhalechina.github.io/deepagents-in-action/\"\u003e\n  \u003cimg src=\"public/imgs/hero.png\" alt=\"《Deep Agents 实战》课程网站\" width=\"800\" /\u003e\n\u003c/a\u003e\n\n\u003c/div\u003e\n\n---\n\n\u003e [!WARNING]\n\u003e 本课程讲授的 Deep Agents 版本为 **≥ 0.5**。\n\u003e 部分进阶功能有更高最低版本要求，章节正文会单独标注；例如 `FilesystemPermission` 基础权限需要 `deepagents\u003e=0.5.2`，`FilesystemBackend` 的 `virtual_mode` 参数需要 `deepagents\u003e=0.5.0`，`interrupt` 权限模式需要 `deepagents\u003e=0.6.8`。\n\u003e 官方文档：[Deep Agents Overview](https://docs.langchain.com/oss/python/deepagents/overview)\n\n\u003e [!NOTE]\n\u003e **🤖 模型选择**：示例默认通过 [硅基流动](https://cloud.siliconflow.cn/i/Fq9zUwPf) 接入模型。建议用 `MODEL_NAME` 环境变量管理模型名，而非写死在代码里；平台模型会不定期上下线，最新可用模型见 [模型广场](https://cloud.siliconflow.cn/models)。\n\u003e\n\u003e - **入门 / 简单任务** — 免费的 `Qwen/Qwen2.5-7B-Instruct` 即可跑通；如果想用更强一点、同时控制成本，`deepseek-ai/DeepSeek-V4-Flash` 也适合作为快速试跑的选择。\n\u003e - **复杂场景**（任务规划、上下文总结、多子 Agent 编排）— 小模型往往**无法稳定跑通**，需改用 SOTA 模型：\n\u003e   - `Pro/zai-org/GLM-5.1` — 智谱旗舰，Agent 任务同类最佳\n\n---\n\n## 课程大纲\n\n### 推荐技能\n\n配合课程学习，推荐安装以下两个 AI 编码助手技能，在开发过程中获得框架级的专业指导：\n\n```bash\n# LangChain 开发指南 — 工程陷阱与验证修复\nnpx skills add ob-labs/agentseek --skill langchain-dev-guide\n\n# LangSmith Trace 调试 — 追踪与性能分析\nnpx skills add ob-labs/agentseek --skill langsmith-trace\n```\n\n\u003e 技能源码：[langchain-dev-guide](https://github.com/ob-labs/agentseek/tree/main/skills/langchain-dev-guide) · [langsmith-trace](https://github.com/ob-labs/agentseek/tree/main/skills/langsmith-trace)\n\n### 准备篇 — 动手实操前的环境搭建与工具安装\n\n基于 [AgentSeek](https://github.com/ob-labs/agentseek) 工程化套件，帮助学员快速搭建开发环境：\n\n- [`agentseek create` 搭建模板应用](https://datawhalechina.github.io/deepagents-in-action/chapters/pre01-agentseek-create/)：拉取预制模板并前后端联调运行\n- [`agentseek skills` 安装开发技能](https://datawhalechina.github.io/deepagents-in-action/chapters/pre02-agentseek-skills/)：为 AI 编码助手加载 LangChain 工程经验\n\n### 认知篇\n\n| 章节 | 标题 |\n|------|------|\n| 第 1 章 | [从 Agent Framework 到 Agent Harness — Deep Agents 的诞生逻辑](https://datawhalechina.github.io/deepagents-in-action/chapters/ch01-agent-harness/) |\n| 第 2 章 | [快速上手 — 5 分钟构建你的第一个 Deep Agent](https://datawhalechina.github.io/deepagents-in-action/chapters/ch02-quickstart/) |\n\n### 核心篇\n\n| 章节 | 标题 |\n|------|------|\n| 第 3 章 | [虚拟文件系统 — Deep Agents 的 Context Engineering 核心](https://datawhalechina.github.io/deepagents-in-action/chapters/ch03-virtual-filesystem/) |\n| 第 4 章 | [任务规划与分解 — 让 Agent 学会拆解复杂任务](https://datawhalechina.github.io/deepagents-in-action/chapters/ch04-task-planning/) |\n| 第 5 章 | [子 Agent 与上下文隔离 — 让 Agent 学会委派](https://datawhalechina.github.io/deepagents-in-action/chapters/ch05-subagents/) |\n| 第 6 章 | [异步子 Agent — 让主 Agent 同时驱动多个子任务](https://datawhalechina.github.io/deepagents-in-action/chapters/ch06-async-subagents/) |\n\n### 进阶篇\n\n| 章节 | 标题 |\n|------|------|\n| 第 7 章 | [Skills — 可复用的 Agent 能力包](https://datawhalechina.github.io/deepagents-in-action/chapters/ch07-skills/) |\n| 第 8 章 | [长期记忆 — 让 Agent 拥有跨对话的记忆](https://datawhalechina.github.io/deepagents-in-action/chapters/ch08-long-term-memory/) |\n| 第 9 章 | [Human-in-the-Loop — 构建安全的人机协作流程](https://datawhalechina.github.io/deepagents-in-action/chapters/ch09-human-in-the-loop/) |\n| 第 10 章 | [沙箱执行 — 让 Agent 安全地运行代码](https://datawhalechina.github.io/deepagents-in-action/chapters/ch10-sandboxes/) |\n\n后续还有更多进阶内容，以及实战篇（流式前端、数据分析 Agent、生产部署）正在规划中，持续更新。\n\n---\n\n## 配套资源\n\n- **视频合集**：[B 站 — 《Deep Agents 实战》合集](https://space.bilibili.com/28357052/lists/7757577?type=season)\n- **图文合集**：[小红书 — 《Deep Agents 实战》合集](https://www.xiaohongshu.com/collection/item/69c4fd2a0072000000000001?xhsshare=\u0026appuid=65032a0300000000120065e8\u0026apptime=1778152909\u0026share_id=2abb593f301a4e60a6e71fbbee3c8967)\n- **课程网站**：部署在 GitHub Pages\n\n---\n\n## 友情链接\n由 **[沧海九粟](https://space.bilibili.com/28357052)** 在 DataWhale 上开源的另一门课程，是面向所有 AI 爱好者的 Data 与 AI 基础入门教程 —— [《Easy Data x AI》](https://github.com/datawhalechina/easy-data-x-ai)。目前已经进入了内测阶段，欢迎大家来学习和积极参与共建。\n\n---\n\n## 模型算力支持\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"180\" align=\"center\" valign=\"middle\"\u003e\n\u003ca href=\"https://cloud.siliconflow.cn/i/Fq9zUwPf\" target=\"_blank\" rel=\"noopener\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"public/imgs/siliconflow-dark.svg\" /\u003e\n    \u003cimg src=\"public/imgs/siliconflow.svg\" alt=\"SiliconFlow 硅基流动\" width=\"150\" /\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd valign=\"middle\"\u003e\n本课程的模型算力由 \u003cstrong\u003e\u003ca href=\"https://cloud.siliconflow.cn/i/Fq9zUwPf\"\u003e硅基流动（SiliconFlow）\u003c/a\u003e\u003c/strong\u003e 支持。硅基流动是一站式大模型云服务平台，基于自研推理引擎实现大模型高效推理加速，提供高效能、低成本的多品类 AI 模型服务，让开发者和企业聚焦产品创新，无须担心大规模推广带来的高昂算力成本。\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n- 🎁 **新用户福利**：通过 [课程专属注册链接](https://cloud.siliconflow.cn/i/Fq9zUwPf) 注册并完成实名认证，即可获得 **16 元全平台通用代金券**，可用于平台上百余种模型的调用，足够跑通本课程的全部示例。\n- 🧪 **实验配额补贴池**：用上面的链接注册时，作者也会获得平台返利。这部分返利会**全额回馈给学员**——汇集成一个「实验配额补贴池」：跟着课程做实验、复现示例时如果额度不够用，可以[联系作者](https://space.bilibili.com/28357052)申请额外的算力配额补贴，把福利转回给真正在动手的同学。\n\n---\n\n## ❤️ 特别感谢\n\n- 感谢 [@Sm1les](https://github.com/Sm1les) 对本项目的帮助与支持。\n- 感谢每一位为本项目提交代码、修正文档、提出建议的开发者，所有贡献都让这门课程变得更好。❤️\n\n\u003cdiv align=\"left\"\u003e\n\n\u003ca href=\"https://github.com/datawhalechina/deepagents-in-action/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=datawhalechina/deepagents-in-action\" alt=\"Deep Agents 实战贡献者\" /\u003e\n\u003c/a\u003e\n\n\u003c/div\u003e\n\n---\n\n## Star History\n\n\u003ca href=\"https://www.star-history.com/?repos=datawhalechina%2Fdeepagents-in-action\u0026type=date\u0026legend=top-left\"\u003e\n \u003cpicture\u003e\n   \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/chart?repos=datawhalechina/deepagents-in-action\u0026type=date\u0026theme=dark\u0026legend=top-left\u0026sealed_token=mtwEZqXnyl4dS7dntbunJS6paWzuY4nYHRakXExwwhUfgmgAhGfSne4zD1pbE3xskKASHP6zESCxqlrl9SkOYnwu5XnyLmszazov5JUJYDSUMQqJmnZYBw\" /\u003e\n   \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/chart?repos=datawhalechina/deepagents-in-action\u0026type=date\u0026legend=top-left\u0026sealed_token=mtwEZqXnyl4dS7dntbunJS6paWzuY4nYHRakXExwwhUfgmgAhGfSne4zD1pbE3xskKASHP6zESCxqlrl9SkOYnwu5XnyLmszazov5JUJYDSUMQqJmnZYBw\" /\u003e\n   \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/chart?repos=datawhalechina/deepagents-in-action\u0026type=date\u0026legend=top-left\u0026sealed_token=mtwEZqXnyl4dS7dntbunJS6paWzuY4nYHRakXExwwhUfgmgAhGfSne4zD1pbE3xskKASHP6zESCxqlrl9SkOYnwu5XnyLmszazov5JUJYDSUMQqJmnZYBw\" /\u003e\n \u003c/picture\u003e\n\u003c/a\u003e\n\n---\n\n## 本地开发\n\n### 环境要求\n\n- Node.js ≥ 22.12.0\n\n### 安装与启动\n\n```bash\n# 安装依赖\nnpm install\n\n# 启动开发服务器（含内容预处理）\nnpm run dev\n\n# 构建生产版本\nnpm run build\n\n# 预览构建产物\nnpm run preview\n```\n\n### 项目结构\n\n```\ndeepagents-in-action/\n├── content/          # 章节正文（Markdown，每章一个文件）\n│   ├── ch01-agent-harness.md\n│   ├── ch02-quickstart.md\n│   └── ...\n├── public/\n│   ├── imgs/         # 正文插图\n│   └── pdfs/         # 章节 PDF\n├── scripts/\n│   ├── chapters.json # 章节元数据（标题、发布状态、视频链接等）\n│   └── prep-content.mjs  # 内容预处理脚本（注入 frontmatter）\n└── src/\n    ├── components/   # Astro 组件\n    ├── layouts/      # 页面布局\n    └── pages/        # 路由页面\n```\n\n### 内容流水线\n\n`content/` 目录中的 Markdown 文件是**源文件**，不含 frontmatter。  \n`scripts/prep-content.mjs` 在 `dev` / `build` 前自动运行，从 `scripts/chapters.json` 读取元数据，生成带 frontmatter 的文件到 `src/content/chapters/`。\n\n\u003e 注意：`content/` 下 `.md` 文件的首行 H1 标题在生成时会被自动移除，\n\u003e 页面标题统一取自 `scripts/chapters.json`。\n\n**添加或修改章节内容，只需编辑 `content/` 目录下对应的 `.md` 文件。**  \n**修改标题、发布状态、视频链接等元数据，编辑 `scripts/chapters.json`。**\n\n---\n\n## 技术栈\n\n- [Astro 6](https://astro.build/) — 静态站点框架\n- [Tailwind CSS 4](https://tailwindcss.com/) — 样式\n- TypeScript\n\n---\n\n## 开源协议\n\n课程文字内容采用 [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh) 协议。  \n网站源代码采用 [MIT](https://opensource.org/license/mit) 协议。\n\n---\n\n欢迎提交 PR 修正错别字、改善排版，或参与内容讨论。所有贡献者都会出现在**特别感谢**中，并获赠 LangChain 官方社区（中国）礼品。详见 [CONTRIBUTING.md](CONTRIBUTING.md)。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatawhalechina%2Fdeepagents-in-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatawhalechina%2Fdeepagents-in-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatawhalechina%2Fdeepagents-in-action/lists"}