pub struct AgentConfig {
pub max_turns: Option<usize>,
pub max_tokens: Option<u32>,
pub system_prompt: String,
pub model: String,
pub retry: RetryConfig,
pub streaming: bool,
}Expand description
Configuration for the agent loop
Fields§
§max_turns: Option<usize>Maximum number of turns (LLM round-trips) before stopping
max_tokens: Option<u32>Maximum tokens per response.
If None, the SDK uses the provider/model-specific default.
system_prompt: StringSystem prompt for the agent
model: StringModel identifier
retry: RetryConfigRetry configuration for transient errors
streaming: boolEnable streaming responses from the LLM.
When true, emits TextDelta and ThinkingDelta events as text arrives
in real-time. When false (default), waits for the complete response
before emitting Text and Thinking events.
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 · 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
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