Glossary
Core vocabulary across the three layers. Types link to where they live; see the API reference for full signatures.
Layers
- L0 —
gemini-genai-rs— the wire protocol: WebSocket transport, the session handle,SessionEvent/SessionCommand, auth, and the raw message types (Content,Part,Role,FunctionCall,FunctionResponse). - L1 —
gemini-adk-rs— the agent runtime: the three-lane Live processor,State, tools and dispatch, phases, extraction, watchers, governed flow, and the text-agent runtime. - L2 —
gemini-adk-fluent-rs— the fluent DX: copy-on-write builders, theLivesession builder, theS·C·T·P·M·A·E·Goperator algebra, and the composition combinators. Itspreludeis the kernel (see migration guide for the kernel/submodule map).
Sessions & the processor
- Live session — a full-duplex streaming connection to the Gemini Multimodal
Live API. Built with
Live::builder()(L2) orLiveSessionBuilder(L1). LiveHandle— the runtime handle returned byconnect_*:send_audio,send_text,state(),telemetry(),extracted(),disconnect().- Three-lane processor — the runtime splits incoming events into a fast lane (sync, <1 ms callbacks), a control lane (async, may block), and a telemetry lane (metrics, off the hot path).
- Fast lane / control lane — see Live Callbacks. Fast-lane callbacks must not allocate, lock, or await; control-lane callbacks may.
SessionPlan/build_runtime/spawn_lanes— the staged, internal startup pipeline behindconnect(): derive the resolved plan (pure), wire the runtime, then spawn the lanes.- Delivery policy — per-event-class backpressure for the fast lane
(
Losslessby default; lossy variants drop frames instead of stalling the router under a slow consumer).
State
State— concurrent, typed key-value store with automatic serde (de)serialization shared across the session.- Prefix scopes —
app:,user:,session:,turn:(cleared each turn),bg:,temp:, and the read-onlyderived:scope.state.get("k")falls back toderived:k. StateKey<T>— a compile-time typed key constant that prevents typos.- Delta tracking — transactional
with_delta_tracking()→commit()/rollback().
Tools
SimpleTool— a tool defined from a name, description, JSON Schema, and an async closure overserde_json::Value.TypedTool— a tool whose schema is auto-derived from aschemars::JsonSchemastruct (prevents schema drift).#[tool]— attribute macro that turns anasync fninto a registrable tool.ToolDispatcher— routes incomingFunctionCalls to registered tools.Toolset— a dynamic collection of tools (e.g. MCP, OpenAPI); resolved at connect time.- Background tool / scheduling —
ToolExecutionMode::BackgroundsetsNonBlockingon the wire and delivers results with aFunctionResponseSchedulingmode (Interrupt/WhenIdle/Silent). Google AI only.
Composition
- Operator algebra (
S·C·T·P·M·A·E·G) — composition namespaces for state transforms, context, tools, prompts, middleware, artifacts, evaluation, and guards. See the algebra chapter. - Combinators —
>>sequential,|parallel/fan-out,*loop,/fallback, plusuntil(pred). The underlying node type isComposable. - Patterns — pre-built shapes:
review_loop,fan_out_merge,supervised. - Contract validation —
check_contracts/ContractViolationcatch reads/writes wiring bugs at build time.
Conversation control
- Phase /
PhaseMachine— declarative conversation states with instructions, transitions, guards, and on-enter actions. - Steering mode — how phase instructions reach the model:
InstructionUpdate,ContextInjection, orHybrid. - Context delivery — when model-role context turns hit the wire:
ImmediateorDeferred. - Watcher / temporal pattern — react to state changes (
.watch(...)) or sustained/recurring conditions (when_sustained,when_turns). - Conversation repair — nudge/escalate when required information isn't
gathered (
RepairConfig,NeedsFulfillment). - Governed flow — a declarative conversation/tool DAG (
Flow) enforced live viaLive::govern(flow): gates tools, projects postures, drives repair.
Extraction & telemetry
TurnExtractor/LlmExtractor— out-of-band extraction of structured state from the conversation; triggered byExtractionTrigger.- Generation-complete vs turn-complete — generation-complete fires before interruption truncation (captures full intent); turn-complete fires at the turn boundary after truncation.
SessionTelemetry/SessionSignals— auto-collected metrics and derived timing signals.
Persistence
SessionPersistence/SessionSnapshot— snapshot and resume a session across process restarts. Built-in backends:FsPersistence,MemoryPersistence.