pub struct InMemoryAgenticLoopBuilder { /* private fields */ }Expand description
Builder for creating an InMemoryAgenticLoop
Implementations§
Source§impl InMemoryAgenticLoopBuilder
impl InMemoryAgenticLoopBuilder
Sourcepub fn reasoning_effort_handle(self, handle: ReasoningEffortHandle) -> Self
pub fn reasoning_effort_handle(self, handle: ReasoningEffortHandle) -> Self
Share a live reasoning-effort handle (EVE-595) across the loop’s
ReasonAtom and ActAtom. Tools receive a clone via their
ToolContext and can mutate it mid-turn so subsequent LLM steps in the
same run_turn observe the new effort.
Sourcepub fn agent_name(self, name: impl Into<String>) -> Self
pub fn agent_name(self, name: impl Into<String>) -> Self
Set the agent name
Sourcepub fn system_prompt(self, prompt: impl Into<String>) -> Self
pub fn system_prompt(self, prompt: impl Into<String>) -> Self
Set the system prompt
Sourcepub fn with_simulated_response(self, response: impl Into<String>) -> Self
pub fn with_simulated_response(self, response: impl Into<String>) -> Self
Use a simulated LLM with a fixed response (no real API calls)
Sourcepub fn with_llm_sim(self, config: LlmSimConfig) -> Self
pub fn with_llm_sim(self, config: LlmSimConfig) -> Self
Use a simulated LLM with custom configuration
Sourcepub fn model(self, model: ResolvedModel) -> Self
pub fn model(self, model: ResolvedModel) -> Self
Set the LLM model to use
§Example
use everruns_core::traits::ResolvedModel;
use everruns_core::provider::DriverId;
let model = ResolvedModel {
model: "claude-sonnet-4-20250514".to_string(),
provider_type: DriverId::Anthropic,
api_key: Some(std::env::var("ANTHROPIC_API_KEY").unwrap()),
base_url: None,
};
let runner = InMemoryAgenticLoop::builder()
.model(model)
.driver_registry(driver_registry)
.build()
.await?;Sourcepub fn driver_registry(self, driver_registry: DriverRegistry) -> Self
pub fn driver_registry(self, driver_registry: DriverRegistry) -> Self
Set the driver registry for LLM providers
§Example
use everruns_core::driver_registry::DriverRegistry;
let mut driver_registry = DriverRegistry::new();
everruns_anthropic::register_driver(&mut driver_registry);
let runner = InMemoryAgenticLoop::builder()
.model(model)
.driver_registry(driver_registry)
.build()
.await?;Sourcepub fn capability<C: Capability + 'static>(self, capability: C) -> Self
pub fn capability<C: Capability + 'static>(self, capability: C) -> Self
Add a capability (which may provide tools and system prompt additions)
Capabilities provide a way to bundle related tools and functionality.
For example, the current_time capability provides a get_current_time tool.
§Example
use everruns_core::capabilities::current_time::CurrentTimeCapability;
let runner = InMemoryAgenticLoop::builder()
.capability(CurrentTimeCapability)
.build()
.await?;Sourcepub fn max_iterations(self, max: usize) -> Self
pub fn max_iterations(self, max: usize) -> Self
Set maximum iterations per turn
Sourcepub fn parallel_tool_calls(self, parallel_tool_calls: Option<bool>) -> Self
pub fn parallel_tool_calls(self, parallel_tool_calls: Option<bool>) -> Self
Set the request-level parallel tool calling preference (EVE-598).
Some(true) signals the provider that parallel tool calls are wanted;
Some(false) requests at most one tool call per turn and forces serial
execution. None (default) preserves provider defaults.
Sourcepub async fn build(self) -> Result<InMemoryAgenticLoop>
pub async fn build(self) -> Result<InMemoryAgenticLoop>
Build the agentic loop
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for InMemoryAgenticLoopBuilder
impl !UnwindSafe for InMemoryAgenticLoopBuilder
impl Freeze for InMemoryAgenticLoopBuilder
impl Send for InMemoryAgenticLoopBuilder
impl Sync for InMemoryAgenticLoopBuilder
impl Unpin for InMemoryAgenticLoopBuilder
impl UnsafeUnpin for InMemoryAgenticLoopBuilder
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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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>
T in a tonic::Request