cargo add adk-rs

Build serious agents
in Rust.

adk-rs is a code-first Agent Development Kit for Rust: model-agnostic, deployment-agnostic agent construction with the low overhead, predictable latency and safety guarantees of the Rust toolchain.

0 unsafe blocks20 cargo features1.85+ MSRVApache-2.0 licensed
src/main.rsrust
use adk_rs::{agents::LlmAgent, providers::gemini::Gemini, runner::Runner};
use adk_rs::services::mem::InMemorySessionService;
use futures::StreamExt;
use std::sync::Arc;

#[tokio::main]
async fn main() -> adk_rs::Result<()> {
    let agent = LlmAgent::builder("greeter")
        .model(Arc::new(Gemini::from_env("gemini-2.5-flash")?))
        .instruction("You greet the user warmly.")
        .build()?;
    let runner = Runner::builder()
        .app_name("hello")
        .agent(Arc::new(agent))
        .session_service(Arc::new(InMemorySessionService::new()))
        .build()?;

    let mut events = runner.run("user", None, "Hello!").await?;
    while let Some(event) = events.next().await {
        if let Some(content) = event?.response.content {
            println!("{}", content.text_concat());
        }
    }
    Ok(())
}
Capabilities

Everything an agent runtime needs, behind cargo features.

Examples

Runnable demos, straight from the repo.