pub struct AgentState {
pub system_prompt: String,
pub model: Model,
pub thinking_level: ThinkingLevel,
pub tools: Vec<Arc<dyn AgentTool>>,
pub messages: Vec<AgentMessage>,
pub is_streaming: bool,
pub streaming_message: Option<AgentMessage>,
pub pending_tool_calls: HashSet<String>,
pub error_message: Option<String>,
}Expand description
Public agent state snapshot. Mirrors TS AgentState (the readable subset).
tools/messages clone on read so callers can’t mutate internal state.
Fields§
§system_prompt: String§model: Model§thinking_level: ThinkingLevel§tools: Vec<Arc<dyn AgentTool>>§messages: Vec<AgentMessage>§is_streaming: bool§streaming_message: Option<AgentMessage>§pending_tool_calls: HashSet<String>§error_message: Option<String>Trait Implementations§
Source§impl Clone for AgentState
impl Clone for AgentState
Source§fn clone(&self) -> AgentState
fn clone(&self) -> AgentState
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 AgentState
impl Debug for AgentState
Auto Trait Implementations§
impl !RefUnwindSafe for AgentState
impl !UnwindSafe for AgentState
impl Freeze for AgentState
impl Send for AgentState
impl Sync for AgentState
impl Unpin for AgentState
impl UnsafeUnpin for AgentState
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