pub struct AgentFactory;Implementations§
Source§impl AgentFactory
impl AgentFactory
Sourcepub fn create(
agent_name: &str,
system_prompt: Option<String>,
model: Option<String>,
root: Option<String>,
auto_approve: bool,
add_dirs: Vec<String>,
) -> Result<Box<dyn Agent + Send + Sync>>
pub fn create( agent_name: &str, system_prompt: Option<String>, model: Option<String>, root: Option<String>, auto_approve: bool, add_dirs: Vec<String>, ) -> Result<Box<dyn Agent + Send + Sync>>
Create and configure an agent based on the provided parameters.
This handles:
- Loading config from ~/.zag/projects/
/zag.toml - Creating the appropriate agent implementation
- Resolving model size aliases (small/medium/large)
- Merging CLI flags with config file settings
- Configuring the agent with all settings
Auto Trait Implementations§
impl Freeze for AgentFactory
impl RefUnwindSafe for AgentFactory
impl Send for AgentFactory
impl Sync for AgentFactory
impl Unpin for AgentFactory
impl UnsafeUnpin for AgentFactory
impl UnwindSafe for AgentFactory
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