pub struct DefaultStrategy;Expand description
The default agent strategy preserving v0.1.0 behavior.
This strategy implements the standard agent loop:
- Load context (memory + system prompt + user message)
- Loop: LLM call → parse response → execute tools → repeat
- Exit when LLM returns text instead of tool calls
Trait Implementations§
Source§impl AgentStrategy for DefaultStrategy
impl AgentStrategy for DefaultStrategy
Source§fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
runtime: &'life1 AgentRuntime,
input: &'life2 str,
session_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<AgentOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
runtime: &'life1 AgentRuntime,
input: &'life2 str,
session_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<AgentOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Execute the agent reasoning loop. Read more
Auto Trait Implementations§
impl Freeze for DefaultStrategy
impl RefUnwindSafe for DefaultStrategy
impl Send for DefaultStrategy
impl Sync for DefaultStrategy
impl Unpin for DefaultStrategy
impl UnsafeUnpin for DefaultStrategy
impl UnwindSafe for DefaultStrategy
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