use picocode::{create_agent, AgentConfig, NoOutput};
use std::sync::Arc;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let output = Arc::new(NoOutput);
let agent = create_agent(AgentConfig {
provider: "anthropic".into(),
model: "claude-3-5-sonnet-latest".into(),
output,
use_bash: false,
yolo: true, tool_call_limit: 5,
system_message_extension: None,
}).await?;
println!("Running agent in silent mode...");
let response = agent
.run_once("What is 2+2? Return only the number.".into())
.await?;
println!("Agent response: {}", response);
Ok(())
}