pub struct OrchestratorConfig {Show 22 fields
pub max_turns: usize,
pub max_tokens: u32,
pub context_strategy: Option<ContextStrategyConfig>,
pub summarize_threshold: Option<u32>,
pub tool_timeout_seconds: Option<u64>,
pub max_tool_output_bytes: Option<usize>,
pub run_timeout_seconds: Option<u64>,
pub enable_squads: Option<bool>,
pub reasoning_effort: Option<String>,
pub enable_reflection: Option<bool>,
pub tool_output_compression_threshold: Option<usize>,
pub max_tools_per_turn: Option<usize>,
pub tool_profile: Option<String>,
pub max_identical_tool_calls: Option<u32>,
pub max_fuzzy_identical_tool_calls: Option<u32>,
pub max_tool_calls_per_turn: Option<u32>,
pub dispatch_mode: Option<DispatchMode>,
pub routing: RoutingMode,
pub escalation: bool,
pub multi_agent_prompt: Option<bool>,
pub spawn: Option<SpawnConfig>,
pub max_tokens_in_flight_per_tenant: Option<usize>,
}Expand description
Orchestrator-level settings with sensible defaults.
Fields§
§max_turns: usize§max_tokens: u32§context_strategy: Option<ContextStrategyConfig>Context window management strategy for the orchestrator’s own conversation.
summarize_threshold: Option<u32>Token threshold for summarization of the orchestrator’s own context.
tool_timeout_seconds: Option<u64>Timeout in seconds for the orchestrator’s own tool calls.
max_tool_output_bytes: Option<usize>Maximum byte size for tool output on the orchestrator’s own tools.
run_timeout_seconds: Option<u64>Wall-clock deadline in seconds for the entire orchestrator run.
enable_squads: Option<bool>Enable the form_squad tool for dynamic agent squad formation.
When None (default), auto-enabled when there are >= 2 agents.
Set to false to disable for a simpler prompt with fewer tokens.
reasoning_effort: Option<String>Reasoning/thinking effort level. Enables extended thinking on models that support it (e.g., Qwen3 via OpenRouter, Claude with extended thinking). Valid values: “high”, “medium”, “low”, “none”.
enable_reflection: Option<bool>Enable reflection prompts after tool results. When true, the agent pauses to assess tool outputs before deciding the next action (Reflexion/CRITIC pattern).
tool_output_compression_threshold: Option<usize>Tool output compression threshold in bytes. Outputs exceeding this size are compressed via an LLM call that preserves factual content.
max_tools_per_turn: Option<usize>Maximum number of tool definitions sent per LLM turn. When agents have many tools, filtering to the most relevant reduces context usage and cost.
tool_profile: Option<String>Tool profile for pre-filtering tool definitions. Valid values: “conversational”, “standard”, “full”. Defaults to no filtering.
max_identical_tool_calls: Option<u32>Maximum consecutive identical tool-call turns before doom loop detection triggers. When reached, tool calls get error results instead of executing.
max_fuzzy_identical_tool_calls: Option<u32>Maximum consecutive fuzzy-identical tool-call turns before doom loop detection. Fuzzy matching compares sorted tool names (ignoring inputs).
max_tool_calls_per_turn: Option<u32>Maximum number of tool calls allowed in a single LLM turn. When a turn contains more tool calls than this limit, the excess calls are rejected with an error result (per-turn cap, not cumulative).
dispatch_mode: Option<DispatchMode>Dispatch mode for orchestrator delegation. When Sequential, the
delegate_task schema constrains maxItems: 1 so the LLM dispatches
one agent at a time. Defaults to Parallel when absent.
routing: RoutingModeTask routing strategy: auto (default), always_orchestrate, single_agent.
auto uses heuristic scoring + capability matching to route simple tasks
to a single agent and complex tasks to the orchestrator.
escalation: boolEscalate from single-agent to orchestrator on failure. Default: true. When a single-agent run fails with MaxTurnsExceeded, doom loop, or excessive compaction, the task is re-run through the orchestrator.
multi_agent_prompt: Option<bool>Append the multi-agent collaboration prompt to sub-agent system prompts. Teaches sub-agents blackboard protocol, dedup, cross-verification, and structured execution. Default: true.
spawn: Option<SpawnConfig>Dynamic agent spawning configuration. When present, enables the spawn_agent
tool on the orchestrator, allowing the LLM to create specialist agents at runtime.
max_tokens_in_flight_per_tenant: Option<usize>Per-tenant in-flight token cap for the TenantTokenTracker.
When None, in-flight token tracking is disabled (effectively unbounded).
Must be > 0 when set.