use recursive::llm::{Completion, MockProvider};
use recursive::runtime::AgentRuntime;
use std::sync::Arc;
#[tokio::main]
async fn main() {
let provider = Arc::new(MockProvider::new(vec![Completion {
content: "Hello from the agent!".into(),
tool_calls: vec![],
finish_reason: Some("stop".into()),
usage: None,
reasoning_content: None,
}]));
let mut runtime = AgentRuntime::builder()
.llm(provider)
.system_prompt("You are a helpful assistant.")
.max_steps(5)
.build()
.expect("failed to build runtime");
let outcome = runtime.run("Say hello").await.expect("agent run failed");
println!("Final message: {:?}", outcome.final_text);
println!("Steps taken: {}", outcome.steps);
println!("Finish reason: {:?}", outcome.finish_reason);
println!("Transcript messages: {}", runtime.transcript().len());
}