pub struct AgentConfig {
pub max_iterations: usize,
pub context: ContextStrategy,
pub system_prompt: Option<String>,
pub persona_prompt: Option<String>,
pub agent_kind: AgentKind,
pub transcript_path: Option<String>,
pub context_assembler: ContextAssemblerConfig,
pub request_parameters: Parameters,
}Expand description
Configuration for agent behavior.
Fields§
§max_iterations: usizeMaximum number of agent loop iterations.
context: ContextStrategyContext management strategy.
system_prompt: Option<String>Generic system prompt content.
persona_prompt: Option<String>Optional persona overlay.
agent_kind: AgentKindAgent specialization (coding vs chatbot).
transcript_path: Option<String>Optional transcript path for long-memory recovery.
context_assembler: ContextAssemblerConfigContext assembly behavior.
request_parameters: ParametersRequest-level model parameters applied to each LLM call.
Implementations§
Source§impl AgentConfig
impl AgentConfig
Sourcepub const fn with_max_iterations(self, limit: usize) -> Self
pub const fn with_max_iterations(self, limit: usize) -> Self
Sets the maximum number of iterations.
Sourcepub const fn with_context(self, strategy: ContextStrategy) -> Self
pub const fn with_context(self, strategy: ContextStrategy) -> Self
Sets the context strategy.
Sourcepub fn with_system_prompt(self, prompt: impl Into<String>) -> Self
pub fn with_system_prompt(self, prompt: impl Into<String>) -> Self
Sets the system prompt.
Sourcepub fn with_persona_prompt(self, prompt: impl Into<String>) -> Self
pub fn with_persona_prompt(self, prompt: impl Into<String>) -> Self
Sets the persona prompt.
Sourcepub const fn with_agent_kind(self, kind: AgentKind) -> Self
pub const fn with_agent_kind(self, kind: AgentKind) -> Self
Sets the agent kind.
Sourcepub fn with_transcript_path(self, path: impl Into<String>) -> Self
pub fn with_transcript_path(self, path: impl Into<String>) -> Self
Sets a transcript path for memory recovery.
Sourcepub const fn with_idle_reassemble_after(
self,
idle_reassemble_after: Duration,
) -> Self
pub const fn with_idle_reassemble_after( self, idle_reassemble_after: Duration, ) -> Self
Sets the idle gap after which ephemeral context should be reassembled.
Sourcepub fn with_request_parameters(self, parameters: Parameters) -> Self
pub fn with_request_parameters(self, parameters: Parameters) -> Self
Sets default request-level model parameters for each LLM call.
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
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more