#[non_exhaustive]pub struct UpdateAgentRequest {
pub version: u32,
pub name: Option<String>,
pub model: Option<AgentModel>,
pub description: Option<String>,
pub system: Option<String>,
pub mcp_servers: Option<Vec<AgentMcpServer>>,
pub skills: Option<Vec<Skill>>,
pub tools: Option<Vec<AgentTool>>,
pub metadata: Option<MetadataPatch>,
pub callable_agents: Option<Vec<CallableAgent>>,
}managed-agents-preview only.Expand description
Request body for POST /v1/agents/{id} (update).
Optimistic concurrency: pass the agent’s current version. The
request is rejected if the server’s stored version no longer
matches.
Field semantics:
Option::None→ omit the field → preserve the existing value.Option::Somewith empty string / empty array /null→ clear, except fornameandmodelwhich cannot be cleared.- For
metadata, seeMetadataPatchfor per-key delete semantics.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.version: u32Current version, used for optimistic concurrency. Required.
name: Option<String>New name (cannot be cleared).
model: Option<AgentModel>New model (cannot be cleared).
description: Option<String>New description. Some("") clears.
system: Option<String>New system prompt. Some("") clears.
mcp_servers: Option<Vec<AgentMcpServer>>Replacement MCP-servers list. Some(vec![]) clears.
skills: Option<Vec<Skill>>Replacement skills list. Some(vec![]) clears.
tools: Option<Vec<AgentTool>>Replacement tools list. Some(vec![]) clears.
metadata: Option<MetadataPatch>Per-key metadata patch. See MetadataPatch.
callable_agents: Option<Vec<CallableAgent>>Replacement callable-agents list. Some(vec![]) clears (turns
the agent back into a non-coordinator).
Implementations§
Source§impl UpdateAgentRequest
impl UpdateAgentRequest
Sourcepub fn at_version(version: u32) -> Self
pub fn at_version(version: u32) -> Self
Build a minimal update request (pass version, then chain
setters).
Sourcepub fn model(self, model: impl Into<AgentModel>) -> Self
pub fn model(self, model: impl Into<AgentModel>) -> Self
Set the model.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set or clear (Some("")) the description.
Sourcepub fn system(self, system: impl Into<String>) -> Self
pub fn system(self, system: impl Into<String>) -> Self
Set or clear (Some("")) the system prompt.
Sourcepub fn mcp_servers(self, servers: Vec<AgentMcpServer>) -> Self
pub fn mcp_servers(self, servers: Vec<AgentMcpServer>) -> Self
Replace the MCP servers list. Pass an empty Vec to clear.
Sourcepub fn skills(self, skills: Vec<Skill>) -> Self
pub fn skills(self, skills: Vec<Skill>) -> Self
Replace the skills list. Pass an empty Vec to clear.
Sourcepub fn tools(self, tools: Vec<AgentTool>) -> Self
pub fn tools(self, tools: Vec<AgentTool>) -> Self
Replace the tools list. Pass an empty Vec to clear.
Sourcepub fn metadata(self, patch: MetadataPatch) -> Self
pub fn metadata(self, patch: MetadataPatch) -> Self
Apply a metadata patch.
Sourcepub fn callable_agents(self, callable: Vec<CallableAgent>) -> Self
pub fn callable_agents(self, callable: Vec<CallableAgent>) -> Self
Replace the callable-agents list. Pass an empty Vec to clear.
Trait Implementations§
Source§impl Clone for UpdateAgentRequest
impl Clone for UpdateAgentRequest
Source§fn clone(&self) -> UpdateAgentRequest
fn clone(&self) -> UpdateAgentRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UpdateAgentRequest
impl Debug for UpdateAgentRequest
Source§impl Default for UpdateAgentRequest
impl Default for UpdateAgentRequest
Source§fn default() -> UpdateAgentRequest
fn default() -> UpdateAgentRequest
Auto Trait Implementations§
impl Freeze for UpdateAgentRequest
impl RefUnwindSafe for UpdateAgentRequest
impl Send for UpdateAgentRequest
impl Sync for UpdateAgentRequest
impl Unpin for UpdateAgentRequest
impl UnsafeUnpin for UpdateAgentRequest
impl UnwindSafe for UpdateAgentRequest
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> 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