pub struct AgentRuntime { /* private fields */ }Implementations§
Source§impl AgentRuntime
impl AgentRuntime
pub fn create_session(&mut self) -> SessionId
Sourcepub async fn restore_session(
&mut self,
session_id: &SessionId,
) -> Option<&AgentSession>
pub async fn restore_session( &mut self, session_id: &SessionId, ) -> Option<&AgentSession>
Restore an existing session from persistence into runtime memory
On success, the session can be used for continued execution. Returns None if not found in persistence layer.
pub fn session(&self, session_id: &SessionId) -> Option<&AgentSession>
pub fn tools(&self) -> &ToolRegistry
pub fn client(&self) -> &Arc<dyn LlmClient> ⓘ
pub fn approval_handler(&self) -> Option<&Arc<dyn ApprovalHandler>>
pub fn tool_policy(&self) -> Option<&Arc<dyn ToolPolicy>>
pub fn subscribe_events(&self) -> Receiver<AgentEvent>
pub fn session_store(&self) -> &Arc<dyn SessionStore> ⓘ
pub fn skills(&self) -> &[Arc<dyn Skill>]
pub async fn run_turn_with_handler<F>( &mut self, session_id: SessionId, user_input: &str, on_event: F, ) -> AgentResult<RunOutcome>
pub async fn run_turn_stream( &mut self, session_id: SessionId, user_input: &str, ) -> AgentResult<(Vec<AgentEvent>, RunOutcome)>
pub async fn resume_from_checkpoint<F>( &mut self, checkpoint: CheckpointData, on_event: F, ) -> AgentResult<RunOutcome>
Auto Trait Implementations§
impl !Freeze for AgentRuntime
impl !RefUnwindSafe for AgentRuntime
impl Send for AgentRuntime
impl Sync for AgentRuntime
impl Unpin for AgentRuntime
impl UnsafeUnpin for AgentRuntime
impl !UnwindSafe for AgentRuntime
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