13 releases
Uses new Rust 2024
| new 0.3.0 | Feb 8, 2026 |
|---|---|
| 0.2.1 | Jan 22, 2026 |
| 0.1.9 | Jan 3, 2026 |
| 0.1.8 | Dec 28, 2025 |
| 0.1.1 | Nov 30, 2025 |
#2916 in Command line utilities
39 downloads per month
Used in adk-rust
4.5MB
15K
SLoC
adk-cli
Command-line launcher for Rust Agent Development Kit (ADK-Rust) agents.
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.3.0"
Or use the meta-crate:
[dependencies]
adk-rust = { version = "0.3.0", 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
# Run with serve subcommand
cargo run -- serve --port 8080
# Open http://localhost:8080 for web UI
Custom Configuration
use adk_cli::Launcher;
use adk_artifact::InMemoryArtifactService;
use adk_core::StreamingMode;
use std::sync::Arc;
Launcher::new(Arc::new(agent))
.app_name("my_app")
.with_artifact_service(Arc::new(InMemoryArtifactService::new()))
.with_streaming_mode(StreamingMode::SSE)
.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
- adk-rust - Meta-crate with all components
- adk-server - HTTP server
- adk-runner - Execution runtime
License
Apache-2.0
Part of ADK-Rust
This crate is part of the ADK-Rust framework for building AI agents in Rust.
Dependencies
~35–55MB
~765K SLoC