Expand description
Hanzo Agent SDK - Core agent functionality
This crate provides the core agent framework for building AI agents with tools, handoffs, and structured output support.
§Example
use hanzo_agent::{Agent, RunConfig};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let agent = Agent::builder("assistant")
.instructions("You are a helpful assistant.")
.model("gpt-4")
.build();
let result = agent.run("Hello!", &RunConfig::default()).await?;
println!("Response: {}", result.final_output);
Ok(())
}Re-exports§
pub use agent::Agent;pub use agent::AgentBuilder;pub use context::RunContext;pub use errors::AgentError;pub use result::RunResult;pub use result::RunResultStreaming;pub use runner::RunConfig;pub use runner::Runner;pub use tool::FunctionTool;pub use tool::Tool;pub use types::InputItem;pub use types::ModelResponse;pub use types::RunItem;