pub struct AgentLoopConfig {Show 34 fields
pub max_rounds: usize,
pub system_prompt: Option<String>,
pub disabled_skill_ids: BTreeSet<String>,
pub selected_skill_ids: Option<Vec<String>>,
pub selected_skill_mode: Option<String>,
pub additional_tool_schemas: Vec<ToolSchema>,
pub tool_registry: Arc<ToolRegistry>,
pub composition_executor: Option<Arc<CompositionExecutor>>,
pub skill_manager: Option<Arc<SkillManager>>,
pub skip_initial_user_message: bool,
pub storage: Option<Arc<dyn Storage>>,
pub attachment_reader: Option<Arc<dyn AttachmentReader>>,
pub metrics_collector: Option<MetricsCollector>,
pub model_name: Option<String>,
pub fast_model_name: Option<String>,
pub background_model_name: Option<String>,
pub planning_model_name: Option<String>,
pub search_model_name: Option<String>,
pub compression_instructions: Option<String>,
pub summarization_model_name: Option<String>,
pub background_model_provider: Option<Arc<dyn LLMProvider>>,
pub provider_name: Option<String>,
pub reasoning_effort: Option<ReasoningEffort>,
pub disabled_tools: BTreeSet<String>,
pub token_budget: Option<TokenBudget>,
pub image_fallback: Option<ImageFallbackConfig>,
pub prompt_memory_flags: PromptMemoryFlags,
pub max_tool_calls_per_round: usize,
pub max_consecutive_failures_per_tool: usize,
pub strict_argument_tool_names: Vec<String>,
pub per_tool_timeout_secs: u64,
pub parallel_batch_timeout_secs: u64,
pub permission_mode: Option<PermissionMode>,
pub features_dynamic_model_routing: bool,
}Expand description
Configuration for the agent loop.
Fields§
§max_rounds: usize§system_prompt: Option<String>§disabled_skill_ids: BTreeSet<String>Skill IDs that are disabled globally for this execution.
selected_skill_ids: Option<Vec<String>>Optional explicit skill selection for this execution. When set, only these skill IDs are considered for skill context and allowlists.
selected_skill_mode: Option<String>Optional active skill mode for this execution.
When set, skill discovery prefers skills-<mode> directories over generic
directories for the same skill id.
additional_tool_schemas: Vec<ToolSchema>§tool_registry: Arc<ToolRegistry>§composition_executor: Option<Arc<CompositionExecutor>>§skill_manager: Option<Arc<SkillManager>>§skip_initial_user_message: boolIf true, skip appending the initial user message (already present in session).
storage: Option<Arc<dyn Storage>>Optional storage for persisting session changes
attachment_reader: Option<Arc<dyn AttachmentReader>>Optional attachment reader for resolving bamboo-attachment://... references
into data: URLs for upstream providers. This must not mutate session storage.
metrics_collector: Option<MetricsCollector>Optional asynchronous metrics collector
model_name: Option<String>Model name used for metrics attribution
fast_model_name: Option<String>Optional explicit fast/cheap model name for lightweight foreground tasks such as task evaluation.
Call sites may fall back to model_name when this is unset.
background_model_name: Option<String>Dedicated background summarization model for host-side context compression and other non-interactive maintenance work.
Unlike fast_model_name, this must not silently fall back to the main
interaction model.
planning_model_name: Option<String>Model for planning/coordination tasks (task decomposition, architecture).
Falls back to model_name when unset.
search_model_name: Option<String>Model for search/navigation tasks (grep, file listing, symbol resolution).
Falls back to fast_model_name when unset.
compression_instructions: Option<String>Custom instructions for conversation summarization, injected into the LLM summary prompt. Lets users control what the summary focuses on.
Resolution order: session-level > config-level > built-in defaults.
summarization_model_name: Option<String>Dedicated model for summarization. Falls back to background_model_name.
background_model_provider: Option<Arc<dyn LLMProvider>>Optional provider override for background/fast model LLM calls.
When set, context compression, summarization, and other background model calls use this provider instead of the shared agent loop provider.
provider_name: Option<String>Provider name used for provider-specific request behavior.
reasoning_effort: Option<ReasoningEffort>Optional request-time reasoning effort override.
disabled_tools: BTreeSet<String>Tool names that should be excluded from schemas sent to the LLM.
token_budget: Option<TokenBudget>Token budget for context management (optional, defaults to model’s limits)
image_fallback: Option<ImageFallbackConfig>Optional image fallback behavior applied to LLM requests only (never persisted).
This is intended for text-only provider paths where image parts must be degraded (placeholder / OCR / error) without leaking into stored session history or UI.
prompt_memory_flags: PromptMemoryFlagsFeature flags controlling prompt-time memory injection behavior.
max_tool_calls_per_round: usizeMaximum tool calls allowed per round (default: 80).
max_consecutive_failures_per_tool: usizeMaximum consecutive failures per tool before circuit breaker (default: 3).
strict_argument_tool_names: Vec<String>Tool names that require strict argument validation.
per_tool_timeout_secs: u64Per-tool execution timeout in seconds (default: 120).
parallel_batch_timeout_secs: u64Parallel batch execution timeout in seconds (default: 300).
permission_mode: Option<PermissionMode>Permission mode for this execution (default: None = use PermissionConfig’s mode).
features_dynamic_model_routing: boolEnable dynamic per-round model routing based on task complexity. When true, the pipeline classifies complexity at each round end and stores the result in session metadata.