Skip to main content

AgentConfig

Struct AgentConfig 

Source
pub struct AgentConfig {
Show 24 fields pub command: String, pub provider: Option<String>, pub model: Option<String>, pub system_prompt: Option<String>, pub root: Option<String>, pub add_dirs: Vec<String>, pub env: Vec<(String, String)>, pub files: Vec<String>, pub auto_approve: bool, pub worktree: Option<Option<String>>, pub sandbox: Option<String>, pub json_mode: bool, pub json_schema: Option<String>, pub output_format: Option<String>, pub max_turns: Option<u32>, pub timeout: Option<String>, pub mcp_config: Option<String>, pub session_name: String, pub description: Option<String>, pub tags: Vec<String>, pub prompt: String, pub accepts_agent_args: bool, pub command_params: Option<CommandParams>, pub interactive: bool,
}
Expand description

Serializable snapshot of everything a step contributes to an agent invocation. Produced by [build_agent_config] and used by both the executor (to configure a AgentBuilder) and --dry-run (to show the author what each step will ask of the agent).

The shape mirrors AgentBuilder field-for-field; additional command-specific parameters (review/plan/pipe/collect/summary) are stored in the optional command_params bag.

Fields§

§command: String

Subcommand label — "run", "review", "plan", "pipe", "collect", or "summary".

§provider: Option<String>

Agent-level knobs.

§model: Option<String>§system_prompt: Option<String>§root: Option<String>§add_dirs: Vec<String>§env: Vec<(String, String)>§files: Vec<String>§auto_approve: bool§worktree: Option<Option<String>>

None → no worktree, Some(None) → generated name, Some(Some(n)) → explicit.

§sandbox: Option<String>§json_mode: bool

Output shaping.

§json_schema: Option<String>§output_format: Option<String>§max_turns: Option<u32>

Turn / timeout / MCP.

§timeout: Option<String>§mcp_config: Option<String>§session_name: String

Session metadata — always set (session name derives from workflow/step).

§description: Option<String>§tags: Vec<String>§prompt: String

The effective prompt after dependency/context/plan prepending.

§accepts_agent_args: bool

Whether accepts_agent_args was true for this command — pipe/run/ review/plan/exec respect agent-level flags; collect/summary don’t.

§command_params: Option<CommandParams>

Extra params for the non-plain commands. None for run.

§interactive: bool

Interactive flag — steps with interactive = true run through AgentBuilder::run instead of exec.

Trait Implementations§

Source§

impl Clone for AgentConfig

Source§

fn clone(&self) -> AgentConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AgentConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AgentConfig

Source§

fn default() -> AgentConfig

Returns the “default value” for a type. Read more
Source§

impl Serialize for AgentConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more