adk-cli 0.1.8

Command-line launcher for Rust Agent Development Kit (ADK-Rust) agents
Documentation

adk-cli

Command-line launcher for Rust Agent Development Kit (ADK-Rust) agents.

Crates.io Documentation License

Overview

adk-cli provides command-line tools for the Rust Agent Development Kit (ADK-Rust):

  • Launcher - Interactive REPL for agent conversations
  • Server Mode - HTTP server with web UI
  • Session Management - Automatic session handling
  • Telemetry - Integrated logging and tracing

Installation

[dependencies]
adk-cli = "0.1.8"

Or use the meta-crate:

[dependencies]
adk-rust = { version = "0.1.8", features = ["cli"] }

Quick Start

Interactive Mode

use adk_cli::Launcher;
use std::sync::Arc;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let agent = create_your_agent()?;

    // Start interactive REPL
    Launcher::new(Arc::new(agent))
        .run()
        .await?;

    Ok(())
}

Server Mode

Launcher::new(Arc::new(agent))
    .with_server_mode(8080)
    .run()
    .await?;

// Open http://localhost:8080 for web UI

Custom Configuration

Launcher::new(Arc::new(agent))
    .with_user_id("user_123")
    .with_session_id("session_456")
    .with_artifact_service(Arc::new(artifacts))
    .run()
    .await?;

CLI Commands

When running in interactive mode:

Command Description
Type message Send to agent
/quit or /exit Exit REPL
/clear Clear conversation
Ctrl+C Interrupt

Environment Variables

# Logging level
RUST_LOG=info

# API key (for Gemini)
GOOGLE_API_KEY=your-key

Features

  • Colored output with streaming
  • History support (arrow keys)
  • Graceful shutdown
  • Error recovery

Binary Installation

The adk binary is also available:

cargo install adk-cli

# Run your agent
adk --help

Related Crates

License

Apache-2.0

Part of ADK-Rust

This crate is part of the ADK-Rust framework for building AI agents in Rust.