Quickstart
Install
Section titled “Install”Add the application-facing crate:
cargo add everrunsThe default features include typed tool macros and the offline simulator. They do not select a network provider.
Run one turn
Section titled “Run one turn”use everruns::{Agent, Model};
#[tokio::main]async fn main() -> Result<(), Box<dyn std::error::Error>> { let agent = Agent::builder() .instructions("You are a concise assistant.") .model(Model::simulated("Everruns is ready.")) .build()?;
let session = agent.session(); let turn = session.send_and_wait("Are you ready?").await?; println!("{}", turn.response); Ok(())}Model::simulated follows the same model/provider path as a live provider, but
returns the configured response deterministically. This makes the smallest
Framework program useful in tests, examples, and disconnected development.
send_and_wait is the request/response convenience; use send when the
application needs to stream output or add steering input while a turn runs.
Use OpenAI
Section titled “Use OpenAI”Enable the provider feature and set the credential in the host environment:
cargo add everruns --features openaiexport OPENAI_API_KEY=sk-...Replace the simulated model:
use everruns::{Agent, OpenAI};
let agent = Agent::builder() .instructions("You are a concise assistant.") .provider(OpenAI::from_env()?) .model("gpt-5.6-terra") .build()?;# Ok::<(), Box<dyn std::error::Error>>(())The model id stays credential-free. OpenAI::from_env configures the separate
provider at the application boundary and redacts the key from debug output.
Continue with Agents, Tools and macros, and Sessions.