pub struct AgentConfig {
pub model: Option<String>,
pub system_prompt: Option<String>,
pub tools: Vec<String>,
pub chain_limit: usize,
pub options: HashMap<String, Value>,
pub budget: Option<BudgetConfig>,
pub retry: Option<RetryConfig>,
pub parallel_tools: bool,
pub max_parallel_tools: Option<usize>,
}Expand description
Configuration for an agent, loaded from a TOML file.
Fields§
§model: Option<String>Model to use (falls back to global default_model if None).
system_prompt: Option<String>System prompt for the agent.
tools: Vec<String>Tool names the agent should use.
chain_limit: usizeMaximum chain loop iterations (default: 10).
options: HashMap<String, Value>Model options (temperature, max_tokens, etc.).
budget: Option<BudgetConfig>Budget configuration (max_tokens enforced by chain loop).
retry: Option<RetryConfig>Retry configuration for transient HTTP errors.
parallel_tools: boolDispatch tool calls in parallel within a single chain iteration. Default: true. Set to false for tools with ordering side-effects.
max_parallel_tools: Option<usize>Optional cap on parallel tool dispatch. None = unlimited.
Implementations§
Trait Implementations§
Source§impl Clone for AgentConfig
impl Clone for AgentConfig
Source§fn clone(&self) -> AgentConfig
fn clone(&self) -> AgentConfig
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 AgentConfig
impl Debug for AgentConfig
Source§impl Default for AgentConfig
impl Default 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 Freeze 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