#[non_exhaustive]pub struct CreateAgentRequest {
pub name: String,
pub model: AgentModel,
pub description: Option<String>,
pub system: Option<String>,
pub mcp_servers: Vec<AgentMcpServer>,
pub skills: Vec<Skill>,
pub tools: Vec<AgentTool>,
pub metadata: HashMap<String, String>,
pub callable_agents: Vec<CallableAgent>,
}Available on crate feature
managed-agents-preview only.Expand description
Request body for POST /v1/agents.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringAgent name. 1-256 chars.
model: AgentModelModel.
description: Option<String>Description. Up to 2048 chars.
system: Option<String>System prompt. Up to 100,000 chars.
mcp_servers: Vec<AgentMcpServer>MCP servers. Max 20.
skills: Vec<Skill>Skills. Max 20.
tools: Vec<AgentTool>Tools. Max 128 across all toolsets.
metadata: HashMap<String, String>Metadata. Max 16 pairs (64-char keys, 512-char values).
callable_agents: Vec<CallableAgent>Other agents this agent is permitted to call. Setting this
makes the agent a multi-agent coordinator: at runtime,
delegations spawn new
Threads. Only one
level of delegation is supported – callable agents cannot
themselves have callable agents.
Implementations§
Source§impl CreateAgentRequest
impl CreateAgentRequest
Sourcepub fn builder() -> CreateAgentRequestBuilder
pub fn builder() -> CreateAgentRequestBuilder
Begin configuring a request.
Trait Implementations§
Source§impl Clone for CreateAgentRequest
impl Clone for CreateAgentRequest
Source§fn clone(&self) -> CreateAgentRequest
fn clone(&self) -> CreateAgentRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateAgentRequest
impl Debug for CreateAgentRequest
Auto Trait Implementations§
impl Freeze for CreateAgentRequest
impl RefUnwindSafe for CreateAgentRequest
impl Send for CreateAgentRequest
impl Sync for CreateAgentRequest
impl Unpin for CreateAgentRequest
impl UnsafeUnpin for CreateAgentRequest
impl UnwindSafe for CreateAgentRequest
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.