pub struct AgentConfig {
pub model: String,
pub system_prompt: String,
pub max_turns: u32,
pub max_tokens: u32,
pub context: ContextBundle,
}Expand description
Configuration for the agent loop.
Fields§
§model: StringThe LLM model to use.
system_prompt: StringThe system prompt.
max_turns: u32Maximum number of agent turns before stopping.
max_tokens: u32Maximum tokens per response.
context: ContextBundleContext bundle (AGENTS.md, SYSTEM.md, user context).
Implementations§
Source§impl AgentConfig
impl AgentConfig
Sourcepub fn system_prompt(self, prompt: impl Into<String>) -> Self
pub fn system_prompt(self, prompt: impl Into<String>) -> Self
Set the system prompt.
Sourcepub fn max_tokens(self, max: u32) -> Self
pub fn max_tokens(self, max: u32) -> Self
Set the maximum tokens per response.
Sourcepub fn context(self, context: ContextBundle) -> Self
pub fn context(self, context: ContextBundle) -> Self
Set the context bundle.
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 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