| 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]]