OpenAI Agents SDK for Rust
A lightweight yet powerful framework for building multi-agent workflows.
Quick Start
use ;
async
OpenAI Agents SDK for Rust
A lightweight yet powerful framework for building multi-agent workflows.
use openai_agents::{Agent, Runner};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let agent = Agent::builder("Assistant")
.instructions("You are a helpful assistant.")
.build();
let result = Runner::run(&agent, "Hello!").await?;
println!("{}", result.final_output());
Ok(())
}