pub struct TaskConfig {Show 14 fields
pub prompt: String,
pub agent: AgentKind,
pub cwd: Option<PathBuf>,
pub model: Option<String>,
pub permission_mode: PermissionMode,
pub output_format: OutputFormat,
pub max_turns: Option<u32>,
pub max_budget_usd: Option<f64>,
pub timeout_secs: Option<u64>,
pub system_prompt: Option<String>,
pub append_system_prompt: Option<String>,
pub binary_path: Option<PathBuf>,
pub env: HashMap<String, String>,
pub extra_args: Vec<String>,
}Expand description
Unified task configuration — everything needed to run a task on any agent.
Fields§
§prompt: StringThe prompt / instruction to send to the agent.
agent: AgentKindWhich agent backend to use.
cwd: Option<PathBuf>Working directory for the agent.
model: Option<String>Model override (e.g. “sonnet”, “gpt-5-codex”, “claude-opus-4-6”).
permission_mode: PermissionModeHow to handle tool approvals.
output_format: OutputFormatOutput format.
max_turns: Option<u32>Maximum number of agentic turns before stopping.
max_budget_usd: Option<f64>Maximum spend in USD before stopping.
timeout_secs: Option<u64>Timeout in seconds for the entire run.
system_prompt: Option<String>Custom system prompt (replaces default).
append_system_prompt: Option<String>Custom system prompt to append to the default.
binary_path: Option<PathBuf>Override the agent binary path.
env: HashMap<String, String>Additional environment variables to set for the agent process.
extra_args: Vec<String>Extra agent-specific flags passed through verbatim.
Implementations§
Trait Implementations§
Source§impl Clone for TaskConfig
impl Clone for TaskConfig
Source§fn clone(&self) -> TaskConfig
fn clone(&self) -> TaskConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TaskConfig
impl Debug for TaskConfig
Source§impl<'de> Deserialize<'de> for TaskConfig
impl<'de> Deserialize<'de> for TaskConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TaskConfig
impl RefUnwindSafe for TaskConfig
impl Send for TaskConfig
impl Sync for TaskConfig
impl Unpin for TaskConfig
impl UnwindSafe for TaskConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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