Getting started
Setup, authentication, the three-layer architecture and its contract, migrating from raw WebSockets.
v2.0 · Rust SDK
A live voice model will happily book the table before checking availability — not because the prompt was wrong, but because a prompt is advice, and advice is not enforcement. gemini-rs treats the conversation as a contract: you declare the flow — steps, completion guards, tool gates, ordering constraints — and the runtime enforces it while the model speaks. A tool the flow has not admitted does not execute, whatever the model intends.
The same contract is a JSON document that validates, simulates, tests, and
code-generates offline, and a canvas you can edit by hand. Drop to
gemini-genai-rs for byte-level control of the Multimodal Live protocol, or
reach for gemini-adk-fluent-rs and have a governed voice agent talking in five
lines — the same State spine underpins every layer, so you never hit a ceiling.
| Crate | Layer | Use it when… |
|---|---|---|
gemini-adk-fluent-rs | L2 — Fluent DX | You’re building an application: Live::builder(), AgentBuilder, the S·C·T·P·M·A algebra, SessionSpec, voice I/O, telephony. Start here. |
gemini-adk-rs | L1 — Agent runtime | You need the runtime directly: State, phases, tool dispatch, Flow, extraction, watchers, combinators, telemetry. |
gemini-genai-rs | L0 — Wire protocol | You need raw WebSocket access, custom transports, or the feature-gated REST APIs. |
Plus gemini-memory-rs, a contextual memory engine
for Live sessions, independent of the stack.
use gemini_adk_fluent_rs::prelude::*;
Live::builder() .instruction("You are a helpful concierge.") .greeting("Greet the caller.") .connect_from_env().await? // Google AI or Vertex — resolved from env .talk().await?; // microphone in, speakers out, barge-in handledOr with explicit callbacks:
use gemini_adk_fluent_rs::prelude::*;
let handle = Live::builder() .voice(Voice::Kore) .instruction("You are a helpful voice assistant.") .on_audio(|pcm| { /* play audio */ }) .on_text(|text| print!("{text}")) .connect_from_env() .await?;
handle.send_text("What's the weather like?").await?;handle.disconnect().await?;New here? Start with Setup and Running and Authentication & Connecting, then browse the cookbook (Crawl → Walk → Run → Governed).
A whole governed session — flow DAG, tools, extraction, phases, watchers,
computed state, memory, runtime tuning, and an embedded test suite — can be one
JSON document (SessionSpec). It validates, simulates, and code-generates
offline, and the Flow Studio is a
drag-and-drop editor over exactly that document:

See Flows as JSON for the format and the Studio tour for the editor.
Getting started
Setup, authentication, the three-layer architecture and its contract, migrating from raw WebSockets.
Voice & Live sessions
Live sessions and callbacks, voice I/O, telephony, phases, state, persistence.
Tools & extraction
The tool system, per-tool policies, MCP interop, and the extraction pipeline.
Composition & patterns
Memory
The durable memory engine — async-prepare, sync-consume — and its declarative binding into governed state.
Reference
The API reference (every feature, every crate), the glossary, and troubleshooting.