Skip to main content

AgentRuntime

Trait AgentRuntime 

Source
pub trait AgentRuntime: Send + Sync {
    // Required method
    fn respond<'a>(
        &'a self,
        agent: &'a Agent,
        history: &'a [Message],
    ) -> BoxFuture<'a, Result<String>>;
}
Expand description

Single-agent response primitive.

Extreme minimalism principle: exactly one method. The kernel provides no convergence logic, no memory injection, no streaming — all policy decisions belong to the caller.

BoxFuture is used instead of async_trait to keep the kernel dependency-free (no async_trait macro dep).

Required Methods§

Source

fn respond<'a>( &'a self, agent: &'a Agent, history: &'a [Message], ) -> BoxFuture<'a, Result<String>>

Invoke the agent with the full conversation history and return its response.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§