Skip to main content

AgentStepConfig

Type Alias AgentStepConfig 

Source
pub type AgentStepConfig = AgentConfig;
Expand description

Backward-compatible alias for AgentConfig.

§Examples

use ironflow_engine::config::AgentStepConfig;

let config = AgentStepConfig::new("Review this code for security issues")
    .model("haiku")
    .max_budget_usd(0.10);

Aliased Type§

pub struct AgentStepConfig {
Show 20 fields pub system_prompt: Option<String>, pub prompt: String, pub model: String, pub allowed_tools: Vec<String>, pub disallowed_tools: Vec<String>, pub max_turns: Option<u32>, pub max_budget_usd: Option<f64>, pub working_dir: Option<String>, pub mcp_config: Option<String>, pub strict_mcp_config: bool, pub bare: bool, pub permission_mode: PermissionMode, pub json_schema: Option<String>, pub resume_session_id: Option<String>, pub verbose: bool, pub pod_labels: BTreeMap<String, String>, pub inputs: Vec<AgentInput>, pub allow_failure: bool, pub retry: Option<RetryPolicy>, pub trace_context: Option<WorkflowTraceContext>, /* private fields */
}

Fields§

§system_prompt: Option<String>

Optional system prompt that sets the agent’s persona or constraints.

§prompt: String

The user prompt - the main instruction to the agent.

§model: String

Which model to use for this invocation.

Accepts any string. Use Model constants for well-known Claude models (e.g. Model::SONNET), or pass a custom identifier for other providers.

§allowed_tools: Vec<String>

Allowlist of tool names the agent may invoke (empty = provider default).

§disallowed_tools: Vec<String>

Denylist of tool names the agent MUST NOT invoke.

Maps to --disallowedTools on the Claude CLI. Unlike allowed_tools, this does not activate any tools; it only filters out tools that would otherwise be loaded by default. As such, it is safe to combine with structured output (output) without triggering the Claude CLI bug that affects --json-schema + --allowedTools.

§max_turns: Option<u32>

Maximum number of agentic turns before the provider should stop.

§max_budget_usd: Option<f64>

Maximum spend in USD for this single invocation.

§working_dir: Option<String>

Working directory for the agent process.

§mcp_config: Option<String>

Path to an MCP server configuration file.

§strict_mcp_config: bool

When true, pass --strict-mcp-config to the Claude CLI so it only loads MCP servers from mcp_config and ignores any global/user MCP configuration (e.g. ~/.claude.json).

Useful to prevent global MCP servers from leaking tools into steps that request structured_output, which triggers the Claude CLI bug where --json-schema combined with any active tool returns structured_output: null. See https://github.com/anthropics/claude-code/issues/18536.

Combine with mcp_config set to a file containing {"mcpServers":{}} to disable every MCP server for the invocation.

§bare: bool

When true, pass --bare to Claude CLI. Bare mode disables:

  • auto-memory (automatic creation of ~/.claude/.../memory/*.md files)
  • CLAUDE.md auto-discovery (no global/project CLAUDE.md loaded)
  • hooks, LSP, plugin sync, attribution, background prefetches

Recommended for orchestrator agents that should not have any implicit side effects on the user’s filesystem or inherit user-level context.

§Authentication requirement

--bare is only compatible with an Anthropic API key (ANTHROPIC_API_KEY environment variable). It does not work with OAuth authentication (claude /login / keychain-stored credentials), because bare mode disables keychain reads.

§permission_mode: PermissionMode

Permission mode controlling how the agent handles tool-use approvals.

§json_schema: Option<String>

Optional JSON Schema string. When set, the provider should request structured (typed) output from the model.

§resume_session_id: Option<String>

Optional session ID to resume a previous conversation.

When set, the provider should continue the conversation from the specified session rather than starting a new one.

§verbose: bool

Enable verbose/debug mode to capture the full conversation trace.

When true, the provider uses streaming output (stream-json) to record every assistant message and tool call. The resulting AgentOutput::debug_messages field will contain the conversation trace for inspection.

§pod_labels: BTreeMap<String, String>

Custom labels applied to the pod (K8s providers only).

Non-K8s providers ignore this field. Labels are merged with the provider-level pod labels and the hardcoded ironflow labels. In case of conflict, hardcoded labels always win, then invocation-level labels, then provider-level defaults.

§inputs: Vec<AgentInput>

External inputs to materialize on the agent’s filesystem before invocation.

See AgentInput for the semantics. The provider is responsible for fetching each URL and placing it at mount_path before the agent runs. Add inputs with AgentConfig::input_file.

§allow_failure: bool

When true, a failure of this step does not fail the run.

§retry: Option<RetryPolicy>

Optional step-level retry policy.

§trace_context: Option<WorkflowTraceContext>

Optional W3C trace context for distributed tracing propagation.

When set, providers can inject the traceparent header into outgoing HTTP requests (LLM APIs, MCP servers) to correlate workflow spans with downstream service spans.