pub struct AgentConfig {
pub tools: Option<Arc<Registry>>,
pub hooks: Option<Arc<HookRegistry>>,
pub system_prompt: String,
pub max_turns: u32,
pub max_tokens: usize,
pub wall_clock: Duration,
pub max_tool_calls: u32,
pub tool_concurrency: usize,
pub tool_timeout: Duration,
pub policy: Option<Policy>,
pub context_strategy: Option<Box<dyn ContextStrategy>>,
pub model: String,
}Expand description
Configuration for an crate::Agent.
Fields§
§tools: Option<Arc<Registry>>Optional tool registry.
hooks: Option<Arc<HookRegistry>>Optional hook registry for lifecycle events.
system_prompt: StringSystem prompt prepended to every completion request.
max_turns: u32Maximum number of turns before the agent stops.
max_tokens: usizeMaximum cumulative token budget (input + output) across all turns.
wall_clock: DurationMaximum wall-clock time for a run.
max_tool_calls: u32Maximum logical tool calls. Retries count as one logical call.
tool_concurrency: usizeMaximum concurrently scheduled tool calls.
tool_timeout: DurationPer-tool call timeout.
policy: Option<Policy>Optional resilience policy applied to tool executions.
context_strategy: Option<Box<dyn ContextStrategy>>Strategy for compacting context when it exceeds the provider’s limit.
model: StringModel identifier to send with each completion request.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AgentConfig
impl !UnwindSafe for AgentConfig
impl Freeze for AgentConfig
impl Send for AgentConfig
impl Sync for AgentConfig
impl Unpin for AgentConfig
impl UnsafeUnpin 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