use troupekit::agent::Limits;
use troupekit::prelude::*;
/// Explain to a programmer who has never used one what an LLM agent is,
/// in three short sentences, with one everyday example.
#[agent(
model = "anthropic/claude-haiku-5-5",
max_turns = 2,
limits = Limits { run: Some(20_000), ..Limits::default() },
)]
fn explainer() {}
/// Asks the agent one question and prints its answer.
/// Input: ANTHROPIC_API_KEY in the environment. Output: the answer on stdout.
#[tokio::main]
async fn main() -> Result<(), KitError> {
let answer = explainer()
.run("What is an agent, and when would I want one?")
.await?;
println!("{answer}");
Ok(())
}