cursor-subagents
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
More from hktitan/cursor-sdk
cursor-hooks
File-based agent loop hooks via `.cursor/hooks.json` — pre/post commands, governance gates. Use when enforcing policy without modifying agent prompts.
1cursor-runs
Run lifecycle, streaming, follow-ups, and conversation introspection in the Cursor SDK. Use when consuming agent output, handling progress events, or chaining turns.
1cursor-sdk
Entry point for the Cursor TypeScript SDK — install, auth, and the Agent.create / Agent.resume / Agent.prompt lifecycle. Use when starting any Cursor SDK integration or wiring durable agent IDs.
1cursor-errors
CursorAgentError class hierarchy, isRetryable, and recovery patterns. Use when classifying SDK failures, building retry logic, or surfacing actionable messages.
1cursor-models
Model discovery and selection on Cursor SDK — Cursor.models.list, ModelSelection, parameters (e.g. thinking levels), per-run sticky overrides.
1cursor-cloud
Cloud runtime for Cursor SDK — dedicated VMs, repo-bound runs, auto-PR creation, artifacts, and reattachment. Use when running long, review-oriented, or repo-modifying agents off the local machine.
1