use funera_orchestrate::{Agent, AgentRuntime, DeepSeekProvider};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let runtime = AgentRuntime::<DeepSeekProvider>::builder()
.api_key(std::env::var("OPENAI_API_KEY")?)
.base_url(std::env::var("OPENAI_BASE_URL").ok())
.model(std::env::var("OPENAI_MODEL").unwrap_or_else(|_| "deepseek-v4-flash".into()))
.with_builtin_tools()
.build()?;
let agent = Agent::builder()
.system_prompt("You are a helpful assistant with file access.")
.on_tool_call(|name, args| eprintln!("[tool] {name} {args}"))
.build();
let resp = agent.fire("Read Cargo.toml and tell me the dependencies.", &runtime).await?;
println!("{}", resp.content);
Ok(())
}