use yoagent::provider::{MockProvider, ModelConfig};
use yoagent::*;
#[tokio::main]
async fn main() {
tracing_subscriber::fmt()
.with_span_events(tracing_subscriber::fmt::format::FmtSpan::CLOSE)
.with_target(false)
.init();
let mut agent = Agent::from_provider(
MockProvider::text("Here is the answer."),
ModelConfig::mock(),
);
let mut rx = agent.prompt("What is the answer?").await;
while rx.recv().await.is_some() {}
agent.finish().await;
println!("done — spans above show agent_loop / llm_stream timings");
}