Skip to content

vow-agent

vow-agent defines tool metadata with descriptor and the standard run(caps, input) -> Result contract. Install with vpm:

Terminal window
curl -fsSL https://install.vowlang.dev | sh
export PATH="$HOME/.local/bin:$PATH"
vpm add vow-agent
vpm install
fn run(caps: Caps, input: String) -> Result<String, int> {
if len(input) == 0 {
return Err(1);
}
return Ok("{\"echo\":" + input + "}");
}
fn main(caps: Caps) -> int {
return match run(caps, "{\"ok\":true}") {
Ok(s) => { print s; 0 },
Err(_e) => 0 - 1,
};
}

Host runner (Python 3):

Terminal window
python3 tools/runner.py examples/echo_tool.vow

Package tests:

Terminal window
cd vow-libs/vow-agent && vow test tests/agent.vow