pub struct AgentRuntime {
pub storage: Arc<dyn Storage>,
pub persistence: Arc<dyn RuntimeSessionPersistence>,
pub attachment_reader: Arc<dyn AttachmentReader>,
pub skill_manager: Arc<SkillManager>,
pub metrics_collector: MetricsCollector,
pub config: Arc<RwLock<Config>>,
pub provider: Arc<dyn LLMProvider>,
pub default_tools: Arc<dyn ToolExecutor>,
}Expand description
Shared runtime resources assembled once at server startup.
Each field is an Arc or Clone-cheap handle so that AgentRuntime itself
is cheaply cloneable across tasks.
Fields§
§storage: Arc<dyn Storage>§persistence: Arc<dyn RuntimeSessionPersistence>§attachment_reader: Arc<dyn AttachmentReader>§skill_manager: Arc<SkillManager>§metrics_collector: MetricsCollector§config: Arc<RwLock<Config>>§provider: Arc<dyn LLMProvider>Reloadable LLM provider handle (delegates to the latest provider).
default_tools: Arc<dyn ToolExecutor>Default tool executor (root tools with full surface).
Call sites that need a reduced tool set (child / schedule) pass their
own via ExecuteRequest::tools.
Implementations§
Source§impl AgentRuntime
impl AgentRuntime
Sourcepub async fn execute(
&self,
session: &mut Session,
req: ExecuteRequest,
) -> Result<()>
pub async fn execute( &self, session: &mut Session, req: ExecuteRequest, ) -> Result<()>
Execute the agent loop with the given request.
Builds an AgentLoopConfig from the request parameters and shared
runtime resources, then delegates to [run_agent_loop_with_config].
Trait Implementations§
Source§impl Clone for AgentRuntime
impl Clone for AgentRuntime
Source§fn clone(&self) -> AgentRuntime
fn clone(&self) -> AgentRuntime
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for AgentRuntime
impl !UnwindSafe for AgentRuntime
impl Freeze for AgentRuntime
impl Send for AgentRuntime
impl Sync for AgentRuntime
impl Unpin for AgentRuntime
impl UnsafeUnpin 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