pub struct SubAgentConfig {Show 15 fields
pub enabled: bool,
pub max_concurrent: usize,
pub extra_dirs: Vec<PathBuf>,
pub user_agents_dir: Option<PathBuf>,
pub default_permission_mode: Option<PermissionMode>,
pub default_disallowed_tools: Vec<String>,
pub allow_bypass_permissions: bool,
pub default_memory_scope: Option<MemoryScope>,
pub hooks: SubAgentLifecycleHooks,
pub transcript_dir: Option<PathBuf>,
pub transcript_enabled: bool,
pub transcript_max_files: usize,
pub context_window_turns: usize,
pub max_spawn_depth: u32,
pub context_injection_mode: ContextInjectionMode,
}Expand description
Sub-agent pool configuration, nested under [agents] in TOML.
When enabled = true, the agent can spawn isolated sub-agent sessions from
SKILL.md-based agent definitions. Sub-agents inherit the parent’s provider pool
unless overridden by model in their definition frontmatter.
§Example (TOML)
[agents]
enabled = true
max_concurrent = 3
max_spawn_depth = 2Fields§
§enabled: boolEnable the sub-agent subsystem. Default: false.
max_concurrent: usizeMaximum number of sub-agents that can run concurrently.
extra_dirs: Vec<PathBuf>Additional directories to search for .agent.md definition files.
user_agents_dir: Option<PathBuf>User-level agents directory.
default_permission_mode: Option<PermissionMode>Default permission mode applied to sub-agents that do not specify one.
default_disallowed_tools: Vec<String>Global denylist applied to all sub-agents in addition to per-agent tools.except.
allow_bypass_permissions: boolAllow sub-agents to use bypass_permissions mode.
default_memory_scope: Option<MemoryScope>Default memory scope applied to sub-agents that do not set memory in their definition.
hooks: SubAgentLifecycleHooksLifecycle hooks executed when any sub-agent starts or stops.
transcript_dir: Option<PathBuf>Directory where transcript JSONL files and meta sidecars are stored.
transcript_enabled: boolEnable writing JSONL transcripts for sub-agent sessions.
transcript_max_files: usizeMaximum number of .jsonl transcript files to keep.
context_window_turns: usizeNumber of recent parent conversation turns to pass to spawned sub-agents. Set to 0 to disable history propagation.
max_spawn_depth: u32Maximum nesting depth for sub-agent spawns.
context_injection_mode: ContextInjectionModeHow parent context is injected into the sub-agent’s task prompt.
Trait Implementations§
Source§impl Clone for SubAgentConfig
impl Clone for SubAgentConfig
Source§fn clone(&self) -> SubAgentConfig
fn clone(&self) -> SubAgentConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more