pub struct AgentSpecPatch {Show 13 fields
pub model_id: Option<String>,
pub system_prompt: Option<String>,
pub max_rounds: Option<usize>,
pub max_continuation_retries: Option<usize>,
pub context_policy: Option<Option<ContextWindowPolicy>>,
pub plugin_ids: Option<Vec<String>>,
pub active_hook_filter: Option<HashSet<String>>,
pub sections: Option<HashMap<String, Value>>,
pub allowed_tools: Option<Option<Vec<String>>>,
pub excluded_tools: Option<Option<Vec<String>>>,
pub delegates: Option<Vec<String>>,
pub reasoning_effort: Option<Option<ReasoningEffort>>,
pub endpoint: Option<Option<RemoteEndpoint>>,
}Expand description
Patch for built-in agent customization.
Override support covers runtime-safe AgentSpec fields. Adding more fields later is purely additive because missing fields decode as “inherit”.
#[serde(deny_unknown_fields)] rejects payloads containing field names
that don’t exist on this struct, preventing silent drift when callers
misspell or target deprecated fields.
Fields§
§model_id: Option<String>§system_prompt: Option<String>§max_rounds: Option<usize>§max_continuation_retries: Option<usize>§context_policy: Option<Option<ContextWindowPolicy>>§plugin_ids: Option<Vec<String>>§active_hook_filter: Option<HashSet<String>>§sections: Option<HashMap<String, Value>>Per-key shallow merge: patch keys override base keys; un-patched
keys preserved from base. To delete a base key, set its value to
JSON null in this map (handled at merge time).
allowed_tools: Option<Option<Vec<String>>>Whitelist of tool IDs. Some([..]) overrides; None keeps base.
JSON null clears to “all tools”; missing inherits base.
excluded_tools: Option<Option<Vec<String>>>Blacklist of tool IDs. Same semantics as allowed_tools.
delegates: Option<Vec<String>>Sub-agent IDs this agent can delegate to. Some([..]) overrides.
reasoning_effort: Option<Option<ReasoningEffort>>Reasoning effort override. JSON null clears the base value.
endpoint: Option<Option<RemoteEndpoint>>Remote endpoint override. JSON null clears the base value.
Implementations§
Trait Implementations§
Source§impl Clone for AgentSpecPatch
impl Clone for AgentSpecPatch
Source§fn clone(&self) -> AgentSpecPatch
fn clone(&self) -> AgentSpecPatch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AgentSpecPatch
impl Debug for AgentSpecPatch
Source§impl Default for AgentSpecPatch
impl Default for AgentSpecPatch
Source§fn default() -> AgentSpecPatch
fn default() -> AgentSpecPatch
Source§impl<'de> Deserialize<'de> for AgentSpecPatchwhere
AgentSpecPatch: Default,
impl<'de> Deserialize<'de> for AgentSpecPatchwhere
AgentSpecPatch: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AgentSpecPatch, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AgentSpecPatch, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for AgentSpecPatch
impl JsonSchema for AgentSpecPatch
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 moreSource§impl PartialEq for AgentSpecPatch
impl PartialEq for AgentSpecPatch
Source§fn eq(&self, other: &AgentSpecPatch) -> bool
fn eq(&self, other: &AgentSpecPatch) -> bool
self and other values to be equal, and is used by ==.