pub struct AgentRuntime<C: LlmClient> {
pub llm_client: C,
pub tool_registry: ToolRegistry,
pub default_workspace: Option<PathBuf>,
pub log_handler: Option<RuntimeLogHandler>,
pub log_preview_chars: Option<usize>,
pub workspace_backend: Arc<dyn WorkspaceBackend>,
pub hooks: Vec<Arc<dyn RuntimeHook>>,
pub execution_backend: RuntimeExecutionBackend,
pub settings_file: Option<PathBuf>,
pub default_backend: Option<String>,
pub sub_agent_timeout_seconds: f64,
}Fields§
§llm_client: C§tool_registry: ToolRegistry§default_workspace: Option<PathBuf>§log_handler: Option<RuntimeLogHandler>§log_preview_chars: Option<usize>§workspace_backend: Arc<dyn WorkspaceBackend>§hooks: Vec<Arc<dyn RuntimeHook>>§execution_backend: RuntimeExecutionBackend§settings_file: Option<PathBuf>§default_backend: Option<String>§sub_agent_timeout_seconds: f64Implementations§
Source§impl<C: LlmClient> AgentRuntime<C>
impl<C: LlmClient> AgentRuntime<C>
pub fn new(llm_client: C) -> Self
pub fn with_tool_registry(self, tool_registry: ToolRegistry) -> Self
pub fn with_execution_backend( self, execution_backend: impl Into<RuntimeExecutionBackend>, ) -> Self
pub fn with_settings_file(self, settings_file: impl Into<PathBuf>) -> Self
pub fn with_default_backend(self, default_backend: impl Into<String>) -> Self
pub fn with_log_preview_chars(self, log_preview_chars: usize) -> Self
pub fn with_sub_agent_timeout_seconds(self, timeout_seconds: f64) -> Self
Source§impl<C: LlmClient + Clone + 'static> AgentRuntime<C>
impl<C: LlmClient + Clone + 'static> AgentRuntime<C>
pub fn run(&self, task: AgentTask) -> Result<AgentResult, LlmError>
pub fn run_with_controls( &self, task: AgentTask, controls: RuntimeRunControls, ) -> Result<AgentResult, LlmError>
Auto Trait Implementations§
impl<C> Freeze for AgentRuntime<C>where
C: Freeze,
impl<C> !RefUnwindSafe for AgentRuntime<C>
impl<C> Send for AgentRuntime<C>
impl<C> Sync for AgentRuntime<C>
impl<C> Unpin for AgentRuntime<C>where
C: Unpin,
impl<C> UnsafeUnpin for AgentRuntime<C>where
C: UnsafeUnpin,
impl<C> !UnwindSafe for AgentRuntime<C>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.