1use helios_engine::{Agent, Config};
11use std::io::{self, Write};
12
13#[tokio::main]
14async fn main() -> helios_engine::Result<()> {
15 println!("š Helios Engine - Basic Chat Example");
16 println!("=====================================");
17 println!("š” Streaming is enabled by default - watch tokens appear in real-time!\n");
18
19 let config = Config::from_file("config.toml")?;
21
22 let mut agent = Agent::builder("BasicAgent")
24 .config(config)
25 .system_prompt("You are a helpful assistant.")
26 .build()
27 .await?;
28
29 println!("User: Hello! How are you?");
31 print!("Agent (streaming): ");
32 io::stdout().flush()?;
33
34 let _response = agent.chat("Hello! How are you?").await?;
35 println!();
36
37 println!("\nUser: What can you help me with?");
39 print!("Agent (streaming): ");
40 io::stdout().flush()?;
41
42 let _response = agent.chat("What can you help me with?").await?;
43 println!();
44
45 println!("\nā
Demo completed! Notice how responses streamed in real-time.");
46
47 Ok(())
48}