ADK-Rust
Rust Agent Development Kit (ADK-Rust) - Build AI agents in Rust with modular components for models, tools, memory, RAG, security, realtime voice, and more.
A flexible framework for developing AI agents with simplicity and power. Model-agnostic, deployment-agnostic, optimized for frontier AI models. Includes support for realtime voice agents, RAG pipelines, graph workflows, declarative security, and 120+ working examples.
Supported Providers
| Provider | Feature Flag | Default Model |
|---|---|---|
| Gemini | gemini (default) |
gemini-2.5-flash |
| OpenAI | openai |
gpt-5-mini |
| Anthropic | anthropic |
claude-sonnet-4-6 |
| DeepSeek | deepseek |
deepseek-chat |
| Groq | groq |
llama-3.3-70b-versatile |
| Ollama | ollama |
llama3.2 |
| Fireworks AI | fireworks |
accounts/fireworks/models/llama-v3p1-8b-instruct |
| Together AI | together |
meta-llama/Llama-3.3-70B-Instruct-Turbo |
| Mistral AI | mistral |
mistral-small-latest |
| Perplexity | perplexity |
sonar |
| Cerebras | cerebras |
llama-3.3-70b |
| SambaNova | sambanova |
Meta-Llama-3.3-70B-Instruct |
| Amazon Bedrock | bedrock |
us.anthropic.claude-sonnet-4-6 |
| Azure AI Inference | azure-ai |
(endpoint-specific) |
Quick Start
1. Create a new project:
&&
2. Add dependencies:
[]
= "2.0.0"
= { = "1.40", = ["full"] }
= "0.15"
3. Set your API key:
4. Write src/main.rs:
use *;
use Launcher;
use Arc;
async
5. Run:
Even Faster — adk::run()
Auto-detect your provider and run an agent in one call:
use run;
async
provider_from_env() checks ANTHROPIC_API_KEY → OPENAI_API_KEY → GOOGLE_API_KEY in order.
Adding Tools
let agent = new
.instruction
.model
.tool
.build?;
Workflow Agents
// Sequential execution
let pipeline = new;
// Parallel execution
let parallel = new;
// Loop until condition (max 5 iterations)
let loop_agent = new
.with_max_iterations;
Multi-Agent Systems
let coordinator = new
.instruction
.model
.sub_agent
.sub_agent
.build?;
Realtime Voice Agents
Build voice-enabled AI assistants with bidirectional audio streaming:
use ;
let model: = new;
let agent = builder
.model
.instruction
.voice
.server_vad // Voice activity detection
.build?;
Features:
- OpenAI Realtime API & Gemini Live API
- Vertex AI Live with Application Default Credentials
- LiveKit WebRTC bridge for production audio routing
- Bidirectional audio (PCM16, G711, Opus)
- Server-side VAD
- Mid-session context mutation (swap instructions/tools without dropping the call)
- Real-time tool calling
- Multi-agent handoffs
Graph-Based Workflows
Build complex workflows using LangGraph-style graph agents:
use *;
let agent = builder
.node_fn
.node_fn
.edge
.edge
.edge
.checkpointer
.build?;
Features:
- Cyclic graphs for ReAct patterns
- Conditional routing, and
with_gotofor a node that picks its own successor - State management with reducers
- Checkpointing (memory, SQLite), delta checkpoints, and retention policies
- Human-in-the-loop interrupts, before or after a node
- Subgraphs — a compiled graph as a node, nested, with its own checkpoint thread
- Per-node retry with capped backoff, node timeouts, and a concurrency bound
- Time travel — step, fork, and state history
The SqliteCheckpointer above needs the graph-sqlite feature. adk-graph has no
default features, so each capability is forwarded from this crate:
| Feature | Enables | In full |
|---|---|---|
graph-functional |
#[entrypoint]/#[task] functional API |
yes |
graph-node-cache |
node result caching with content keys | yes |
graph-delta |
delta checkpoints | yes |
graph-time-travel |
step, fork, and state history | yes |
graph-sqlite |
the SQLite checkpointer | no — needs a database |
graph-redis-cache |
Redis-backed node cache | no — needs a server |
Browser Automation
Give agents web browsing capabilities with 46 tools:
use ;
use Arc;
let config = new.webdriver_url;
let session = new;
let toolset = new;
let tools = toolset.all_tools; // 46 browser tools
let mut builder = new
.model;
for tool in tools
let agent = builder.build?;
Tools include navigation, extraction, forms, screenshots, JavaScript execution, and more.
Agent Evaluation
Test and validate agent behavior:
use ;
let evaluator = new;
let report = evaluator.evaluate_file.await?;
assert!;
RAG Pipeline
Build retrieval-augmented generation pipelines with adk-rag:
use ;
let pipeline = new
.chunker
.vector_store
.embedding_provider
.build?;
// Ingest documents
pipeline.ingest.await?;
// Search
let results = pipeline.search.await?;
Features:
- 3 chunking strategies (fixed-size, recursive, markdown-aware)
- 6 vector store backends (in-memory, Qdrant, Milvus, Weaviate, Pinecone, SurrealDB)
- Pluggable embedding providers and rerankers
- Ready-made
RagToolfor agent integration
Declarative Security
Tools declare their required scopes — the framework enforces automatically:
use FunctionTool;
use ;
// Tool declares what scopes it needs
let transfer = new
.with_scopes;
// Framework enforces before execution — no imperative checks in handlers
let guard = new;
let protected = guard.protect;
Features:
- Declarative
required_scopes()on theTooltrait ScopeGuardwith pluggable resolvers (context, static, custom)- Role-based access control with allow/deny rules
- SSO/OAuth integration (Auth0, Okta, Azure AD, Google OIDC)
- Audit logging for all access decisions
Deployment
# Console mode (default)
# Server mode
Installation Options
# Minimal (default) — agents, Gemini, runner, sessions (fastest build)
= "2.0.0"
# Standard — minimal + tools, memory, OpenAI, Anthropic, server, auth,
# graph, eval, guardrails, skills, plugins, artifacts, telemetry
= { = "2.0.0", = ["standard"] }
# Enterprise — standard + realtime, browser, rag, payments, awp
= { = "2.0.0", = ["enterprise"] }
# Full — enterprise + experimental crates (audio, code, sandbox, code-tools)
= { = "2.0.0", = ["full"] }
# Gemini Enterprise Agent Platform — every Vertex/EAP integration except
# realtime transports; composable with any tier. The right default for
# ReasoningEngine BYOC deployments. Deploy-time tooling is host-side and
# not included.
= { = "2.0.0", = ["standard", "gemini-agent-platform"] }
# gemini-agent-platform + Vertex AI Live API (pulls in the realtime WebSocket/audio stack)
= { = "2.0.0", = ["standard", "gemini-agent-platform-full"] }
# Custom
= { = "2.0.0", = false, = ["agents", "gemini", "tools"] }
# With new providers (forwarded to adk-model)
= { = "2.0.0", = ["fireworks", "together", "mistral", "perplexity", "cerebras", "sambanova", "bedrock", "azure-ai"] }
Documentation
- API Reference
- Official Guides
- Examples — 75+ working examples in-repo, 120+ in the playground
- Wiki — Comprehensive guides and tutorials
License
Apache 2.0