百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

adk-rust

> AI 编程
开源

Rust 代理开发套件 (ADK-Rust): 使用模块化组件在 Rust 中构建 AI 代理,这些组件包括模型、工具、内存、实时语音等。ADK-Rust 具有高度灵活性,可

574 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Rust 代理开发套件 (ADK-Rust): 使用模块化组件在 Rust 中构建 AI 代理,这些组件包括模型、工具、内存、实时语音等。ADK-Rust 具有高度灵活性,可

ADK-Rust

A production-ready Rust framework for building AI agents. Model-agnostic, type-safe and async, across 43 publishable crates for agent orchestration.

v2.2.0 Released! This API-compatible minor release completes the Gemini Enterprise Agent Platform consumption path: the Gen AI Evaluation Service bridge, Vertex AI RAG Engine retrieval and grounding, an Agent Retrieval vector store, Agent Registry discovery and registration, Skill Registry consumption with remote skill loading, and remote ReasoningEngine agents you can call as sub-agents — every one opt-in and composable with any preset, and all appended to gemini-agent-platform. Graph workflows gain native tool confirmation pauses. Tracing is fixed so one invocation exports as one trace rather than several disconnected ones. All 43 crates are available on crates.io.

Milestone: ADK-Rust has crossed 500K total crates.io downloads across the workspace crates.

Coming from 1.x: six APIs changed shape and the fan-in default changed behaviour without an API change. See the migration guide and the CHANGELOG.

Rust & Beyond Podcast — Episode 3: Agents That Act

ADK-Rust v2.0.0 — Agents That Act. Eight chapters on agents that run on their own and finish what they start: a workflow that resumes exactly where it stopped, a graph that changes course when the problem does, and approvals you can trust down to the digest. 42 crates, 4,300+ tests, sub-millisecond loop overhead.

▶️ Watch on YouTube — 40 min 50 sec · Hosts: James (Fenrir) & Ada (Kore) · Video with slides

"Show me." — Ada, thirty seconds in, declining to be told about the visual builder

Episode highlights

  • The Numbers — 42 crates, 4,300+ tests, 104 runnable examples, 568 μs agent-loop overhead against LangGraph's 1,228 ms
  • Agents That Survive — SQLite checkpointers, delta checkpoints, and a pause that resumes in a fresh process that shares only the database file
  • Subgraphs — a graph as a node, nested three deep, with channel mismatches caught when the parent compiles rather than as an absent value at run time
  • Deciding At Run Time — run_node_with for work whose size comes from state, and with_goto for a node that picks its own successor with no edge declared
  • Built To Run Unattended — retries with capped backoff, concurrency bounds, node timeouts, and checkpoint retention that keeps a week-long thread steady
  • Governed Computer Use — approval interrupts bound to a digest, so what you approved is what runs
  • What It Costs — no automatic crash recovery, an unbounded child ledger, and why we kept two orchestration APIs when the other ADKs deprecated one

Previous episodes

Episode 2: v1.0.0 — The Stable Foundation

A deep-dive into what shipped, who built it, and where it was going. 39 crates. 130K downloads. Semver stable.

▶️ Watch on YouTube — 10 min 12 sec · Hosts: James (Fenrir) & Ada (Kore)

"We believe the next generation of software will be built by composing autonomous agents, not by writing every line of logic by hand. And we believe Rust is the right language for the runtime those agents live in." — James

Episode 1: What is ADK-Rust?

2 min 21 sec · Generated entirely by ADK-Rust using Gemini 3.1 Flash TTS

How are these made?

Episodes are generated using ADK-Rust's own audio capabilities — Chirp3-HD multi-speaker TTS synthesis via adk-audio. The script, slide deck (Marp), and synthesized audio segments are concatenated with ffmpeg into a video presentation. Zero manual voice recording.

bash
# Episode 3 assets
docs/podcast/episode-3-script.md      # Full script, eight chapters
docs/podcast/episode-3-slides.md      # Marp slide deck
docs/podcast/adk-rust-episode-3.mp4   # Final video
docs/podcast/episode-3-narration.mp3  # Audio-only

The episode 3 video and slides are not in the repository: the video alone is about 900 MB, over GitHub's 100 MB per-file limit. The script and the deck source are.


Build and test an agent in five minutes

Scaffold an OpenAI agent with the HTTP runtime and embedded UI:

bash
cargo install cargo-adk
cargo adk new quickstart_agent --template api --provider openai
cd quickstart_agent
cp .env.example .env
# Open .env and replace the OPENAI_API_KEY placeholder, then:
cargo run

Open http://127.0.0.1:8080/ui/, enter a prompt, and press Enter. The UI creates the session, streams the run, renders Markdown and tool results, animates the active agent or workflow edge, and keeps the event timeline, state, artifacts, and telemetry beside the conversation.

The animation uses the richer team showcase so the topology is visible; the single-agent project you just generated uses the same UI with a one-node graph. Confirm the server independently with:

bash
curl -fsS http://127.0.0.1:8080/api/health

The five-minute quickstart explains the generated files and the console-only alternative. The runnable runtime_ui_showcase reproduces the UI above with tool, graph, and team agents.

Add ADK-Rust to an existing project

