pub struct SubagentDefinition {Show 13 fields
pub description: String,
pub prompt: String,
pub tools: Option<Vec<String>>,
pub disallowed_tools: Option<Vec<String>>,
pub model: Option<String>,
pub skills: Option<Vec<String>>,
pub memory: Option<SubagentMemory>,
pub mcp_servers: Option<Vec<SubagentMcpServerRef>>,
pub initial_prompt: Option<String>,
pub max_turns: Option<u64>,
pub background: Option<bool>,
pub effort: Option<SubagentEffort>,
pub permission_mode: Option<PermissionMode>,
}Fields§
§description: StringShort description shown to the main agent when it picks a subagent.
prompt: StringSystem prompt the subagent runs with.
tools: Option<Vec<String>>Tool allowlist for this subagent. None = no additional restriction.
disallowed_tools: Option<Vec<String>>Tool denylist for this subagent. Wire key is disallowedTools.
model: Option<String>Model alias ("sonnet", "opus", "haiku", "inherit") or a
full model ID. None = inherit the main agent’s model.
skills: Option<Vec<String>>Concrete skills this subagent should load.
memory: Option<SubagentMemory>Which CLAUDE.md scope to surface.
mcp_servers: Option<Vec<SubagentMcpServerRef>>MCP servers available to this subagent. Each entry is either a named
reference to a top-level server or an inline {name: config}
definition. Wire key is mcpServers.
initial_prompt: Option<String>Seed turn injected at subagent start. Wire key is initialPrompt.
max_turns: Option<u64>Upper bound on turns this subagent may take. Wire key is maxTurns.
background: Option<bool>Run the subagent without surfacing its intermediate turns in the parent transcript.
effort: Option<SubagentEffort>Reasoning-effort hint.
permission_mode: Option<PermissionMode>Override permission-mode for this subagent only. Wire key is
permissionMode.