pub struct AgentContext {
pub system_prompt: String,
pub messages: Vec<AgentMessage>,
pub tools: Vec<Arc<dyn AgentTool>>,
}Expand description
The immutable snapshot passed into each loop turn.
Contains the system prompt, current message history, and the list of available tools. The loop never mutates a context in place — each turn produces a new snapshot.
Fields§
§system_prompt: String§messages: Vec<AgentMessage>§tools: Vec<Arc<dyn AgentTool>>The tools available during this turn.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentContext
impl !RefUnwindSafe for AgentContext
impl Send for AgentContext
impl Sync for AgentContext
impl Unpin for AgentContext
impl UnsafeUnpin for AgentContext
impl !UnwindSafe 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