agent-tools 0.1.1

Lightweight command and Codex-powered tool helpers for Rust agents
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use agent_tools::web_search;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    println!("{}", web_search(build_query())?);
    Ok(())
}

fn build_query() -> String {
    let query = std::env::args().skip(1).collect::<Vec<_>>().join(" ");

    if query.trim().is_empty() {
        return "What is the latest stable Rust version today?".to_string();
    }

    query
}