pub struct StandardDefinition {Show 30 fields
pub name: String,
pub description: String,
pub version: Option<String>,
pub instructions: String,
pub mcp_servers: Option<Vec<McpDefinition>>,
pub model_settings: Option<ModelSettings>,
pub analysis_model_settings: Option<ModelSettings>,
pub history_size: Option<usize>,
pub strategy: Option<AgentStrategy>,
pub icon_url: Option<String>,
pub max_iterations: Option<usize>,
pub skills_description: Vec<AgentSkill>,
pub available_skills: Vec<AvailableSkill>,
pub sub_agents: Vec<String>,
pub tool_format: ToolCallFormat,
pub tool_delivery_mode: ToolDeliveryMode,
pub tools: Option<ToolsConfig>,
pub partials: HashMap<String, String>,
pub reflection: Option<ReflectionConfig>,
pub enable_todos: Option<bool>,
pub browser_config: Option<BrowserAgentConfig>,
pub include_shell: Option<bool>,
pub context_size: Option<u32>,
pub append_default_instructions: Option<bool>,
pub include_scratchpad: Option<bool>,
pub hooks: Vec<String>,
pub user_message_overrides: Option<UserMessageOverrides>,
pub compaction_enabled: bool,
pub remote: bool,
pub runtime: Vec<RuntimeMode>,
}Expand description
Agent definition - complete configuration for an agent
Fields§
§name: StringThe name of the agent.
description: StringA brief description of the agent’s purpose.
version: Option<String>The version of the agent.
instructions: StringInstructions for the agent - serves as an introduction defining what the agent is and does.
mcp_servers: Option<Vec<McpDefinition>>A list of MCP server definitions associated with the agent.
model_settings: Option<ModelSettings>Settings related to the model used by the agent.
When None, the agent inherits model settings from the orchestrator context defaults.
analysis_model_settings: Option<ModelSettings>Optional lower-level model settings for lightweight analysis helpers
history_size: Option<usize>The size of the history to maintain for the agent.
strategy: Option<AgentStrategy>The new strategy configuration for the agent.
icon_url: Option<String>A2A-specific fields
max_iterations: Option<usize>§skills_description: Vec<AgentSkill>A2A agent card skills metadata (describes capabilities for agent-to-agent protocol)
available_skills: Vec<AvailableSkill>Skills available for on-demand loading by this agent
sub_agents: Vec<String>List of sub-agents that this agent can transfer control to
tool_format: ToolCallFormatTool calling configuration
tool_delivery_mode: ToolDeliveryModeHow tools are delivered to the LLM (all upfront vs on-demand search)
tools: Option<ToolsConfig>Tools configuration for this agent
partials: HashMap<String, String>Custom handlebars partials (name -> template path) for use in custom prompts
reflection: Option<ReflectionConfig>Reflection configuration for post-execution analysis using a subagent
enable_todos: Option<bool>Whether to enable TODO management functionality
browser_config: Option<BrowserAgentConfig>Browser configuration for this agent (enables shared Chromium automation)
include_shell: Option<bool>Whether to include shell/code execution tools (start_shell, execute_shell, stop_shell)
context_size: Option<u32>Context size override for this agent (overrides model_settings.context_size)
append_default_instructions: Option<bool>Strategy for prompt construction (append default template vs fully custom)
include_scratchpad: Option<bool>Whether to include the built-in scratchpad/history in prompts (default: true)
hooks: Vec<String>Optional hook names to attach to this agent
user_message_overrides: Option<UserMessageOverrides>Custom user message construction (dynamic prompting)
compaction_enabled: boolWhether context compaction is enabled for this agent (default: true)
remote: boolDEPRECATED: prefer runtime = ["cli"] instead.
When true, this is treated as runtime = [Cli] — the agent needs a
CLI-style local environment (filesystem, shell exec). In a Cloud
runtime the orchestrator forks the call into a sandbox via
BackgroundRunner. Kept for backwards compatibility with existing
agent definitions and the --remote CLI flag / DefinitionOverrides.remote.
runtime: Vec<RuntimeMode>Runtime constraint for this agent. Like Docker’s platforms field:
- empty / omitted → runs in any runtime (default).
["cli"]→ only runs whenExecutorContext.runtime_mode == Cli, OR via aBackgroundRunnerprovidingCli(e.g.SandboxLauncherspawningdistri-cliinside a browsr container).["cli", "cloud"]→ runs in either Cli or Cloud, but not Browser.
When the current runtime doesn’t match any allowed value and no compatible runner exists, the orchestrator fails fast at request entry.
Accepts both scalar (runtime = "cli") and array (runtime = ["cli"])
syntax in TOML/JSON for ergonomics.
Implementations§
Source§impl StandardDefinition
impl StandardDefinition
Sourcepub fn allowed_runtimes(&self) -> Vec<RuntimeMode>
pub fn allowed_runtimes(&self) -> Vec<RuntimeMode>
The set of runtimes this agent is allowed to run in, with the
deprecated remote: true flag merged in (treated as [Cli] when
runtime is empty).
Empty result = no constraint = runs anywhere.
Sourcepub fn is_runnable_in(
&self,
current: &RuntimeMode,
runner_provides: Option<&RuntimeMode>,
) -> bool
pub fn is_runnable_in( &self, current: &RuntimeMode, runner_provides: Option<&RuntimeMode>, ) -> bool
Whether this agent can execute given the caller’s current runtime,
optionally with a BackgroundRunner providing an alternative runtime
via remote dispatch.
Returns true when:
- the agent has no runtime constraint, OR
- the current runtime matches one of the allowed runtimes, OR
- a runner is available whose
provided_runtimematches one of the allowed runtimes.
Sourcepub fn should_use_browser(&self) -> bool
pub fn should_use_browser(&self) -> bool
Check if browser should be initialized automatically in orchestrator (default: false)
Sourcepub fn browser_settings(&self) -> Option<&BrowserAgentConfig>
pub fn browser_settings(&self) -> Option<&BrowserAgentConfig>
Returns browser config if defined
Sourcepub fn browser_runtime_config(&self) -> Option<BrowsrClientConfig>
pub fn browser_runtime_config(&self) -> Option<BrowsrClientConfig>
Returns the runtime Chromium driver configuration if enabled
Sourcepub fn should_persist_browser_session(&self) -> bool
pub fn should_persist_browser_session(&self) -> bool
Should browser session state be serialized after tool runs
Sourcepub fn is_reflection_enabled(&self) -> bool
pub fn is_reflection_enabled(&self) -> bool
Check if reflection is enabled (default: false)
Sourcepub fn reflection_config(&self) -> Option<&ReflectionConfig>
pub fn reflection_config(&self) -> Option<&ReflectionConfig>
Get the reflection configuration, if any
Sourcepub fn is_todos_enabled(&self) -> bool
pub fn is_todos_enabled(&self) -> bool
Check if TODO management functionality is enabled (default: false)
Sourcepub fn should_include_shell(&self) -> bool
pub fn should_include_shell(&self) -> bool
Check if shell/code execution tools should be included (default: false)
Sourcepub fn model_settings(&self) -> Option<&ModelSettings>
pub fn model_settings(&self) -> Option<&ModelSettings>
Get model settings if configured.
Sourcepub fn model_settings_mut(&mut self) -> Option<&mut ModelSettings>
pub fn model_settings_mut(&mut self) -> Option<&mut ModelSettings>
Get a mutable reference to model settings, if present.
Sourcepub fn get_effective_context_size(&self) -> u32
pub fn get_effective_context_size(&self) -> u32
Get the effective context size (agent-level override or model settings)
Sourcepub fn analysis_model_settings_config(&self) -> Option<&ModelSettings>
pub fn analysis_model_settings_config(&self) -> Option<&ModelSettings>
Model settings to use for lightweight browser analysis helpers (e.g., observe_summary commands)
Sourcepub fn include_scratchpad(&self) -> bool
pub fn include_scratchpad(&self) -> bool
Whether to include the persistent scratchpad/history in prompts
Sourcepub fn apply_overrides(&mut self, overrides: DefinitionOverrides)
pub fn apply_overrides(&mut self, overrides: DefinitionOverrides)
Apply definition overrides to this agent definition
Source§impl StandardDefinition
impl StandardDefinition
pub fn validate(&self) -> Result<()>
Sourcepub fn validate_reflection_agent(agent_def: &StandardDefinition) -> Result<()>
pub fn validate_reflection_agent(agent_def: &StandardDefinition) -> Result<()>
Validate that a reflection agent definition has the “reflect” tool configured. This is called at registration time when we have access to the full agent config.
Trait Implementations§
Source§impl Clone for StandardDefinition
impl Clone for StandardDefinition
Source§fn clone(&self) -> StandardDefinition
fn clone(&self) -> StandardDefinition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StandardDefinition
impl Debug for StandardDefinition
Source§impl Default for StandardDefinition
impl Default for StandardDefinition
Source§fn default() -> StandardDefinition
fn default() -> StandardDefinition
Source§impl<'de> Deserialize<'de> for StandardDefinition
impl<'de> Deserialize<'de> for StandardDefinition
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>,
Source§impl From<StandardDefinition> for LlmDefinition
impl From<StandardDefinition> for LlmDefinition
Source§fn from(definition: StandardDefinition) -> Self
fn from(definition: StandardDefinition) -> Self
Source§impl JsonSchema for StandardDefinition
impl JsonSchema for StandardDefinition
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more