pub struct AgentDefinition {
pub name: String,
pub description: String,
pub instructions: Instructions,
pub model: String,
pub tools: ToolPolicy,
pub output_schema: Option<Value>,
pub completion: Option<CompletionRequirement>,
pub max_steps: usize,
pub enabled: bool,
pub capability: Option<CapabilityMode>,
pub source: Option<AgentSource>,
}Expand description
Versionable agent definition (data only).
Fields§
§name: StringUnique name (slug).
description: StringHuman description.
instructions: InstructionsInstructions / system prompt body.
model: StringDefault model id.
tools: ToolPolicyTool policy (resolved at build time — definition-level allowed_tools).
output_schema: Option<Value>Optional structured output schema (JSON Schema object).
completion: Option<CompletionRequirement>Optional completion gate.
max_steps: usizeDefault max steps for turns using this agent.
enabled: boolWhen false, definition is invisible and not callable.
capability: Option<CapabilityMode>Preferred capability mode (intersected with spawn request).
source: Option<AgentSource>Discovery source (not required in markdown; set by resolver).
Implementations§
Trait Implementations§
Source§impl Clone for AgentDefinition
impl Clone for AgentDefinition
Source§fn clone(&self) -> AgentDefinition
fn clone(&self) -> AgentDefinition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AgentDefinition
impl Debug for AgentDefinition
Source§impl<'de> Deserialize<'de> for AgentDefinition
impl<'de> Deserialize<'de> for AgentDefinition
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 AgentDefinition
impl RefUnwindSafe for AgentDefinition
impl Send for AgentDefinition
impl Sync for AgentDefinition
impl Unpin for AgentDefinition
impl UnsafeUnpin for AgentDefinition
impl UnwindSafe for AgentDefinition
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