Skip to main content

Skill

Trait Skill 

Source
pub trait Skill: Send + Sync {
    // Required methods
    fn manifest(&self) -> &SkillManifest;
    fn tools(&self) -> Vec<Arc<dyn Tool>>;

    // Provided methods
    fn system_prompt_fragment(&self) -> Option<String> { ... }
    fn init<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), SynapticError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

A skill bundles a set of tools with metadata.

Required Methods§

Source

fn manifest(&self) -> &SkillManifest

Return the skill manifest.

Source

fn tools(&self) -> Vec<Arc<dyn Tool>>

Return the tools provided by this skill.

Provided Methods§

Source

fn system_prompt_fragment(&self) -> Option<String>

Optional system prompt fragment to inject when this skill is active.

Source

fn init<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), SynapticError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Initialize the skill (called once when loaded).

Implementors§