pub struct AgentSpec {
pub name: String,
pub description: String,
pub model: String,
pub reasoning_effort: Option<ReasoningEffort>,
pub model_settings: ModelSettings,
pub context_window: Option<u32>,
pub prompts: Vec<Prompt>,
pub provider_connections: ProviderConnectionOverrides,
pub mcp: McpConfig,
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.
model_settings: ModelSettingsSampling controls applied to this agent’s model calls.
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: McpConfigMCP servers this agent connects to
exposure: AgentSpecExposureHow this agent can be invoked.
tools: ToolFilterTool filter for restricting which MCP tools this agent can use.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentSpec
impl RefUnwindSafe for AgentSpec
impl Send for AgentSpec
impl Sync for AgentSpec
impl Unpin for AgentSpec
impl UnsafeUnpin for AgentSpec
impl UnwindSafe for AgentSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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