pub struct AgentStepConfig {
pub prompt: String,
pub system_prompt: Option<String>,
pub model: Option<String>,
pub max_budget_usd: Option<f64>,
pub max_turns: Option<u32>,
pub allowed_tools: Vec<String>,
pub working_dir: Option<String>,
pub permission_mode: Option<String>,
}Expand description
Serializable configuration for an agent step.
§Examples
use ironflow_engine::config::AgentStepConfig;
let config = AgentStepConfig::new("Review this code for security issues")
.model("haiku")
.max_budget_usd(0.10);Fields§
§prompt: StringThe user prompt.
system_prompt: Option<String>Optional system prompt.
model: Option<String>Model name (e.g. “sonnet”, “opus”, “haiku”).
max_budget_usd: Option<f64>Maximum budget in USD.
max_turns: Option<u32>Maximum number of agentic turns.
allowed_tools: Vec<String>Tool allowlist.
working_dir: Option<String>Working directory for the agent.
permission_mode: Option<String>Permission mode (e.g. “auto”, “dont_ask”).
Implementations§
Source§impl AgentStepConfig
impl AgentStepConfig
Sourcepub fn new(prompt: &str) -> Self
pub fn new(prompt: &str) -> Self
Create a new agent config with the given prompt.
§Examples
use ironflow_engine::config::AgentStepConfig;
let config = AgentStepConfig::new("Summarize this file");
assert_eq!(config.prompt, "Summarize this file");Sourcepub fn system_prompt(self, prompt: &str) -> Self
pub fn system_prompt(self, prompt: &str) -> Self
Set the system prompt.
Sourcepub fn max_budget_usd(self, budget: f64) -> Self
pub fn max_budget_usd(self, budget: f64) -> Self
Set the maximum budget in USD.
Sourcepub fn allow_tool(self, tool: &str) -> Self
pub fn allow_tool(self, tool: &str) -> Self
Add an allowed tool.
Sourcepub fn working_dir(self, dir: &str) -> Self
pub fn working_dir(self, dir: &str) -> Self
Set the working directory.
Sourcepub fn permission_mode(self, mode: &str) -> Self
pub fn permission_mode(self, mode: &str) -> Self
Set the permission mode.
Trait Implementations§
Source§impl Clone for AgentStepConfig
impl Clone for AgentStepConfig
Source§fn clone(&self) -> AgentStepConfig
fn clone(&self) -> AgentStepConfig
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 AgentStepConfig
impl Debug for AgentStepConfig
Source§impl<'de> Deserialize<'de> for AgentStepConfig
impl<'de> Deserialize<'de> for AgentStepConfig
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 AgentStepConfig
impl RefUnwindSafe for AgentStepConfig
impl Send for AgentStepConfig
impl Sync for AgentStepConfig
impl Unpin for AgentStepConfig
impl UnsafeUnpin for AgentStepConfig
impl UnwindSafe for AgentStepConfig
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