pub struct Agent { /* private fields */ }Implementations§
Source§impl Agent
impl Agent
pub fn new( provider: Arc<dyn Provider>, tools: Arc<ToolRunner>, store: Arc<Mutex<SessionStore>>, session_id: String, system_prompt: String, max_cycles: usize, ) -> Self
pub fn with_context_budget( self, context_window: Option<u64>, max_output_tokens: u64, ) -> Self
pub async fn submit( &self, prompt: &str, events: EventSink, cancel: CancellationToken, ) -> Result<AgentResult>
pub async fn compact( &self, events: EventSink, cancel: CancellationToken, ) -> Result<bool>
pub fn context_status(&self) -> Result<ContextStatus>
pub fn record_interruption(&self) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for Agent
impl !UnwindSafe for Agent
impl Freeze for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnsafeUnpin for Agent
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