Deep Agents Tutorial · Course Guide
本课程共 14 章,基于 2026-09-17 核验的 Python 官方文档编写,是原创教学整理而非官方文档的完整镜像。
Deep Agents is an agent harness built on LangGraph: built-in filesystem tools, skills, memory, subagent delegation, and human-in-the-loop approval. The course goes from your first agent to production-grade composition (approval + idempotency + sandboxes).
Prerequisite: read LangGraph Tutorial chapters 1, 4, and 6 (graphs, tool calling, interrupts). Model examples need your own tool-calling model service (any OpenAI-compatible endpoint); credentials come from environment variables.
环境与版本边界
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -U deepagents
python -m pip freeze > requirements.lock.txtSince Deep Agents 0.7, task planning (write_todos) is opt-in; the delete file tool and the filesystem tool allowlist also require 0.7+. The version verified locally is 0.7.15. With pip show deepagents below 0.7, planning and some file-tool behavior differ.
章节路线
- Your first deep agent and its file tools
- Model routing and provider strings
- Filesystem permissions and path boundaries
- Sandbox execution and the shell tool
- Skills and progressive disclosure
- Memory and AGENTS.md
- Context compression and prompt caching
- Task planning and write_todos
- Subagents and context isolation
- Human-in-the-loop and conditional interrupts
- Streaming and subagent events
- Capstone: files + skills + delegation + approval
- Capstone 2: read-only codebase audit assistant
- Capstone 3: planning, delegation, and approval research pipeline