pub struct RuntimeAgent<T>where
T: AgentHandle,{ /* private fields */ }
Expand description
Default runtime wrapper that delegates to an inner agent implementation.
Implementations§
Source§impl<T> RuntimeAgent<T>where
T: AgentHandle,
impl<T> RuntimeAgent<T>where
T: AgentHandle,
Trait Implementations§
Source§impl<T> AgentHandle for RuntimeAgent<T>
impl<T> AgentHandle for RuntimeAgent<T>
fn describe<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AgentDescriptor> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_message<'life0, 'async_trait>(
&'life0 self,
input: AgentMessage,
state: Arc<AgentStateSnapshot>,
) -> Pin<Box<dyn Future<Output = Result<AgentMessage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn handle_message_stream<'life0, 'async_trait>(
&'life0 self,
input: AgentMessage,
state: Arc<AgentStateSnapshot>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<StreamChunk, Error>> + Send>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn handle_message_stream<'life0, 'async_trait>(
&'life0 self,
input: AgentMessage,
state: Arc<AgentStateSnapshot>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<StreamChunk, Error>> + Send>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Handle a message with streaming response
Default implementation falls back to non-streaming handle_message()
Source§fn current_interrupt<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<AgentInterrupt>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn current_interrupt<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<AgentInterrupt>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Get the current pending interrupt if any
Returns None if no interrupts are pending
Source§fn resume_with_approval<'life0, 'async_trait>(
&'life0 self,
_action: HitlAction,
) -> Pin<Box<dyn Future<Output = Result<AgentMessage, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn resume_with_approval<'life0, 'async_trait>(
&'life0 self,
_action: HitlAction,
) -> Pin<Box<dyn Future<Output = Result<AgentMessage, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Resume execution after human approval of an interrupt Read more
Auto Trait Implementations§
impl<T> Freeze for RuntimeAgent<T>
impl<T> RefUnwindSafe for RuntimeAgent<T>where
T: RefUnwindSafe,
impl<T> Send for RuntimeAgent<T>
impl<T> Sync for RuntimeAgent<T>
impl<T> Unpin for RuntimeAgent<T>
impl<T> UnwindSafe for RuntimeAgent<T>where
T: RefUnwindSafe,
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