//! # Streaming Example
//!
//! This example streams a run with [`Agent::run_stream`](crate::Agent::run_stream) and prints
//! the answer as the model writes it. The stream also reports the tool calls the agent makes
//! and their results, and ends with [`AgentEvent::Finished`](crate::AgentEvent::Finished),
//! which holds the same [`AgentResult`](crate::AgentResult) as an awaited run. The new messages
//! are then added to the history.
//!
//! To run this example from the terminal, enter:
//! ```bash
//! cargo run --example streaming
//! ```
//!
//! ## Source Code
//!
//! ```rust
//! ```