deepagents-overview
理解 Deep Agents 框架 - 它们是什么、如何使用 createDeepAgent 创建,以及 agent harness 架构,包括内置的规划、文件系统和子代理中间件。
npx skills add majiayu000/claude-skill-registry --skill deepagents-overview --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# deepagents-overview (JavaScript/TypeScript) ## 什么是 Deep Agents? Deep Agents 是一个基于 LangChain 和 LangGraph 构建的自有代理框架,专为复杂的多步骤任务而设计。它们"开箱即用",具有内置功能: - **任务规划**:TodoListMiddleware 用于分解复杂任务 - **上下文管理**:具有可插拔后端的文件系统工具 - **任务委托**:SubAgent 中间件用于启动专用代理 - **长期内存**:通过 Store 跨会话持久化存储 - **人工干预**:敏感操作的审批工作流 Deep Agents 使用"agent harness"架构 - 与其他框架相同的核心工具调用循环,但具有预配置的中间件和工具。 ## 何时使用 Deep Agents | 使用 Deep Agents 当 | 使用 LangChain 的 createAgent 当 | |---------------------|-----------------------------------| | 需要规划的多步骤任务 | 简单、单一用途的任务 | | 需要文件管理的大上下文 | 上下文适合单个提示 | | 需要专用子代理 | 单个代理足够 | | 跨会话持久化内存 | 临时的单会话工作 | | CLI 或编码助手用例 | 简单 API 或聊天应用 | ## 创建 Deep Agent ### 基本代理创建 ```typescript import { createDeepAgent } from "deepagents"; // 具有默认设置的最小代理 const agent = await createDeepAgent({}); // 调用代理 const result = await agent.invoke({ messages: [ { role: "user", content: "东京的天气怎么样?" } ] }); ``` ### 具有自定义工具的代理 ```typescript import { createDeepAgent } from "deepagents"; import { tool } from "langchain"; import { z } from "zod"; const getWeather = tool( ({ city }) => `${city} 总是晴天!`, { name: "get_weather", description: "获取给定城市的天气", schema: z.object({ city: z.string(), }), } ); const agent = await createDeepAgent({ to
- 什么是 Deep Agents?
- 何时使用 Deep Agents
- 创建 Deep Agent
- 基本代理创建
- 具有自定义工具的代理
- 具有自定义模型的代理
- Agent Harness 架构
- 内置工具
- 配置选项
- 决策表:要自定义哪个中间件
- 边界
- Agent 可以配置的内容
- Agent 不能配置的内容
- 注意事项
What does the deepagents-overview skill do?
理解 Deep Agents 框架 - 它们是什么、如何使用 createDeepAgent 创建,以及 agent harness 架构,包括内置的规划、文件系统和子代理中间件。
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill deepagents-overview --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
