use agentai::tool::buildin::CurrentDateAndTimeToolBox;
use agentai::{Agent, AgentResult};
use anyhow::Result;
use log::{LevelFilter, info};
use simplelog::{ColorChoice, Config, TermLogger, TerminalMode};
const SYSTEM: &str = "You are helpful assistant. Use tools when you need the current date or time.";
#[tokio::main]
async fn main() -> Result<()> {
TermLogger::init(
LevelFilter::Info,
Config::default(),
TerminalMode::Mixed,
ColorChoice::Auto,
)?;
info!("Starting AgentAI");
let question = "What day of the week is it today?";
info!("Question: {}", question);
let agent = Agent::new("open_router::nvidia/nemotron-3.5-super-vl:free", SYSTEM)?
.with_toolbox(CurrentDateAndTimeToolBox {});
let result: AgentResult<String> = agent.run(question).await?;
info!("Answer: {}", result.answer);
Ok(())
}