pub struct MultiAgentConfig {
pub enabled: bool,
pub max_sub_agents: usize,
pub max_agent_depth: i32,
}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.
Implementations§
Trait Implementations§
Source§impl Clone for MultiAgentConfig
impl Clone for MultiAgentConfig
Source§fn clone(&self) -> MultiAgentConfig
fn clone(&self) -> MultiAgentConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MultiAgentConfig
impl Debug for MultiAgentConfig
Auto Trait Implementations§
impl Freeze for MultiAgentConfig
impl RefUnwindSafe for MultiAgentConfig
impl Send for MultiAgentConfig
impl Sync for MultiAgentConfig
impl Unpin for MultiAgentConfig
impl UnsafeUnpin for MultiAgentConfig
impl UnwindSafe for MultiAgentConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more