use praisonai::Agent;
let agent = Agent::new()
.name("Assistant")
.build()?;
// Implement manual retry at application level
for attempt in 1..=3 {
match agent.chat("Complete task").await {
Ok(response) => break,
Err(e) if attempt < 3 => {
tokio::time::sleep(Duration::from_secs(attempt as u64)).await;
}
Err(e) => return Err(e),
}
}