pub struct AgentTypeDefinition {Show 14 fields
pub name: String,
pub source: AgentTypeSource,
pub description: String,
pub allowed_tools: Vec<String>,
pub disallowed_tools: Vec<String>,
pub model: Option<String>,
pub provider: Option<String>,
pub permission_mode: Option<PermissionMode>,
pub effort: Option<String>,
pub max_turns: Option<u32>,
pub skills: Vec<String>,
pub mcp_servers: Vec<String>,
pub scene: Option<String>,
pub system_prompt: String,
}Expand description
A named agent type definition with associated system prompt and tool set.
Fields§
§name: StringUnique name (e.g. “explore”, “plan”, “code-reviewer”).
source: AgentTypeSourceProvenance, for the override clamp — see AgentTypeSource.
description: StringShort description of the agent type’s purpose.
allowed_tools: Vec<String>Tool names the agent type is allowed to use (empty = all tools).
disallowed_tools: Vec<String>Tool names removed from the pool, applied before allowed_tools
(deny first, then allow).
model: Option<String>The model its sub-agents use: strong, balanced or fast (also
opus, sonnet, haiku, as Claude Code writes them), inherit for
the parent’s, or a model id.
provider: Option<String>The provider its sub-agents’ calls go to first, the rest following
model.order. One the session’s pair does not define is ignored.
permission_mode: Option<PermissionMode>Optional permission mode for spawned subagents of this type. Whether
it may be looser than the parent session’s depends on source.
effort: Option<String>Optional ModelSettings::effort override for spawned subagents, by
name (low … max).
max_turns: Option<u32>Maximum API calls a spawned subagent of this type may make, applied
as this subagent’s own turn.max_model_calls instead of
inheriting the parent’s cap wholesale. None = inherit parent’s cap.
skills: Vec<String>Skill names to preload in full at subagent startup (not just their
descriptions) — see AgentTool’s spawn path. A name that doesn’t
resolve, or resolves to a disable_model_invocation: true skill, is
skipped with a tracing::warn! rather than failing the spawn.
mcp_servers: Vec<String>MCP server names to grant this subagent, referencing servers already
connected in the parent session (settings.mcp_servers keys) — the
parent’s live connections are reused, not reconnected. A subagent
gets zero MCP tools by default — MCP access is opt-in per
subagent, not inherited; this is the opt-in list. Only name
references to an already-configured server are supported, not inline
server config.
scene: Option<String>Scene id (code/harnix/mini) this agent type forces
its sub-agents into, overriding the scene inherited from the parent.
None (the default) inherits — see Delegator::scene_for_subagent. An
unknown id is ignored with a tracing::warn! and the inherited scene
is kept, same non-fatal handling as an unrecognized effort.
system_prompt: StringSystem prompt injected into the sub-agent’s context.