Skip to main content

cursor-subagents

Define delegated subagents on a Cursor SDK agent via the `agents` field — `AgentDefinition`, MCP scoping, and model inheritance. Use when decomposing work across specialist personas.

来源信息

仓库
HKTITAN/cursor-sdk
最近来源活动
2026年5月3日 08:23
检测到的 SKILL.md 语言
英语
星标
2
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
7 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
cursor-subagents
description
Define delegated subagents on a Cursor SDK agent via the `agents` field — `AgentDefinition`, MCP scoping, and model inheritance. Use when decomposing work across specialist personas.
metadata
{"internal":false,"source":"https://cursor.com/docs/sdk/typescript"}
# cursor-subagents The Cursor SDK has first-class subagents: declare them on `AgentOptions.agents` and the parent agent decides when to spawn them. This is **not** a manual orchestration layer — the parent's planner picks subagents based on their `description`. ## When to use - Splitting a workload into specialist personas (planner, coder, reviewer) - Scoping a subagent to a subset of MCP servers - Running subagents on a different model from the parent ## Configuration - [[references/agents-field]] — `AgentOptions.agents: Record<string, AgentDefinition>` - [[references/agent-definition]] — `description`, `prompt`, `model`, `mcpServers` - [[references/mcp-scoping]] — restricting tool access per subagent - [[references/model-inheritance]] — `"inherit"` vs explicit override - [[references/persistence]] — re-pass on `Agent.resume` ## Observation - [[references/task-events]] — `SDKTaskMessage` in the run stream ## Cross-links - MCP server names → [[../cursor-mcp/references/inline-config]] - Models → [[../cursor-models/SKILL]]
在 GitHub 查看