pub struct AgentBuilder { /* private fields */ }Implementations§
Source§impl AgentBuilder
impl AgentBuilder
pub fn with_llm(self, llm: Arc<dyn Llm>) -> Self
pub fn with_tools(self, tools: Arc<dyn ToolSet>) -> Self
pub fn with_memory(self, memory: Arc<dyn MemoryPolicy>) -> Self
pub fn with_loop(self, l: Box<dyn Loop>) -> Self
pub fn with_event_sink(self, sink: SharedSink) -> Self
pub fn with_budget(self, budget: Arc<dyn BudgetHandle>) -> Self
pub fn with_approval(self, approval: Arc<dyn ApprovalChannel>) -> Self
pub fn with_config(self, config: AgentConfig) -> Self
pub fn with_max_turns(self, n: u32) -> Self
Sourcepub fn with_critics(self, critics: Arc<CompositeCritic>) -> Self
pub fn with_critics(self, critics: Arc<CompositeCritic>) -> Self
Attach a critic. Typically a CompositeCritic wrapping one or
more oharness_critic::Critic implementations; single-critic
setups can construct a composite with one child under
AggregationPolicy::FirstReject.
pub fn with_critic_trigger(self, trigger: CriticTrigger) -> Self
Sourcepub fn with_reflection_injector(self, injector: Arc<ReflectionInjector>) -> Self
pub fn with_reflection_injector(self, injector: Arc<ReflectionInjector>) -> Self
Attach a ReflectionInjector for use with
run_reflexion. The injector is not wired
into the LLM middleware stack automatically — users wire it with
LlmExt::with_request_layer(injector.clone()) before passing the
LLM to .with_llm(..). This stash is so run_reflexion can find
the injector later and swap its reflection list between episodes.
Sourcepub fn with_workspace(self, workspace: Arc<Workspace>) -> Self
pub fn with_workspace(self, workspace: Arc<Workspace>) -> Self
Attach a Workspace that every tool call in this agent’s run
will be scoped to. The shipped fs / bash tools respect
ToolContext::workspace_path() — without a workspace attached,
they fall back to cwd (surprise-prone for research runs).
Benchmark adapters populate this from their LoadedTask.workspace
in the agent factory.