pub struct RuntimeContext { /* private fields */ }Expand description
AINL runtime context for execution
Implementations§
Source§impl RuntimeContext
impl RuntimeContext
Sourcepub fn new(config: RuntimeConfig, memory: Option<GraphMemory>) -> Self
pub fn new(config: RuntimeConfig, memory: Option<GraphMemory>) -> Self
Create a new runtime context with the given memory backend
Sourcepub fn record_delegation(
&self,
delegated_to: String,
trace_event: Option<Value>,
) -> Result<Uuid, String>
pub fn record_delegation( &self, delegated_to: String, trace_event: Option<Value>, ) -> Result<Uuid, String>
Record an agent delegation as an episode node
Sourcepub fn record_tool_execution(
&self,
tool_name: String,
trace_event: Option<Value>,
) -> Result<Uuid, String>
pub fn record_tool_execution( &self, tool_name: String, trace_event: Option<Value>, ) -> Result<Uuid, String>
Record a tool execution as an episode node
Sourcepub fn store(&self) -> Option<&dyn GraphStore>
pub fn store(&self) -> Option<&dyn GraphStore>
Get direct access to the underlying store for advanced queries
Auto Trait Implementations§
impl !Freeze for RuntimeContext
impl !RefUnwindSafe for RuntimeContext
impl Send for RuntimeContext
impl !Sync for RuntimeContext
impl Unpin for RuntimeContext
impl UnsafeUnpin for RuntimeContext
impl !UnwindSafe for RuntimeContext
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