pub struct MultiAgentConfig {
pub enabled: bool,
pub max_sub_agents: usize,
pub max_agent_depth: i32,
pub child_permission_mode: ChildPermissionMode,
}Expand description
Configuration for the multi-agent subsystem.
§Default
Multi-agent is enabled by default with limits of 8 sub-agents and depth 1. Disable it with:
use agent_works::AgentBuilder;
let agent = AgentBuilder::new(client)
.without_multi_agent()
.build()?;§Limits
Limits only take effect when enabled is true.
Fields§
§enabled: boolEnable multi-agent capabilities.
When true (default): all 6 multi-agent tools are registered, and the main
agent’s system prompt is augmented with usage guidance.
When false: no multi-agent tools are registered, and the system
prompt does not mention multi-agent capabilities.
max_sub_agents: usizeMaximum number of concurrent sub-agents.
Default: 8. Only enforced when enabled is true.
max_agent_depth: i32Maximum nesting depth for sub-agents.
Default: 1 (only direct children of root can spawn). A value of 0 means
no sub-agents can be spawned at all. Only enforced when enabled is true.
child_permission_mode: ChildPermissionModePermission mode for spawned child agents.
Default: ChildPermissionMode::Full.
Implementations§
Trait Implementations§
Source§impl Clone for MultiAgentConfig
impl Clone for MultiAgentConfig
Source§fn clone(&self) -> MultiAgentConfig
fn clone(&self) -> MultiAgentConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more