pub struct HarnessAgentOptionsBuilder<S: State = Empty> { /* private fields */ }Expand description
Builds HarnessAgentOptions; the setters are its fields.
Implementations§
Source§impl<S: State> HarnessAgentOptionsBuilder<S>
impl<S: State> HarnessAgentOptionsBuilder<S>
Sourcepub fn build(self) -> HarnessAgentOptionswhere
S: IsComplete,
pub fn build(self) -> HarnessAgentOptionswhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn model(
self,
value: impl Into<ModelSource>,
) -> HarnessAgentOptionsBuilder<SetModel<S>>where
S::Model: IsUnset,
pub fn model(
self,
value: impl Into<ModelSource>,
) -> HarnessAgentOptionsBuilder<SetModel<S>>where
S::Model: IsUnset,
Sourcepub fn maybe_model(
self,
value: Option<impl Into<ModelSource>>,
) -> HarnessAgentOptionsBuilder<SetModel<S>>where
S::Model: IsUnset,
pub fn maybe_model(
self,
value: Option<impl Into<ModelSource>>,
) -> HarnessAgentOptionsBuilder<SetModel<S>>where
S::Model: IsUnset,
Sourcepub fn effort(self, value: Effort) -> HarnessAgentOptionsBuilder<SetEffort<S>>where
S::Effort: IsUnset,
pub fn effort(self, value: Effort) -> HarnessAgentOptionsBuilder<SetEffort<S>>where
S::Effort: IsUnset,
Optional (Some / Option setters).
Default: <Effort as Default>::default().
Reasoning effort applied to the resolved model, mapped to each provider’s request fields:
Effort::Auto (the default) uses the model vendor’s default level (what Claude Code,
Codex or Gemini CLI run it at; the provider’s high otherwise), Effort::Off
turns reasoning off, and a named level sets it; a level the provider does not support
fails. Ignored for a model instance or router.
Sourcepub fn maybe_effort(
self,
value: Option<Effort>,
) -> HarnessAgentOptionsBuilder<SetEffort<S>>where
S::Effort: IsUnset,
pub fn maybe_effort(
self,
value: Option<Effort>,
) -> HarnessAgentOptionsBuilder<SetEffort<S>>where
S::Effort: IsUnset,
Optional (Some / Option setters).
Default: <Effort as Default>::default().
Reasoning effort applied to the resolved model, mapped to each provider’s request fields:
Effort::Auto (the default) uses the model vendor’s default level (what Claude Code,
Codex or Gemini CLI run it at; the provider’s high otherwise), Effort::Off
turns reasoning off, and a named level sets it; a level the provider does not support
fails. Ignored for a model instance or router.
Sourcepub fn instructions(
self,
value: impl Into<String>,
) -> HarnessAgentOptionsBuilder<SetInstructions<S>>where
S::Instructions: IsUnset,
pub fn instructions(
self,
value: impl Into<String>,
) -> HarnessAgentOptionsBuilder<SetInstructions<S>>where
S::Instructions: IsUnset,
Sourcepub fn maybe_instructions(
self,
value: Option<impl Into<String>>,
) -> HarnessAgentOptionsBuilder<SetInstructions<S>>where
S::Instructions: IsUnset,
pub fn maybe_instructions(
self,
value: Option<impl Into<String>>,
) -> HarnessAgentOptionsBuilder<SetInstructions<S>>where
S::Instructions: IsUnset,
Sourcepub fn mcp_servers(
self,
value: impl Into<McpServersOption>,
) -> HarnessAgentOptionsBuilder<SetMcpServers<S>>where
S::McpServers: IsUnset,
pub fn mcp_servers(
self,
value: impl Into<McpServersOption>,
) -> HarnessAgentOptionsBuilder<SetMcpServers<S>>where
S::McpServers: IsUnset,
Optional (Some / Option setters).
MCP servers to connect: a path to a JSON file (a flat { name: {..} } map, or that map
under mcpServers) or the map itself. A server that fails to start yields no tools unless
it sets continueOnError: false; each server’s tools are prefixed with its name unless
it sets its own prefix ("" opts out). Needs the mcp feature: without it, setting
servers fails at create_harness.
Sourcepub fn maybe_mcp_servers(
self,
value: Option<impl Into<McpServersOption>>,
) -> HarnessAgentOptionsBuilder<SetMcpServers<S>>where
S::McpServers: IsUnset,
pub fn maybe_mcp_servers(
self,
value: Option<impl Into<McpServersOption>>,
) -> HarnessAgentOptionsBuilder<SetMcpServers<S>>where
S::McpServers: IsUnset,
Optional (Some / Option setters).
MCP servers to connect: a path to a JSON file (a flat { name: {..} } map, or that map
under mcpServers) or the map itself. A server that fails to start yields no tools unless
it sets continueOnError: false; each server’s tools are prefixed with its name unless
it sets its own prefix ("" opts out). Needs the mcp feature: without it, setting
servers fails at create_harness.
Sourcepub fn builtin_tools(
self,
value: impl Into<BuiltinToolsOption>,
) -> HarnessAgentOptionsBuilder<SetBuiltinTools<S>>where
S::BuiltinTools: IsUnset,
pub fn builtin_tools(
self,
value: impl Into<BuiltinToolsOption>,
) -> HarnessAgentOptionsBuilder<SetBuiltinTools<S>>where
S::BuiltinTools: IsUnset,
Optional (Some / Option setters).
Which built-in tools to enable: a list pins exactly those (an empty list disables them
all), a BuiltinToolsConfig edits the defaults. web_search turns on the provider’s
native search (OpenAI, Anthropic, and the GPT-5, GPT-6 and Daybreak models on Bedrock
Mantle), or a tool backed by Amazon Bedrock AgentCore web search on other Bedrock models;
elsewhere it is off, and naming it there fails.
WebSearchSetting::Exa ("exa" in a config) uses Exa’s
hosted search on any model instead (needs the mcp feature). A subagent child inherits
this.
Sourcepub fn maybe_builtin_tools(
self,
value: Option<impl Into<BuiltinToolsOption>>,
) -> HarnessAgentOptionsBuilder<SetBuiltinTools<S>>where
S::BuiltinTools: IsUnset,
pub fn maybe_builtin_tools(
self,
value: Option<impl Into<BuiltinToolsOption>>,
) -> HarnessAgentOptionsBuilder<SetBuiltinTools<S>>where
S::BuiltinTools: IsUnset,
Optional (Some / Option setters).
Which built-in tools to enable: a list pins exactly those (an empty list disables them
all), a BuiltinToolsConfig edits the defaults. web_search turns on the provider’s
native search (OpenAI, Anthropic, and the GPT-5, GPT-6 and Daybreak models on Bedrock
Mantle), or a tool backed by Amazon Bedrock AgentCore web search on other Bedrock models;
elsewhere it is off, and naming it there fails.
WebSearchSetting::Exa ("exa" in a config) uses Exa’s
hosted search on any model instead (needs the mcp feature). A subagent child inherits
this.
Sourcepub fn background_tasks(
self,
value: impl Into<Toggle<BackgroundTasksConfig>>,
) -> HarnessAgentOptionsBuilder<SetBackgroundTasks<S>>where
S::BackgroundTasks: IsUnset,
pub fn background_tasks(
self,
value: impl Into<Toggle<BackgroundTasksConfig>>,
) -> HarnessAgentOptionsBuilder<SetBackgroundTasks<S>>where
S::BackgroundTasks: IsUnset,
Sourcepub fn maybe_background_tasks(
self,
value: Option<impl Into<Toggle<BackgroundTasksConfig>>>,
) -> HarnessAgentOptionsBuilder<SetBackgroundTasks<S>>where
S::BackgroundTasks: IsUnset,
pub fn maybe_background_tasks(
self,
value: Option<impl Into<Toggle<BackgroundTasksConfig>>>,
) -> HarnessAgentOptionsBuilder<SetBackgroundTasks<S>>where
S::BackgroundTasks: IsUnset,
Sourcepub fn caching(self, value: bool) -> HarnessAgentOptionsBuilder<SetCaching<S>>where
S::Caching: IsUnset,
pub fn caching(self, value: bool) -> HarnessAgentOptionsBuilder<SetCaching<S>>where
S::Caching: IsUnset,
Sourcepub fn maybe_caching(
self,
value: Option<bool>,
) -> HarnessAgentOptionsBuilder<SetCaching<S>>where
S::Caching: IsUnset,
pub fn maybe_caching(
self,
value: Option<bool>,
) -> HarnessAgentOptionsBuilder<SetCaching<S>>where
S::Caching: IsUnset,
Sourcepub fn context_manager(
self,
value: impl Into<ContextManagerOption>,
) -> HarnessAgentOptionsBuilder<SetContextManager<S>>where
S::ContextManager: IsUnset,
pub fn context_manager(
self,
value: impl Into<ContextManagerOption>,
) -> HarnessAgentOptionsBuilder<SetContextManager<S>>where
S::ContextManager: IsUnset,
Optional (Some / Option setters).
SDK context management: ContextManagerStrategy::Auto (the default) or Agentic
selects an SDK strategy, an instance is used as is, and Disabled turns it off.
Sourcepub fn maybe_context_manager(
self,
value: Option<impl Into<ContextManagerOption>>,
) -> HarnessAgentOptionsBuilder<SetContextManager<S>>where
S::ContextManager: IsUnset,
pub fn maybe_context_manager(
self,
value: Option<impl Into<ContextManagerOption>>,
) -> HarnessAgentOptionsBuilder<SetContextManager<S>>where
S::ContextManager: IsUnset,
Optional (Some / Option setters).
SDK context management: ContextManagerStrategy::Auto (the default) or Agentic
selects an SDK strategy, an instance is used as is, and Disabled turns it off.
Sourcepub fn session(
self,
value: impl Into<SessionOption>,
) -> HarnessAgentOptionsBuilder<SetSession<S>>where
S::Session: IsUnset,
pub fn session(
self,
value: impl Into<SessionOption>,
) -> HarnessAgentOptionsBuilder<SetSession<S>>where
S::Session: IsUnset,
Sourcepub fn maybe_session(
self,
value: Option<impl Into<SessionOption>>,
) -> HarnessAgentOptionsBuilder<SetSession<S>>where
S::Session: IsUnset,
pub fn maybe_session(
self,
value: Option<impl Into<SessionOption>>,
) -> HarnessAgentOptionsBuilder<SetSession<S>>where
S::Session: IsUnset,
Sourcepub fn skills(
self,
value: impl Into<SkillsOption>,
) -> HarnessAgentOptionsBuilder<SetSkills<S>>where
S::Skills: IsUnset,
pub fn skills(
self,
value: impl Into<SkillsOption>,
) -> HarnessAgentOptionsBuilder<SetSkills<S>>where
S::Skills: IsUnset,
Sourcepub fn maybe_skills(
self,
value: Option<impl Into<SkillsOption>>,
) -> HarnessAgentOptionsBuilder<SetSkills<S>>where
S::Skills: IsUnset,
pub fn maybe_skills(
self,
value: Option<impl Into<SkillsOption>>,
) -> HarnessAgentOptionsBuilder<SetSkills<S>>where
S::Skills: IsUnset,
Sourcepub fn memory(
self,
value: impl Into<MemoryOption>,
) -> HarnessAgentOptionsBuilder<SetMemory<S>>where
S::Memory: IsUnset,
pub fn memory(
self,
value: impl Into<MemoryOption>,
) -> HarnessAgentOptionsBuilder<SetMemory<S>>where
S::Memory: IsUnset,
Optional (Some / Option setters).
File-based long-term memory, on by default: durable facts distilled into markdown under
./.agent/memory, searched before each user turn. Ignored when memory_manager is set.
Extraction runs in the background, so call Agent::shutdown to persist what is pending.
Sourcepub fn maybe_memory(
self,
value: Option<impl Into<MemoryOption>>,
) -> HarnessAgentOptionsBuilder<SetMemory<S>>where
S::Memory: IsUnset,
pub fn maybe_memory(
self,
value: Option<impl Into<MemoryOption>>,
) -> HarnessAgentOptionsBuilder<SetMemory<S>>where
S::Memory: IsUnset,
Optional (Some / Option setters).
File-based long-term memory, on by default: durable facts distilled into markdown under
./.agent/memory, searched before each user turn. Ignored when memory_manager is set.
Extraction runs in the background, so call Agent::shutdown to persist what is pending.
Sourcepub fn builtin_plugins(
self,
names: impl IntoIterator<Item = BuiltinPluginName>,
) -> HarnessAgentOptionsBuilder<SetBuiltinPlugins<S>>where
S::BuiltinPlugins: IsUnset,
pub fn builtin_plugins(
self,
names: impl IntoIterator<Item = BuiltinPluginName>,
) -> HarnessAgentOptionsBuilder<SetBuiltinPlugins<S>>where
S::BuiltinPlugins: IsUnset,
Sourcepub fn maybe_builtin_plugins(
self,
value: Option<impl IntoIterator<Item = BuiltinPluginName>>,
) -> HarnessAgentOptionsBuilder<SetBuiltinPlugins<S>>where
S::BuiltinPlugins: IsUnset,
pub fn maybe_builtin_plugins(
self,
value: Option<impl IntoIterator<Item = BuiltinPluginName>>,
) -> HarnessAgentOptionsBuilder<SetBuiltinPlugins<S>>where
S::BuiltinPlugins: IsUnset,
Sourcepub fn interventions(
self,
value: impl Into<InterventionsOption>,
) -> HarnessAgentOptionsBuilder<SetInterventions<S>>where
S::Interventions: IsUnset,
pub fn interventions(
self,
value: impl Into<InterventionsOption>,
) -> HarnessAgentOptionsBuilder<SetInterventions<S>>where
S::Interventions: IsUnset,
Sourcepub fn maybe_interventions(
self,
value: Option<impl Into<InterventionsOption>>,
) -> HarnessAgentOptionsBuilder<SetInterventions<S>>where
S::Interventions: IsUnset,
pub fn maybe_interventions(
self,
value: Option<impl Into<InterventionsOption>>,
) -> HarnessAgentOptionsBuilder<SetInterventions<S>>where
S::Interventions: IsUnset,
Sourcepub fn aux_model(
self,
value: impl Into<ModelSource>,
) -> HarnessAgentOptionsBuilder<SetAuxModel<S>>where
S::AuxModel: IsUnset,
pub fn aux_model(
self,
value: impl Into<ModelSource>,
) -> HarnessAgentOptionsBuilder<SetAuxModel<S>>where
S::AuxModel: IsUnset,
Optional (Some / Option setters).
See AgentConfig::aux_model.
Sourcepub fn maybe_aux_model(
self,
value: Option<impl Into<ModelSource>>,
) -> HarnessAgentOptionsBuilder<SetAuxModel<S>>where
S::AuxModel: IsUnset,
pub fn maybe_aux_model(
self,
value: Option<impl Into<ModelSource>>,
) -> HarnessAgentOptionsBuilder<SetAuxModel<S>>where
S::AuxModel: IsUnset,
Optional (Some / Option setters).
See AgentConfig::aux_model.
Sourcepub fn messages(
self,
value: Vec<Message>,
) -> HarnessAgentOptionsBuilder<SetMessages<S>>where
S::Messages: IsUnset,
pub fn messages(
self,
value: Vec<Message>,
) -> HarnessAgentOptionsBuilder<SetMessages<S>>where
S::Messages: IsUnset,
Sourcepub fn maybe_messages(
self,
value: Option<Vec<Message>>,
) -> HarnessAgentOptionsBuilder<SetMessages<S>>where
S::Messages: IsUnset,
pub fn maybe_messages(
self,
value: Option<Vec<Message>>,
) -> HarnessAgentOptionsBuilder<SetMessages<S>>where
S::Messages: IsUnset,
Sourcepub fn system_prompt(
self,
value: impl Into<SystemPrompt>,
) -> HarnessAgentOptionsBuilder<SetSystemPrompt<S>>where
S::SystemPrompt: IsUnset,
pub fn system_prompt(
self,
value: impl Into<SystemPrompt>,
) -> HarnessAgentOptionsBuilder<SetSystemPrompt<S>>where
S::SystemPrompt: IsUnset,
Optional (Some / Option setters).
See AgentConfig::system_prompt. Replaces the harness prompt and instructions.
Sourcepub fn maybe_system_prompt(
self,
value: Option<impl Into<SystemPrompt>>,
) -> HarnessAgentOptionsBuilder<SetSystemPrompt<S>>where
S::SystemPrompt: IsUnset,
pub fn maybe_system_prompt(
self,
value: Option<impl Into<SystemPrompt>>,
) -> HarnessAgentOptionsBuilder<SetSystemPrompt<S>>where
S::SystemPrompt: IsUnset,
Optional (Some / Option setters).
See AgentConfig::system_prompt. Replaces the harness prompt and instructions.
Sourcepub fn app_state(
self,
value: JsonObject,
) -> HarnessAgentOptionsBuilder<SetAppState<S>>where
S::AppState: IsUnset,
pub fn app_state(
self,
value: JsonObject,
) -> HarnessAgentOptionsBuilder<SetAppState<S>>where
S::AppState: IsUnset,
Optional (Some / Option setters).
See AgentConfig::app_state.
Sourcepub fn maybe_app_state(
self,
value: Option<JsonObject>,
) -> HarnessAgentOptionsBuilder<SetAppState<S>>where
S::AppState: IsUnset,
pub fn maybe_app_state(
self,
value: Option<JsonObject>,
) -> HarnessAgentOptionsBuilder<SetAppState<S>>where
S::AppState: IsUnset,
Optional (Some / Option setters).
See AgentConfig::app_state.
Sourcepub fn model_state(
self,
value: JsonObject,
) -> HarnessAgentOptionsBuilder<SetModelState<S>>where
S::ModelState: IsUnset,
pub fn model_state(
self,
value: JsonObject,
) -> HarnessAgentOptionsBuilder<SetModelState<S>>where
S::ModelState: IsUnset,
Optional (Some / Option setters).
See AgentConfig::model_state.
Sourcepub fn maybe_model_state(
self,
value: Option<JsonObject>,
) -> HarnessAgentOptionsBuilder<SetModelState<S>>where
S::ModelState: IsUnset,
pub fn maybe_model_state(
self,
value: Option<JsonObject>,
) -> HarnessAgentOptionsBuilder<SetModelState<S>>where
S::ModelState: IsUnset,
Optional (Some / Option setters).
See AgentConfig::model_state.
Sourcepub fn printer(self, value: bool) -> HarnessAgentOptionsBuilder<SetPrinter<S>>where
S::Printer: IsUnset,
pub fn printer(self, value: bool) -> HarnessAgentOptionsBuilder<SetPrinter<S>>where
S::Printer: IsUnset,
Optional (Some / Option setters).
See AgentConfig::printer.
Sourcepub fn maybe_printer(
self,
value: Option<bool>,
) -> HarnessAgentOptionsBuilder<SetPrinter<S>>where
S::Printer: IsUnset,
pub fn maybe_printer(
self,
value: Option<bool>,
) -> HarnessAgentOptionsBuilder<SetPrinter<S>>where
S::Printer: IsUnset,
Optional (Some / Option setters).
See AgentConfig::printer.
Sourcepub fn retry_strategy(
self,
value: Vec<RetryStrategy>,
) -> HarnessAgentOptionsBuilder<SetRetryStrategy<S>>where
S::RetryStrategy: IsUnset,
pub fn retry_strategy(
self,
value: Vec<RetryStrategy>,
) -> HarnessAgentOptionsBuilder<SetRetryStrategy<S>>where
S::RetryStrategy: IsUnset,
Optional (Some / Option setters).
See AgentConfig::retry_strategy.
Sourcepub fn maybe_retry_strategy(
self,
value: Option<Vec<RetryStrategy>>,
) -> HarnessAgentOptionsBuilder<SetRetryStrategy<S>>where
S::RetryStrategy: IsUnset,
pub fn maybe_retry_strategy(
self,
value: Option<Vec<RetryStrategy>>,
) -> HarnessAgentOptionsBuilder<SetRetryStrategy<S>>where
S::RetryStrategy: IsUnset,
Optional (Some / Option setters).
See AgentConfig::retry_strategy.
Sourcepub fn structured_output_schema(
self,
value: JsonSchema,
) -> HarnessAgentOptionsBuilder<SetStructuredOutputSchema<S>>where
S::StructuredOutputSchema: IsUnset,
pub fn structured_output_schema(
self,
value: JsonSchema,
) -> HarnessAgentOptionsBuilder<SetStructuredOutputSchema<S>>where
S::StructuredOutputSchema: IsUnset,
Optional (Some / Option setters).
See AgentConfig::structured_output_schema.
Sourcepub fn maybe_structured_output_schema(
self,
value: Option<JsonSchema>,
) -> HarnessAgentOptionsBuilder<SetStructuredOutputSchema<S>>where
S::StructuredOutputSchema: IsUnset,
pub fn maybe_structured_output_schema(
self,
value: Option<JsonSchema>,
) -> HarnessAgentOptionsBuilder<SetStructuredOutputSchema<S>>where
S::StructuredOutputSchema: IsUnset,
Optional (Some / Option setters).
See AgentConfig::structured_output_schema.
Sourcepub fn name(
self,
value: impl Into<String>,
) -> HarnessAgentOptionsBuilder<SetName<S>>where
S::Name: IsUnset,
pub fn name(
self,
value: impl Into<String>,
) -> HarnessAgentOptionsBuilder<SetName<S>>where
S::Name: IsUnset,
Optional (Some / Option setters).
See AgentConfig::name.
Sourcepub fn maybe_name(
self,
value: Option<impl Into<String>>,
) -> HarnessAgentOptionsBuilder<SetName<S>>where
S::Name: IsUnset,
pub fn maybe_name(
self,
value: Option<impl Into<String>>,
) -> HarnessAgentOptionsBuilder<SetName<S>>where
S::Name: IsUnset,
Optional (Some / Option setters).
See AgentConfig::name.
Sourcepub fn description(
self,
value: impl Into<String>,
) -> HarnessAgentOptionsBuilder<SetDescription<S>>where
S::Description: IsUnset,
pub fn description(
self,
value: impl Into<String>,
) -> HarnessAgentOptionsBuilder<SetDescription<S>>where
S::Description: IsUnset,
Optional (Some / Option setters).
See AgentConfig::description.
Sourcepub fn maybe_description(
self,
value: Option<impl Into<String>>,
) -> HarnessAgentOptionsBuilder<SetDescription<S>>where
S::Description: IsUnset,
pub fn maybe_description(
self,
value: Option<impl Into<String>>,
) -> HarnessAgentOptionsBuilder<SetDescription<S>>where
S::Description: IsUnset,
Optional (Some / Option setters).
See AgentConfig::description.
Sourcepub fn id(
self,
value: impl Into<String>,
) -> HarnessAgentOptionsBuilder<SetId<S>>where
S::Id: IsUnset,
pub fn id(
self,
value: impl Into<String>,
) -> HarnessAgentOptionsBuilder<SetId<S>>where
S::Id: IsUnset,
Optional (Some / Option setters).
See AgentConfig::id.
Sourcepub fn maybe_id(
self,
value: Option<impl Into<String>>,
) -> HarnessAgentOptionsBuilder<SetId<S>>where
S::Id: IsUnset,
pub fn maybe_id(
self,
value: Option<impl Into<String>>,
) -> HarnessAgentOptionsBuilder<SetId<S>>where
S::Id: IsUnset,
Optional (Some / Option setters).
See AgentConfig::id.
Sourcepub fn tool_executor(
self,
value: impl Into<ToolExecutorStrategy>,
) -> HarnessAgentOptionsBuilder<SetToolExecutor<S>>where
S::ToolExecutor: IsUnset,
pub fn tool_executor(
self,
value: impl Into<ToolExecutorStrategy>,
) -> HarnessAgentOptionsBuilder<SetToolExecutor<S>>where
S::ToolExecutor: IsUnset,
Optional (Some / Option setters).
See AgentConfig::tool_executor.
Sourcepub fn maybe_tool_executor(
self,
value: Option<impl Into<ToolExecutorStrategy>>,
) -> HarnessAgentOptionsBuilder<SetToolExecutor<S>>where
S::ToolExecutor: IsUnset,
pub fn maybe_tool_executor(
self,
value: Option<impl Into<ToolExecutorStrategy>>,
) -> HarnessAgentOptionsBuilder<SetToolExecutor<S>>where
S::ToolExecutor: IsUnset,
Optional (Some / Option setters).
See AgentConfig::tool_executor.
Sourcepub fn sort_tools(
self,
value: bool,
) -> HarnessAgentOptionsBuilder<SetSortTools<S>>where
S::SortTools: IsUnset,
pub fn sort_tools(
self,
value: bool,
) -> HarnessAgentOptionsBuilder<SetSortTools<S>>where
S::SortTools: IsUnset,
Optional (Some / Option setters).
See AgentConfig::sort_tools.
Sourcepub fn maybe_sort_tools(
self,
value: Option<bool>,
) -> HarnessAgentOptionsBuilder<SetSortTools<S>>where
S::SortTools: IsUnset,
pub fn maybe_sort_tools(
self,
value: Option<bool>,
) -> HarnessAgentOptionsBuilder<SetSortTools<S>>where
S::SortTools: IsUnset,
Optional (Some / Option setters).
See AgentConfig::sort_tools.
Sourcepub fn conversation_manager(
self,
value: Arc<dyn ConversationManager>,
) -> HarnessAgentOptionsBuilder<SetConversationManager<S>>where
S::ConversationManager: IsUnset,
pub fn conversation_manager(
self,
value: Arc<dyn ConversationManager>,
) -> HarnessAgentOptionsBuilder<SetConversationManager<S>>where
S::ConversationManager: IsUnset,
Optional (Some / Option setters).
See AgentConfig::conversation_manager.
Sourcepub fn maybe_conversation_manager(
self,
value: Option<Arc<dyn ConversationManager>>,
) -> HarnessAgentOptionsBuilder<SetConversationManager<S>>where
S::ConversationManager: IsUnset,
pub fn maybe_conversation_manager(
self,
value: Option<Arc<dyn ConversationManager>>,
) -> HarnessAgentOptionsBuilder<SetConversationManager<S>>where
S::ConversationManager: IsUnset,
Optional (Some / Option setters).
See AgentConfig::conversation_manager.
Sourcepub fn trace_attributes(
self,
value: BTreeMap<String, AttributeValue>,
) -> HarnessAgentOptionsBuilder<SetTraceAttributes<S>>where
S::TraceAttributes: IsUnset,
pub fn trace_attributes(
self,
value: BTreeMap<String, AttributeValue>,
) -> HarnessAgentOptionsBuilder<SetTraceAttributes<S>>where
S::TraceAttributes: IsUnset,
Optional (Some / Option setters).
See AgentConfig::trace_attributes.
Sourcepub fn maybe_trace_attributes(
self,
value: Option<BTreeMap<String, AttributeValue>>,
) -> HarnessAgentOptionsBuilder<SetTraceAttributes<S>>where
S::TraceAttributes: IsUnset,
pub fn maybe_trace_attributes(
self,
value: Option<BTreeMap<String, AttributeValue>>,
) -> HarnessAgentOptionsBuilder<SetTraceAttributes<S>>where
S::TraceAttributes: IsUnset,
Optional (Some / Option setters).
See AgentConfig::trace_attributes.
Sourcepub fn baggage_attributes(
self,
value: BTreeMap<String, String>,
) -> HarnessAgentOptionsBuilder<SetBaggageAttributes<S>>where
S::BaggageAttributes: IsUnset,
pub fn baggage_attributes(
self,
value: BTreeMap<String, String>,
) -> HarnessAgentOptionsBuilder<SetBaggageAttributes<S>>where
S::BaggageAttributes: IsUnset,
Optional (Some / Option setters).
See AgentConfig::baggage_attributes.
Sourcepub fn maybe_baggage_attributes(
self,
value: Option<BTreeMap<String, String>>,
) -> HarnessAgentOptionsBuilder<SetBaggageAttributes<S>>where
S::BaggageAttributes: IsUnset,
pub fn maybe_baggage_attributes(
self,
value: Option<BTreeMap<String, String>>,
) -> HarnessAgentOptionsBuilder<SetBaggageAttributes<S>>where
S::BaggageAttributes: IsUnset,
Optional (Some / Option setters).
See AgentConfig::baggage_attributes.
Sourcepub fn sandbox(
self,
value: Arc<dyn Sandbox>,
) -> HarnessAgentOptionsBuilder<SetSandbox<S>>where
S::Sandbox: IsUnset,
pub fn sandbox(
self,
value: Arc<dyn Sandbox>,
) -> HarnessAgentOptionsBuilder<SetSandbox<S>>where
S::Sandbox: IsUnset,
Optional (Some / Option setters).
See AgentConfig::sandbox. The harness’s built-ins route through it, so the tools the
sandbox vends are dropped once the agent initializes.
Sourcepub fn maybe_sandbox(
self,
value: Option<Arc<dyn Sandbox>>,
) -> HarnessAgentOptionsBuilder<SetSandbox<S>>where
S::Sandbox: IsUnset,
pub fn maybe_sandbox(
self,
value: Option<Arc<dyn Sandbox>>,
) -> HarnessAgentOptionsBuilder<SetSandbox<S>>where
S::Sandbox: IsUnset,
Optional (Some / Option setters).
See AgentConfig::sandbox. The harness’s built-ins route through it, so the tools the
sandbox vends are dropped once the agent initializes.
Sourcepub fn storage(
self,
value: Arc<dyn Storage>,
) -> HarnessAgentOptionsBuilder<SetStorage<S>>where
S::Storage: IsUnset,
pub fn storage(
self,
value: Arc<dyn Storage>,
) -> HarnessAgentOptionsBuilder<SetStorage<S>>where
S::Storage: IsUnset,
Optional (Some / Option setters).
See AgentConfig::storage. Backs the context manager’s archive; defaults to the
session’s own folder when the harness builds the session.
Sourcepub fn maybe_storage(
self,
value: Option<Arc<dyn Storage>>,
) -> HarnessAgentOptionsBuilder<SetStorage<S>>where
S::Storage: IsUnset,
pub fn maybe_storage(
self,
value: Option<Arc<dyn Storage>>,
) -> HarnessAgentOptionsBuilder<SetStorage<S>>where
S::Storage: IsUnset,
Optional (Some / Option setters).
See AgentConfig::storage. Backs the context manager’s archive; defaults to the
session’s own folder when the harness builds the session.
Sourcepub fn session_manager(
self,
value: SessionManager,
) -> HarnessAgentOptionsBuilder<SetSessionManager<S>>where
S::SessionManager: IsUnset,
pub fn session_manager(
self,
value: SessionManager,
) -> HarnessAgentOptionsBuilder<SetSessionManager<S>>where
S::SessionManager: IsUnset,
Optional (Some / Option setters).
See AgentConfig::session_manager. Wins over session.
Sourcepub fn maybe_session_manager(
self,
value: Option<SessionManager>,
) -> HarnessAgentOptionsBuilder<SetSessionManager<S>>where
S::SessionManager: IsUnset,
pub fn maybe_session_manager(
self,
value: Option<SessionManager>,
) -> HarnessAgentOptionsBuilder<SetSessionManager<S>>where
S::SessionManager: IsUnset,
Optional (Some / Option setters).
See AgentConfig::session_manager. Wins over session.
Sourcepub fn memory_manager(
self,
value: impl Into<MemoryManagerSource>,
) -> HarnessAgentOptionsBuilder<SetMemoryManager<S>>where
S::MemoryManager: IsUnset,
pub fn memory_manager(
self,
value: impl Into<MemoryManagerSource>,
) -> HarnessAgentOptionsBuilder<SetMemoryManager<S>>where
S::MemoryManager: IsUnset,
Optional (Some / Option setters).
See AgentConfig::memory_manager. Wins over memory.
Sourcepub fn maybe_memory_manager(
self,
value: Option<impl Into<MemoryManagerSource>>,
) -> HarnessAgentOptionsBuilder<SetMemoryManager<S>>where
S::MemoryManager: IsUnset,
pub fn maybe_memory_manager(
self,
value: Option<impl Into<MemoryManagerSource>>,
) -> HarnessAgentOptionsBuilder<SetMemoryManager<S>>where
S::MemoryManager: IsUnset,
Optional (Some / Option setters).
See AgentConfig::memory_manager. Wins over memory.
Source§impl<S: State> HarnessAgentOptionsBuilder<S>
impl<S: State> HarnessAgentOptionsBuilder<S>
Sourcepub fn tools(
self,
tools: impl IntoIterator<Item = impl Into<ToolSource>>,
) -> Self
pub fn tools( self, tools: impl IntoIterator<Item = impl Into<ToolSource>>, ) -> Self
Adds consumer tools: any iterator of tools, Arc<dyn Tool>s, MCP clients or nested lists.
Sourcepub fn plugins(self, plugins: impl IntoIterator<Item = impl Plugin>) -> Self
pub fn plugins(self, plugins: impl IntoIterator<Item = impl Plugin>) -> Self
Adds consumer plugins, by value or as Arcs.
Auto Trait Implementations§
impl<S = Empty> !RefUnwindSafe for HarnessAgentOptionsBuilder<S>
impl<S = Empty> !UnwindSafe for HarnessAgentOptionsBuilder<S>
impl<S> Freeze for HarnessAgentOptionsBuilder<S>
impl<S> Send for HarnessAgentOptionsBuilder<S>
impl<S> Sync for HarnessAgentOptionsBuilder<S>
impl<S> Unpin for HarnessAgentOptionsBuilder<S>
impl<S> UnsafeUnpin for HarnessAgentOptionsBuilder<S>
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
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.