pub struct Runtime {
pub store: MemoryStore,
pub registry: ToolRegistry,
pub budget: BudgetLimits,
pub sandbox: Box<dyn SandboxExecutor>,
}Fields§
§store: MemoryStore§registry: ToolRegistry§budget: BudgetLimits§sandbox: Box<dyn SandboxExecutor>Implementations§
Source§impl Runtime
impl Runtime
pub fn new() -> Self
pub fn register_tool(&mut self, spec: ToolSpec)
pub fn set_budget(&mut self, budget: BudgetLimits)
pub fn set_sandbox(&mut self, sandbox: Box<dyn SandboxExecutor>)
pub fn create_run(&mut self, initial_state: State) -> (String, String)
pub fn run_once( &mut self, run_id: &str, worker_id: &str, agent_role: &str, lease_seconds: f64, agent: AgentFunc, ) -> Result<bool>
pub fn call_tool( &mut self, ctx: &AgentContext, tool_name: &str, args: State, ) -> Result<Value>
pub fn create_artifact( &mut self, ctx: &AgentContext, name: &str, content: State, metadata: State, ) -> Result<String>
pub fn create_media_artifact( &mut self, ctx: &AgentContext, name: &str, kind: &str, options: MediaArtifactOptions, ) -> Result<String>
pub fn create_stream_checkpoint( &mut self, ctx: &AgentContext, name: &str, options: StreamCheckpointOptions, ) -> Result<String>
pub fn record_model_call( &mut self, ctx: &AgentContext, model: &str, input_tokens: f64, output_tokens: f64, total_usd: f64, ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Runtime
impl !RefUnwindSafe for Runtime
impl !Send for Runtime
impl !Sync for Runtime
impl Unpin for Runtime
impl UnsafeUnpin for Runtime
impl !UnwindSafe for Runtime
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