reagent-rs 0.2.9

A Rust library for building AI agents with MCP, custom tools and skills
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::collections::HashMap;

use crate::{Template, SKILL_DISCOVERY_TEMPLATE};

use super::Skill;

impl Skill {
    pub async fn discovery_description(&self) -> String {
        let template = Template::simple(SKILL_DISCOVERY_TEMPLATE);

        let hm = HashMap::from([
            ("skill_name", &self.name),
            ("skill_description", &self.description),
        ]);

        template.compile(&hm).await
    }
}