pub struct AgentConfig {Show 14 fields
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,
pub keep_tool_images: Option<usize>,
pub stream_tool_turns: bool,
pub tool_context: Map<String, Value>,
}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.
keep_tool_images: Option<usize>Keep the images of only the last N image-bearing tool results in the
conversation (older ones become a text placeholder). Default 3, since
images are resent on every turn; null keeps every image.
stream_tool_turns: boolStream the text of turns that may still call tools as it is generated
(see the module docs). Default true; false buffers those turns.
tool_context: Map<String, Value>Per provider, named values sent with every call to that provider’s tools
({provider: {name: template}}), outside the arguments. See the module docs.
Kept as raw JSON (parsed by AgentNode::from_doc) so no extra serde
code is generated for a rarely used field.