toml
[dependencies]
adk-rust = "2.2.0"                                        # Gemini, agents, runner, sessions
# adk-rust = { version = "2.2.0", features = ["standard"] }  # + server, auth, graph, eval
Tier Includes Use case
minimal (default) Gemini provider, agents, runner, sessions Fast starter agents
standard minimal + OpenAI, Anthropic, tools, memory, telemetry, server, auth, graph, eval, guardrail, plugins, artifacts, skills Serving an agent over HTTP
enterprise standard + realtime, browser, RAG, payments, AWP Voice, retrieval and payments
full enterprise + audio, code execution, sandbox Everything

A tier is a starting point, not a ceiling. Add any single capability on top of one without moving to the next tier, so features = ["minimal", "audio"] gives you the minimal build plus audio. AGENTS.md lists every feature you can add this way.

One agent, end to end

rust
use adk_rust::prelude::*;
use adk_rust::Launcher;

#[tokio::main]
async fn main() -> AnyhowResult {
    dotenvy::dotenv().ok();
    let model = GeminiModel::new(&std::env::var("GOOGLE_API_KEY")?, "gemini-3.7-flash")?;

    let agent = LlmAgentBuilder::new("assistant")
        .instruction("You are a helpful assistant. Be concise and accurate.")
        .model(Arc::new(model))
        .build()?;

    Launcher::new(Arc::new(agent)).run().await?;
    Ok(())
}

Swap the provider by swapping the client. The agent, runner and tools are unchanged:

Provider Client Feature Key
Gemini GeminiModel::new(key, model) default GOOGLE_API_KEY
OpenAI OpenAIClient::new(OpenAIConfig::new(key, model)) openai OPENAI_API_KEY
OpenAI Responses OpenAIResponsesClient::new(OpenAIResponsesConfig::new(key, model)) openai OPENAI_API_KEY
Anthropic AnthropicClient::new(AnthropicConfig::new(key, model)) anthropic ANTHROPIC_API_KEY
DeepSeek DeepSeekClient::chat(key) deepseek DEEPSEEK_API_KEY
Groq GroqClient::new(GroqConfig::gpt_oss_120b(key)) groq GROQ_API_KEY
Ollama OllamaModel::new(OllamaConfig::new(model)) ollama none
Bedrock BedrockClient::new(BedrockConfig::new(region, model_id)).await? bedrock AWS credential chain
mistral.rs MistralRsModel::new(config) adk-mistralrs none, local

Or let it choose: adk_rust::run(instructions, input) picks a provider from the environment, among those you compiled in.

Models

Provider Model Examples Feature Flag
Gemini gemini-3.7-flash (default), gemini-3.6-flash, gemini-3.5-flash-lite, gemini-3.1-pro-preview (default)
OpenAI gpt-5.6-terra (default), gpt-5.6-sol, gpt-5.6-luna openai
OpenAI Responses API gpt-5.6-terra, gpt-5.6-sol, gpt-5.6-luna openai
Anthropic claude-sonnet-5 (default), claude-opus-5, claude-fable-5 anthropic
DeepSeek deepseek-v4-flash, deepseek-v4-pro deepseek
Groq openai/gpt-oss-120b, openai/gpt-oss-20b groq
Ollama qwen3.6:35b-a3b, qwen3.5, llama3.2:3b ollama
Fireworks AI accounts/fireworks/models/kimi-k2p6 openai (preset)
Together AI MiniMaxAI/MiniMax-M2.7 openai (preset)
Mistral AI mistral-medium-latest openai (preset)
Perplexity sonar-pro openai (preset)
Cerebras gpt-oss-120b openai (preset)
SambaNova gpt-oss-120b openai (preset)
xAI (Grok) grok-4.6 openai (preset)
Amazon Bedrock anthropic.claude-sonnet-4-20250514-v1:0 bedrock
Azure AI Inference (endpoint-specific) azure-ai
mistral.rs Gemma 4, Phi-3, Llama, Qwen 3.5, Voxtral, FLUX adk-mistralrs

Defaults are curated in adk_model::catalog and were checked on 23 August 2026. Deployment-scoped providers such as Bedrock and Azure AI still require the model or deployment identifier available in your own account and region.

Use adk_model::catalog::recommended_model(provider) for ADK's portable default, MODEL_CATALOG for user-facing pickers, and validate_model_selection when accepting configuration. Unknown IDs remain valid for private deployments and new releases; known retired IDs include an actionable replacement.

What you can build

Each row links to its guide and a runnable example.

Capability Guide Example
Embedded runtime UI — conversations, Markdown, tools, workflow/team topology, realtime playback, protocols, state and telemetry deployment examples/advanced_agents
Tools — #[tool] derives the JSON schema from your argument type tools examples/coding_agent
MCP clients and servers on rmcp 3.1 — tools, resources, prompts, elicitation, tasks mcp examples/mcp_protocol_revisions
Workflow agents — sequential, parallel, loop agents examples/multi_perspective_analysis
Portable teams — validated handoff, delegation, policies, receipts and shared state multi-agent examples/team_architectures
Graph workflows — checkpoints, durable resume, human-in-the-loop, subgraphs graph-agents examples/graph_subgraph_claims
Coding agents — read, edit and run code in a confined workspace coding-agent examples/coding_goal
Realtime voice and video — OpenAI Realtime, Gemini Live, Vertex, LiveKit, WebRTC realtime examples/realtime_voice
Governed computer use — approval interrupts bound to a digest computer-use —
RAG — chunking, embeddings, vector search, 6 backends rag —
Memory — semantic search, project isolation, a bi-temporal knowledge graph memory [`examples

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustadkadk-agentadk-artifactadk-cli

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类AI 编程
定价开源

> 相关工具

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.