pub struct AgentOptions {Show 30 fields
pub tool: String,
pub working_directory: String,
pub prompt: Option<String>,
pub prompt_file: Option<String>,
pub system_prompt: Option<String>,
pub append_system_prompt: Option<String>,
pub model: Option<String>,
pub fallback_model: Option<String>,
pub isolation: String,
pub screen_name: Option<String>,
pub container_name: Option<String>,
pub json: bool,
pub resume: Option<String>,
pub verbose: bool,
pub replay_user_messages: bool,
pub session_id: Option<String>,
pub fork_session: bool,
pub read_only: bool,
pub plan_only: bool,
pub approve_each: bool,
pub executable: Option<String>,
pub extra_args: Vec<String>,
pub extra_env: Vec<(String, String)>,
pub unset_env: Vec<String>,
pub inherit_env: InheritEnv,
pub env: Option<Vec<(String, String)>>,
pub skip_default_safety_flags: bool,
pub launch: LaunchOptions,
pub live_input: bool,
pub tool_overrides: ToolOverrides,
}Expand description
Agent options for creating a controller
Fields§
§tool: StringCLI tool to use (e.g., ‘claude’, ‘codex’, ‘opencode’, ‘agent’, ‘qwen’, ‘gemini’)
working_directory: StringWorking directory for the agent
prompt: Option<String>Prompt for the agent
prompt_file: Option<String>File containing prompt input for stdin-based tools
system_prompt: Option<String>System prompt for the agent
append_system_prompt: Option<String>Append to the default system prompt (tool-specific)
model: Option<String>Model to use (tool-specific)
fallback_model: Option<String>Fallback model to use when the primary model is overloaded (tool-specific)
isolation: StringIsolation mode: ‘none’, ‘screen’, ‘docker’
screen_name: Option<String>Screen session name (for screen isolation)
container_name: Option<String>Container name (for docker isolation)
json: boolEnable JSON output mode
resume: Option<String>Resume a previous session (tool-specific)
verbose: boolEnable verbose output (tool-specific)
replay_user_messages: boolRe-emit user messages in streaming output (tool-specific)
session_id: Option<String>Use a specific session ID (tool-specific)
fork_session: boolFork a resumed session into a new session (tool-specific)
read_only: boolEnforce native read-only/planning mode
plan_only: boolEnforce native planning mode (where the tool distinguishes it)
approve_each: boolApprove each mutating command (ask mode), relayed over the tool’s native
per-command JSON permission protocol (only claude and agent)
executable: Option<String>Override the tool executable path/name
extra_args: Vec<String>Extra raw arguments appended after typed tool arguments
extra_env: Vec<(String, String)>Extra environment variables applied to the tool executable
unset_env: Vec<String>Variables removed from the inherited environment of the tool
inherit_env: InheritEnvWhich host variables the tool inherits: all (default), none, or an allowlist (issue #60)
env: Option<Vec<(String, String)>>Explicit environment replacing the inherited one; extra_env and
unset_env still apply on top (issue #60)
skip_default_safety_flags: boolDo not add default autonomous safety bypass flags
launch: LaunchOptionsShared launch options: reasoning effort, MCP servers, strict MCP configuration, extra workspace directories, attachments and a JSON Schema for structured output
live_input: boolKeep stdin open for Agent::send_message and Agent::interrupt
(claude, qwen, agent; attached runs without isolation). The
prompt becomes the first stream-json frame and JSON output is forced.
tool_overrides: ToolOverridesReplace the command builder, output parser, session ID or usage extractor, or launch capabilities for this run
Trait Implementations§
Source§impl Clone for AgentOptions
impl Clone for AgentOptions
Source§impl Debug for AgentOptions
impl Debug for AgentOptions
Auto Trait Implementations§
impl Forget for AgentOptions
impl Freeze for AgentOptions
impl Move for AgentOptions
impl RefUnwindSafe for AgentOptions
impl Send for AgentOptions
impl Sync for AgentOptions
impl Unpin for AgentOptions
impl UnsafeUnpin for AgentOptions
impl UnwindSafe for AgentOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.