pub struct Agent<'a> { /* private fields */ }Expand description
Autonomous multi-step agent.
Implementations§
Source§impl<'a> Agent<'a>
impl<'a> Agent<'a>
pub fn new( adapter: &'a ProtocolAdapter, llm: &'a dyn LLMProvider, emitter: &'a SpiderEventEmitter, options: Option<AgentOptions>, ) -> Self
Sourcepub async fn execute(&self, instruction: &str) -> AgentResult
pub async fn execute(&self, instruction: &str) -> AgentResult
Execute the agent loop until the task is done or max rounds reached.
Auto Trait Implementations§
impl<'a> Freeze for Agent<'a>
impl<'a> !RefUnwindSafe for Agent<'a>
impl<'a> Send for Agent<'a>
impl<'a> Sync for Agent<'a>
impl<'a> Unpin for Agent<'a>
impl<'a> UnsafeUnpin for Agent<'a>
impl<'a> !UnwindSafe for Agent<'a>
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