Skip to main content

Documentation Index

Fetch the complete documentation index at: https://nvd-54.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

将自定义同步子智能体定义为 Markdown 文件,以便 CLI 智能体可以将专门的任务委派给它们。
异步子智能体目前在深度智能体 CLI 中不可用。
每个子智能体都存放在一个独立的文件夹中,包含一个 AGENTS.md 文件:
.deepagents/agents/{subagent-name}/AGENTS.md   # 项目级别
~/.deepagents/{agent}/agents/{subagent-name}/AGENTS.md  # 用户级别
项目级子智能体会覆盖同名的用户级子智能体(参见优先级规则)。 frontmatter 需要 namedescription 字段(与 SubAgent 字典规范相同)。Markdown 正文将成为子智能体的 system_prompt。除了基本规范之外,AGENTS.md 文件还支持一个可选的 model frontmatter 字段,用于覆盖主智能体为该子智能体使用的模型。使用 provider:model-name 格式(例如 anthropic:claude-opus-4-7openai:gpt-5.5)。省略此字段则继承主智能体的模型。
其他 SubAgent 字段(toolsmiddlewareinterrupt_onskills)目前无法通过 AGENTS.md frontmatter 配置——以这种方式定义的自定义子智能体会继承主智能体的工具。如需完全控制,请直接使用 SDK。

文件格式

子智能体的 AGENTS.md 文件使用 YAML frontmatter,后跟 Markdown 正文:
---
name: researcher
description: Research topics on the web before writing content
model: anthropic:claude-haiku-4-5-20251001
---

You are a research assistant with access to web search.

## Your Process
1. Search for relevant information
2. Summarize findings clearly

示例:高性价比子智能体

对简单的委派任务使用更便宜、更快的模型,同时让主智能体保持使用更强大的模型:
---
name: general-purpose
description: General-purpose agent for research and multi-step tasks
model: anthropic:claude-haiku-4-5-20251001
---

You are a general-purpose assistant. Complete the task efficiently and return a concise summary.
这将覆盖内置的通用子智能体,将所有委派任务路由到更便宜的模型。更多信息请参见覆盖通用子智能体