pub struct AgentRuntime { /* private fields */ }Expand description
Implementations§
Source§impl AgentRuntime
impl AgentRuntime
Sourcepub fn new(
name: impl Into<String>,
llm: LlmConfig,
tools: ToolRegistry,
) -> Result<Self>
pub fn new( name: impl Into<String>, llm: LlmConfig, tools: ToolRegistry, ) -> Result<Self>
Construct the runtime from an LlmConfig and a ToolRegistry.
This is the load-bearing proof of consumption: it builds an
AgentConfig + Agent from the engine, and compiles a one-FnNode
Workflow whose node echoes the user message back as the reply.
§Errors
Returns an error if the workflow fails to build (misconfigured graph).
Sourcepub fn with_storage(
name: impl Into<String>,
llm: LlmConfig,
tools: ToolRegistry,
storage: &dyn StorageAdapter,
) -> Result<Self>
pub fn with_storage( name: impl Into<String>, llm: LlmConfig, tools: ToolRegistry, storage: &dyn StorageAdapter, ) -> Result<Self>
Construct a runtime and wire the storage adapter’s checkpoint store +
knowledge base into the engine, demonstrating the StorageAdapter
accessors plug straight into smooth-operator.
§Errors
Returns an error if the workflow fails to build.
Sourcepub fn agent_id(&self) -> &str
pub fn agent_id(&self) -> &str
The engine-generated agent id (proves the Agent was constructed).
Auto Trait Implementations§
impl !Freeze for AgentRuntime
impl !RefUnwindSafe for AgentRuntime
impl !UnwindSafe for AgentRuntime
impl Send for AgentRuntime
impl Sync for AgentRuntime
impl Unpin for AgentRuntime
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request