pub struct AgentRuntime { /* private fields */ }Expand description
Unified runtime that coordinates memory, graph, orchestration, and agent loop.
Implementations§
Source§impl AgentRuntime
impl AgentRuntime
Sourcepub fn builder() -> AgentRuntimeBuilder<NeedsConfig>
pub fn builder() -> AgentRuntimeBuilder<NeedsConfig>
Return a new builder in the NeedsConfig state.
Sourcepub fn metrics(&self) -> Arc<RuntimeMetrics>
pub fn metrics(&self) -> Arc<RuntimeMetrics>
Return a shared reference to the runtime metrics.
Sourcepub async fn run_agent<F, Fut>(
&self,
agent_id: AgentId,
prompt: &str,
infer: F,
) -> Result<AgentSession, AgentRuntimeError>
pub async fn run_agent<F, Fut>( &self, agent_id: AgentId, prompt: &str, infer: F, ) -> Result<AgentSession, AgentRuntimeError>
Run the agent loop for the given prompt.
Optionally recalls episodic memories and injects them into the context. Optionally enforces backpressure before starting.
§Arguments
agent_id— identifies the agent for memory retrievalprompt— the user’s input promptinfer— async inference function:(context: String) -> impl Future<Output = String>
§Returns
An AgentSession with step count, hits, duration, and a stable session ID.
Sourcepub fn memory(&self) -> Option<&EpisodicStore>
pub fn memory(&self) -> Option<&EpisodicStore>
Return a reference to the episodic memory store, if configured.
Sourcepub fn graph(&self) -> Option<&GraphStore>
pub fn graph(&self) -> Option<&GraphStore>
Return a reference to the graph store, if configured.
Sourcepub fn working_memory(&self) -> Option<&WorkingMemory>
pub fn working_memory(&self) -> Option<&WorkingMemory>
Return a reference to the working memory, if configured.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentRuntime
impl !RefUnwindSafe for AgentRuntime
impl Send for AgentRuntime
impl Sync for AgentRuntime
impl Unpin for AgentRuntime
impl UnsafeUnpin for AgentRuntime
impl !UnwindSafe for AgentRuntime
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