#[non_exhaustive]pub struct Agent {Show 15 fields
pub id: String,
pub ty: Option<String>,
pub name: String,
pub description: Option<String>,
pub model: AgentModel,
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>,
pub version: u32,
pub created_at: String,
pub updated_at: String,
pub archived_at: Option<String>,
}Available on crate feature
managed-agents-preview only.Expand description
An agent definition.
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.id: StringStable identifier (agent_...).
ty: Option<String>Wire type tag ("agent").
name: StringAgent name.
description: Option<String>Description. May be null on the wire when no description was
provided at create time.
model: AgentModelModel identifier and configuration.
system: Option<String>System prompt. May be null on the wire when no system prompt
was provided at create time.
mcp_servers: Vec<AgentMcpServer>Configured MCP servers.
skills: Vec<Skill>Configured skills.
tools: Vec<AgentTool>Configured tools.
metadata: HashMap<String, String>Free-form metadata.
callable_agents: Vec<CallableAgent>Other agents this agent is permitted to call (multi-agent coordinators only). Empty for non-coordinator agents.
version: u32Current version. Starts at 1, increments on every update.
created_at: StringCreation timestamp (RFC3339).
updated_at: StringLast-modified timestamp (RFC3339).
archived_at: Option<String>Set when archived (RFC3339), None for live agents.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Agent
impl<'de> Deserialize<'de> for Agent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Agent
impl RefUnwindSafe for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnsafeUnpin for Agent
impl UnwindSafe for Agent
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.