pub struct AgentSkill {
pub id: String,
pub name: String,
pub description: String,
pub tags: Vec<String>,
pub examples: Vec<String>,
pub input_modes: Vec<String>,
pub output_modes: Vec<String>,
pub security: Vec<HashMap<String, Vec<String>>>,
}Expand description
Represents a distinct capability or function that an agent can perform.
Fields§
§id: StringA unique identifier for the agent’s skill.
name: StringA human-readable name for the skill.
description: StringA detailed description of the skill.
A set of keywords describing the skill’s capabilities.
examples: Vec<String>Example prompts or scenarios that this skill can handle.
input_modes: Vec<String>The set of supported input MIME types for this skill, overriding the agent’s defaults.
output_modes: Vec<String>The set of supported output MIME types for this skill, overriding the agent’s defaults.
security: Vec<HashMap<String, Vec<String>>>Security schemes necessary for the agent to leverage this skill.
Implementations§
Source§impl AgentSkill
impl AgentSkill
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set the skill description
Set tags (replaces existing)
Sourcepub fn add_example(self, example: impl Into<String>) -> Self
pub fn add_example(self, example: impl Into<String>) -> Self
Add an example
Sourcepub fn with_examples(self, examples: Vec<String>) -> Self
pub fn with_examples(self, examples: Vec<String>) -> Self
Set examples (replaces existing)
Sourcepub fn add_input_mode(self, mode: impl Into<String>) -> Self
pub fn add_input_mode(self, mode: impl Into<String>) -> Self
Add an input mode
Sourcepub fn with_input_modes(self, modes: Vec<String>) -> Self
pub fn with_input_modes(self, modes: Vec<String>) -> Self
Set input modes (replaces existing)
Sourcepub fn add_output_mode(self, mode: impl Into<String>) -> Self
pub fn add_output_mode(self, mode: impl Into<String>) -> Self
Add an output mode
Sourcepub fn with_output_modes(self, modes: Vec<String>) -> Self
pub fn with_output_modes(self, modes: Vec<String>) -> Self
Set output modes (replaces existing)
Trait Implementations§
Source§impl Clone for AgentSkill
impl Clone for AgentSkill
Source§fn clone(&self) -> AgentSkill
fn clone(&self) -> AgentSkill
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 AgentSkill
impl Debug for AgentSkill
Source§impl<'de> Deserialize<'de> for AgentSkill
impl<'de> Deserialize<'de> for AgentSkill
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
Source§impl PartialEq for AgentSkill
impl PartialEq for AgentSkill
Source§impl Serialize for AgentSkill
impl Serialize for AgentSkill
impl Eq for AgentSkill
impl StructuralPartialEq for AgentSkill
Auto Trait Implementations§
impl Freeze for AgentSkill
impl RefUnwindSafe for AgentSkill
impl Send for AgentSkill
impl Sync for AgentSkill
impl Unpin for AgentSkill
impl UnwindSafe for AgentSkill
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