pub struct AgentRuntime {Show 13 fields
pub storage: Arc<dyn Storage>,
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>,
pub prompt_manager: Option<Arc<dyn PromptManager>>,
pub memory_manager: Option<Arc<dyn MemoryManager>>,
pub tool_manager: Option<Arc<dyn ToolManager>>,
pub llm_manager: Option<Arc<dyn LlmManager>>,
pub lifecycle_manager: Option<Arc<dyn LifecycleManager>>,
pub hook_runner: Option<HookRunner>,
}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>§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.
prompt_manager: Option<Arc<dyn PromptManager>>When Some, uses a custom prompt manager instead of the default adapter.
memory_manager: Option<Arc<dyn MemoryManager>>When Some, uses a custom memory manager instead of the default adapter.
tool_manager: Option<Arc<dyn ToolManager>>When Some, uses a custom tool manager instead of the default adapter.
llm_manager: Option<Arc<dyn LlmManager>>When Some, uses a custom LLM manager instead of the default adapter.
lifecycle_manager: Option<Arc<dyn LifecycleManager>>When Some, uses a custom lifecycle manager instead of the default adapter.
hook_runner: Option<HookRunner>When Some, uses a custom hook runner instead of a no-op runner.
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more