pub struct AgentSpec {
pub name: String,
pub description: String,
pub model: String,
pub reasoning_effort: Option<ReasoningEffort>,
pub context_window: Option<u32>,
pub prompts: Vec<Prompt>,
pub provider_connections: ProviderConnectionOverrides,
pub mcp_config_sources: Vec<McpConfigSource>,
pub exposure: AgentSpecExposure,
pub tools: ToolFilter,
}Expand description
A resolved agent specification ready for runtime use.
This type is produced by validating and resolving authored agent configuration. All validation happens before constructing these runtime types.
Fields§
§name: StringThe canonical lookup key for this agent.
description: StringHuman-readable description of this agent’s purpose.
model: StringThe validated model spec to use for this agent.
This is stored as a canonical string so authored settings can represent
both single models (provider:model) and alloy specs
(provider1:model1,provider2:model2).
reasoning_effort: Option<ReasoningEffort>Optional reasoning effort level for models that support it.
context_window: Option<u32>Effective context window in tokens for this agent.
prompts: Vec<Prompt>The prompt stack for this agent.
provider_connections: ProviderConnectionOverridesProvider connection overrides keyed by model provider name.
mcp_config_sources: Vec<McpConfigSource>Resolved MCP config sources for this agent, applied in order.
Direct server name collisions use last-source-wins semantics. Proxy-enabled file sources are merged into a single runtime tool proxy.
exposure: AgentSpecExposureHow this agent can be invoked.
tools: ToolFilterTool filter for restricting which MCP tools this agent can use.
Implementations§
Source§impl AgentSpec
impl AgentSpec
Sourcepub fn default_spec(
model: &LlmModel,
reasoning_effort: Option<ReasoningEffort>,
prompts: Vec<Prompt>,
) -> Self
pub fn default_spec( model: &LlmModel, reasoning_effort: Option<ReasoningEffort>, prompts: Vec<Prompt>, ) -> Self
Create a default (no-mode) agent spec with the provided prompts.