pub struct AgentLoopConfig {Show 18 fields
pub model_id: String,
pub system_prompt: Option<String>,
pub temperature: f32,
pub max_tokens: u32,
pub max_iterations: usize,
pub tool_execution: ToolExecutionMode,
pub compaction_strategy: CompactionStrategy,
pub context_window: usize,
pub compaction_instruction: Option<String>,
pub session_id: Option<String>,
pub transport: Option<String>,
pub compact_on_start: bool,
pub max_retry_delay_ms: Option<u64>,
pub auto_retry_enabled: bool,
pub auto_retry_max_attempts: usize,
pub auto_retry_base_delay_ms: u64,
pub api_key: Option<String>,
pub workspace_dir: Option<PathBuf>,
}Expand description
Configuration for an crate::AgentLoop instance.
Fields§
§model_id: StringModel identifier in provider/model format.
system_prompt: Option<String>Optional system prompt prepended to every request.
temperature: f32Sampling temperature (0.0 – 2.0).
max_tokens: u32Maximum tokens the model may generate per request.
max_iterations: usizeMaximum number of assistant turns before the loop stops.
tool_execution: ToolExecutionModeWhether tool calls run in parallel or sequentially.
compaction_strategy: CompactionStrategyCompaction strategy for managing context window usage.
context_window: usizeApproximate context window size in tokens.
compaction_instruction: Option<String>Optional instruction injected into the compaction prompt.
session_id: Option<String>Optional session identifier for logging and tracing.
transport: Option<String>Optional transport override (e.g. “sse”, “stdio”).
compact_on_start: boolWhether to trigger compaction before the first turn.
max_retry_delay_ms: Option<u64>Optional cap on retry back-off delay (milliseconds).
auto_retry_enabled: boolEnable automatic retry on retryable assistant errors.
auto_retry_max_attempts: usizeMaximum number of auto-retry attempts.
auto_retry_base_delay_ms: u64Base delay in milliseconds for auto-retry exponential back-off.
api_key: Option<String>API key override for the provider.
When set, this is injected into oxi_ai::StreamOptions so the
provider uses it instead of an environment variable.
workspace_dir: Option<PathBuf>Working directory for file tools. Defaults to current directory if None.
Trait Implementations§
Source§impl Clone for AgentLoopConfig
impl Clone for AgentLoopConfig
Source§fn clone(&self) -> AgentLoopConfig
fn clone(&self) -> AgentLoopConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more