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 new(id: String, name: String) -> AgentSkill
pub fn new(id: String, name: String) -> AgentSkill
Create a new skill with required fields
Sourcepub fn with_description(self, description: impl Into<String>) -> AgentSkill
pub fn with_description(self, description: impl Into<String>) -> AgentSkill
Set the skill description
Sourcepub fn add_tag(self, tag: impl Into<String>) -> AgentSkill
pub fn add_tag(self, tag: impl Into<String>) -> AgentSkill
Add a tag
Set tags (replaces existing)
Sourcepub fn add_example(self, example: impl Into<String>) -> AgentSkill
pub fn add_example(self, example: impl Into<String>) -> AgentSkill
Add an example
Sourcepub fn with_examples(self, examples: Vec<String>) -> AgentSkill
pub fn with_examples(self, examples: Vec<String>) -> AgentSkill
Set examples (replaces existing)
Sourcepub fn add_input_mode(self, mode: impl Into<String>) -> AgentSkill
pub fn add_input_mode(self, mode: impl Into<String>) -> AgentSkill
Add an input mode
Sourcepub fn with_input_modes(self, modes: Vec<String>) -> AgentSkill
pub fn with_input_modes(self, modes: Vec<String>) -> AgentSkill
Set input modes (replaces existing)
Sourcepub fn add_output_mode(self, mode: impl Into<String>) -> AgentSkill
pub fn add_output_mode(self, mode: impl Into<String>) -> AgentSkill
Add an output mode
Sourcepub fn with_output_modes(self, modes: Vec<String>) -> AgentSkill
pub fn with_output_modes(self, modes: Vec<String>) -> AgentSkill
Set output modes (replaces existing)
Sourcepub fn add_security(self, security: HashMap<String, Vec<String>>) -> AgentSkill
pub fn add_security(self, security: HashMap<String, Vec<String>>) -> AgentSkill
Add a security requirement
Trait Implementations§
Source§impl Clone for AgentSkill
impl Clone for AgentSkill
Source§fn clone(&self) -> AgentSkill
fn clone(&self) -> AgentSkill
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more