pub struct AgentOptions {Show 24 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 skip_default_safety_flags: bool,
}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
skip_default_safety_flags: boolDo not add default autonomous safety bypass flags
Trait Implementations§
Source§impl Clone for AgentOptions
impl Clone for AgentOptions
Source§fn clone(&self) -> AgentOptions
fn clone(&self) -> AgentOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AgentOptions
impl Debug for AgentOptions
Source§impl Default for AgentOptions
impl Default for AgentOptions
Source§fn default() -> AgentOptions
fn default() -> AgentOptions
Auto Trait Implementations§
impl Freeze 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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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