pub struct AgentConfig {
pub agent_type: AgentType,
pub system_prompt: String,
pub max_retries: usize,
pub max_reasoning_tools: usize,
}Expand description
Configuration for creating an agent.
Fields§
§agent_type: AgentType§system_prompt: String§max_retries: usizeMax retry attempts for FlexibleAgent (default: 1, no retry).
max_reasoning_tools: usizeMax reasoning tools for HybridAgent (default: 1 — just ReasoningTool).
Implementations§
Source§impl AgentConfig
impl AgentConfig
Sourcepub fn from_value(val: &Value) -> Result<Self, String>
pub fn from_value(val: &Value) -> Result<Self, String>
Parse from a JSON Value.
Expected format:
{
"type": "sgr",
"system_prompt": "You are a coding agent.",
"max_retries": 3,
"max_reasoning_tools": 1
}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