pub struct AgentDefinition {Show 22 fields
pub agent_type: String,
pub when_to_use: String,
pub tools: Vec<String>,
pub disallowed_tools: Vec<String>,
pub source: String,
pub base_dir: String,
pub get_system_prompt: Arc<dyn Fn() -> String + Send + Sync>,
pub model: Option<String>,
pub max_turns: Option<usize>,
pub permission_mode: Option<String>,
pub effort: Option<String>,
pub color: Option<String>,
pub mcp_servers: Vec<AgentMcpServerSpec>,
pub hooks: Option<Value>,
pub skills: Vec<String>,
pub background: bool,
pub initial_prompt: Option<String>,
pub memory: Option<AgentMemoryScope>,
pub isolation: Option<String>,
pub required_mcp_servers: Vec<String>,
pub omit_claude_md: bool,
pub critical_system_reminder_experimental: Option<String>,
}Expand description
Base type with common fields for all agents
Fields§
§agent_type: String§when_to_use: String§tools: Vec<String>§disallowed_tools: Vec<String>§source: String§base_dir: String§get_system_prompt: Arc<dyn Fn() -> String + Send + Sync>§model: Option<String>§max_turns: Option<usize>§permission_mode: Option<String>§effort: Option<String>§color: Option<String>§mcp_servers: Vec<AgentMcpServerSpec>§hooks: Option<Value>§skills: Vec<String>§background: bool§initial_prompt: Option<String>§memory: Option<AgentMemoryScope>§isolation: Option<String>§required_mcp_servers: Vec<String>§omit_claude_md: bool§critical_system_reminder_experimental: Option<String>Implementations§
Source§impl AgentDefinition
impl AgentDefinition
pub fn system_prompt(&self) -> String
pub fn is_built_in(&self) -> bool
Trait Implementations§
Source§impl Clone for AgentDefinition
impl Clone for AgentDefinition
Source§fn clone(&self) -> AgentDefinition
fn clone(&self) -> AgentDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AgentDefinition
impl !RefUnwindSafe for AgentDefinition
impl Send for AgentDefinition
impl Sync for AgentDefinition
impl Unpin for AgentDefinition
impl UnsafeUnpin for AgentDefinition
impl !UnwindSafe for AgentDefinition
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