pub struct FighterLoopParams {Show 19 fields
pub manifest: FighterManifest,
pub user_message: String,
pub bout_id: BoutId,
pub fighter_id: FighterId,
pub memory: Arc<MemorySubstrate>,
pub driver: Arc<dyn LlmDriver>,
pub available_tools: Vec<ToolDefinition>,
pub mcp_tools: Vec<ToolDefinition>,
pub max_iterations: Option<usize>,
pub context_window: Option<usize>,
pub tool_timeout_secs: Option<u64>,
pub coordinator: Option<Arc<dyn AgentCoordinator>>,
pub approval_engine: Option<Arc<PolicyEngine>>,
pub sandbox: Option<Arc<SandboxEnforcer>>,
pub mcp_clients: Option<Arc<DashMap<String, Arc<McpClient>>>>,
pub model_routing: Option<ModelRoutingConfig>,
pub channel_notifier: Option<Arc<dyn ChannelNotifier>>,
pub user_content_parts: Vec<ContentPart>,
pub eco_mode: bool,
}Expand description
Parameters for the fighter loop.
Fields§
§manifest: FighterManifestThe fighter’s manifest (identity, model config, system prompt, capabilities).
user_message: StringThe user’s message to process.
bout_id: BoutIdThe bout (session) ID.
fighter_id: FighterIdThe fighter’s unique ID.
memory: Arc<MemorySubstrate>Shared memory substrate for persistence.
driver: Arc<dyn LlmDriver>The LLM driver to use for completions.
available_tools: Vec<ToolDefinition>Tools available for this fighter to use.
When provided, bypasses dynamic tool selection (used by workflows, gorillas, tests).
When empty, the fighter loop uses ToolSelector for context-aware tool loading.
mcp_tools: Vec<ToolDefinition>Pre-fetched MCP tools for this fighter (merged into tool list each turn).
max_iterations: Option<usize>Maximum loop iterations before forced termination (default: 50).
context_window: Option<usize>Context window size in tokens (default: 200K).
tool_timeout_secs: Option<u64>Per-tool timeout in seconds (default: 120).
coordinator: Option<Arc<dyn AgentCoordinator>>Optional agent coordinator for inter-agent tools.
approval_engine: Option<Arc<PolicyEngine>>Optional policy engine for approval-gated tool execution. When present, the referee checks every move before the fighter can throw it.
sandbox: Option<Arc<SandboxEnforcer>>Optional subprocess sandbox (containment ring) for shell and filesystem tools. When present, commands are validated and environments are sanitized before execution.
mcp_clients: Option<Arc<DashMap<String, Arc<McpClient>>>>Active MCP server clients shared across fighters. When present, MCP tools are available for dispatch.
model_routing: Option<ModelRoutingConfig>Smart model routing configuration. When enabled, the router selects cheap / mid / expensive models based on the user’s message complexity.
channel_notifier: Option<Arc<dyn ChannelNotifier>>Optional channel notifier for proactive outbound messaging.
When present, the channel_notify tool can send messages to
connected channels (Telegram, Slack, Discord, etc.).
user_content_parts: Vec<ContentPart>Optional multimodal content parts (images) to attach to the user message. When present, the user message is sent with these parts for vision-capable models.
eco_mode: boolWhen true, the fighter operates in eco mode: forces cheap model tier, caps max_tokens to 1024, skips post-bout reflection, and uses compact creed. Activated when approaching budget limits.
Auto Trait Implementations§
impl Freeze for FighterLoopParams
impl !RefUnwindSafe for FighterLoopParams
impl Send for FighterLoopParams
impl Sync for FighterLoopParams
impl Unpin for FighterLoopParams
impl UnsafeUnpin for FighterLoopParams
impl !UnwindSafe for FighterLoopParams
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more