pub struct AgentConfig {
pub model: ModelConfig,
pub instruction: Option<Template>,
pub query: Template,
pub tools: Vec<ToolRef>,
pub max_iterations: u32,
pub max_tool_calls_per_turn: Option<usize>,
pub parallel_tool_calls: bool,
pub memory: Option<MemoryConfig>,
pub vision: VisionConfig,
pub require_approval: Vec<String>,
pub max_tool_output_chars: usize,
}Expand description
Configuration of the agent node.
Fields§
§model: ModelConfig§instruction: Option<Template>System prompt.
query: TemplateUser message (default {{#sys.query#}}).
tools: Vec<ToolRef>§max_iterations: u32Maximum model calls. Default 10.
max_tool_calls_per_turn: Option<usize>Tool calls beyond this number in one turn are rejected with an error result.
parallel_tool_calls: bool§memory: Option<MemoryConfig>§vision: VisionConfig§require_approval: Vec<String>Tools that need host approval: provider/name, a tool name, or * for all.
max_tool_output_chars: usizeTool results longer than this (in characters) are truncated. Default 32 000.
Trait Implementations§
Source§impl Clone for AgentConfig
impl Clone for AgentConfig
Source§impl Debug for AgentConfig
impl Debug for AgentConfig
Source§impl<'de> Deserialize<'de> for AgentConfig
impl<'de> Deserialize<'de> for AgentConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for AgentConfig
impl Freeze for AgentConfig
impl Move for AgentConfig
impl RefUnwindSafe for AgentConfig
impl Send for AgentConfig
impl Sync for AgentConfig
impl Unpin for AgentConfig
impl UnsafeUnpin for AgentConfig
impl UnwindSafe for AgentConfig
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