pub struct AgentContext {
pub system_prompt: String,
pub messages: Vec<AgentMessage>,
pub tools: Vec<Arc<dyn AgentTool>>,
}Expand description
A context snapshot handed to the low-level loop. Mirrors TS AgentContext.
Fields§
§system_prompt: String§messages: Vec<AgentMessage>§tools: Vec<Arc<dyn AgentTool>>Implementations§
Source§impl AgentContext
impl AgentContext
pub fn new(messages: Vec<AgentMessage>) -> Self
Trait Implementations§
Source§impl Clone for AgentContext
impl Clone for AgentContext
Source§fn clone(&self) -> AgentContext
fn clone(&self) -> AgentContext
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 AgentContext
impl Debug for AgentContext
Source§impl Default for AgentContext
impl Default for AgentContext
Source§fn default() -> AgentContext
fn default() -> AgentContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for AgentContext
impl !UnwindSafe for AgentContext
impl Freeze for AgentContext
impl Send for AgentContext
impl Sync for AgentContext
impl Unpin for AgentContext
impl UnsafeUnpin for AgentContext
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