pub struct RuntimeContext { /* private fields */ }Expand description
Host context: optional memory plus optional stateful extractor (legacy / lightweight).
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 record_episode(
&self,
tool_calls: Vec<String>,
delegation_to: Option<String>,
trace_event: Option<Value>,
) -> Result<Uuid, String>
pub fn record_episode( &self, tool_calls: Vec<String>, delegation_to: Option<String>, trace_event: Option<Value>, ) -> Result<Uuid, String>
Record a turn as an episode with an explicit tool-call list.
Sourcepub fn store(&self) -> Option<&dyn GraphStore>
pub fn store(&self) -> Option<&dyn GraphStore>
Get direct access to the underlying store for advanced queries.
Sourcepub fn run_graph_extraction_pass(&mut self) -> Result<ExtractionReport, String>
pub fn run_graph_extraction_pass(&mut self) -> Result<ExtractionReport, String>
Run ainl-graph-extractor on the backing SQLite store.
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