pub struct AgentRuntime {Show 15 fields
pub storage: Arc<dyn Storage>,
pub persistence: Arc<dyn RuntimeSessionPersistence>,
pub session_inbox: Option<Arc<dyn SessionInboxPort>>,
pub activation_router: Option<Arc<SessionActivationRouter>>,
pub session_messenger: Option<Arc<SessionMessenger>>,
pub attachment_reader: Arc<dyn AttachmentReader>,
pub skill_manager: Arc<SkillManager>,
pub project_context_resolver: Option<Arc<ProjectContextResolver>>,
pub metrics_collector: MetricsCollector,
pub config: Arc<RwLock<Config>>,
pub permission_config: Option<Arc<PermissionConfig>>,
pub permission_mode: PermissionMode,
pub provider: Arc<dyn LLMProvider>,
pub default_tools: Arc<dyn ToolExecutor>,
pub hook_runner: Arc<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>§persistence: Arc<dyn RuntimeSessionPersistence>§session_inbox: Option<Arc<dyn SessionInboxPort>>§activation_router: Option<Arc<SessionActivationRouter>>§session_messenger: Option<Arc<SessionMessenger>>§attachment_reader: Arc<dyn AttachmentReader>§skill_manager: Arc<SkillManager>§project_context_resolver: Option<Arc<ProjectContextResolver>>§metrics_collector: MetricsCollector§config: Arc<RwLock<Config>>§permission_config: Option<Arc<PermissionConfig>>Live process-wide permission policy when the embedding exposes one.
permission_mode: PermissionModeSDK/static fallback used when there is no live policy handle.
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.
hook_runner: Arc<HookRunner>Immutable hook registry shared by runs. Each execute call snapshots the
Arc onto its sealed AgentLoopConfig.
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more