docs(live): decompose the dev guide and fix staleness vs adk-python main - #2086
Draft
kazunori279 wants to merge 9 commits into
Draft
docs(live): decompose the dev guide and fix staleness vs adk-python main#2086kazunori279 wants to merge 9 commits into
kazunori279 wants to merge 9 commits into
Conversation
Split dev-guide/part1-5 into Sessions, Events, Tools, Workflows, Audio and video, Configuration, Voice, Supported models, and Build a custom server. Rewrite index.md as the section Overview with a streaming-type decision table. Implements Phase 2 of the Live Interactions<>ADK documentation revamp.
Half-cascade models are no longer supported for live agents. Remove the Native Audio vs Half-Cascade architecture framing from Supported models and the half-cascade caveats from Voice configuration. The eight prebuilt Live API voices are kept, relabeled as native-audio voices alongside the extended Text-to-Speech list.
Delete live/dev-guide/ and live/streaming-tools.md now that their content lives in the capability pages. Regroup the Live nav into Get started / Build / Ship / Reference, repoint every partN.md cross-link at its new page and anchor, and add direct redirects for the removed paths (mkdocs-redirects does not chain, so streaming/* keys point at final destinations).
Swap the RunConfig, Event, SequentialAgent, LiveRequestQueue and Runner.run_live source-reference notes for Python API reference links. Implementation pointers with line ranges are left as source links, since they document internals with no public reference equivalent.
✅ Deploy Preview for adk-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…inks
The bidi-demo sample was removed from adk-samples, so all the source links in
docs/live/ were dead. The sample is not shipped here either, so remove every
reference to it instead of repointing the links.
The code snippets themselves are unchanged. What goes away is only the
scaffolding that pointed at the sample:
- 32 code fences lose their linked 'Demo implementation: file.py:NN-MM' title
and become plain language-tagged fences.
- The 'Complete Demo Implementation' note in custom-server.md and the 'Demo
Implementation' note in events.md are dropped; both existed only to link out.
- The 'Learn More' note in tools.md and the model setup step in models.md keep
their guidance but no longer cite the sample's files.
- Prose that named the demo ('The bidi-demo demonstrates how to...') is
rewritten to describe the pattern directly.
- The Bidi Demo card and its screenshot are removed from the Live demos section
of index.md; LensMosaic remains.
Staleness fixes verified against adk-python main:
- StreamingMode.BIDI is inert. Only run_async() reads RunConfig.streaming_mode;
run_live() never does. Remove it from every run_live()-facing sample and
rewrite the 'StreamingMode: BIDI or SSE' section around the Runner method you
call. Keeps the old anchor via attr_list.
- configuration.md: run_live(session=...) is gone; use user_id/session_id.
- tools.md: streaming tools are registered lazily on first model call, not
scanned up front; the input_stream queue is created only for tools annotated
with LiveRequestQueue, and stop_streaming resets it to None. The old
runners.py / function_tool.py line references pointed at unrelated code.
- sessions.md: document DEFAULT_MAX_RECONNECT_ATTEMPTS = 5 and the go_away
reconnect trigger; correct 'automatic closure in SSE mode', which really only
happens for the internal queue under support_cfc.
- events.md: audio artifacts require RunConfig.save_live_blob=True;
get_author_for_event() also keys off llm_response.input_transcription.
- configuration.md: document history_config and the
initial_history_in_client_content=True that ADK sets when seeding history.
Not changed: get-started/streaming-java.md still sets StreamingMode.BIDI, which
could not be verified without an adk-java checkout.
Checked against the Gemini Live API and Agent Platform model docs: - models.md: replace the model list with a platform/model/stage table covering gemini-3.1-flash-live-preview (Preview, Gemini Live API only), gemini-2.5-flash-native-audio-preview-12-2025 (Preview), and gemini-live-2.5-flash-native-audio (now GA, not "public preview"). - Document what Gemini 3.1 Live does not support: proactivity, affective dialog, async function calling, thinking_budget (it uses thinking_level), plus multi-part server events and the turn-coverage default change. - Note that no Gemini 3.x Live model exists on Agent Platform, and that Live API models are unavailable in the `global` location. - voice.md: replace the Platform Compatibility text, which wrongly said proactivity and affective dialog are unavailable on Agent Platform, with a per-model support table. - configuration.md: CFC's model check is a literal `gemini-2` prefix match, so it rejects Gemini 3.x; refresh the runners.py line anchor. - bidi-demo: same model table in the README, the 3.1 option and the regional location requirement in .env.example, and an expanded model comment in agent.py. The default stays on 2.5 native audio because the demo exposes proactivity and affective dialog toggles. Re-anchored the agent.py line links in models.md, tools.md, and sessions.md.
kazunori279
force-pushed
the
kaz-live-phase2
branch
from
August 13, 2026 06:48
e1fd947 to
04d5755
Compare
Verified docs/live/ and docs/runtime/runconfig.md against the Gemini Live API capabilities guide, the Agent Platform Live API docs, and ADK 2.6.3. Model consistency: - response_modalities=["TEXT"] was presented as a valid live configuration in configuration.md, events.md and sessions.md. Every Live API model ADK supports is a native audio model, and those accept AUDIO only. Reframed around AUDIO plus output audio transcription, and kept TEXT where it is actually correct: the run_async() / SSE path. - docs/runtime/runconfig.md configured response_modalities=["AUDIO","TEXT"] in all three language samples. A session accepts exactly one modality. - events.md snippets read event.content.parts[0], which drops content on gemini-3.1-flash-live-preview because it sends multiple parts per server event -- the failure models.md already warns about. All four snippets now iterate over parts. - tools.md gave the streaming-tools root agent model="gemini-flash-latest", which has no Live API support, so the example could not run under run_live() on either platform. That alias is still used for the one-shot generate_content call inside the tool, where it is correct. - configuration.md "Standard Gemini Models (1.5 Series) Accessed via SSE" described a retired model family and labelled gemini-pro-latest / gemini-flash-latest as 1.5 with 2M context. - sessions.md: document that send_client_content is seeding-only on Gemini 3.x Live, and that ADK reroutes single-part text to send_realtime_input. - models.md: gemini-live-2.5-flash-native-audio is the only GA Live API model on Agent Platform, not the only one. Coverage and links: - configuration.md: document explicit_vad_signal, translation_config, avatar_config and model_input_context. - voice.md: note that ADK picks the live API version (v1alpha / v1beta1), so proactivity and affective dialog need no http_options. - Replace redirecting upstream URLs with their current targets: live-guide -> live-api/capabilities, live-session -> live-api/session-management, live -> live-api, and cloud.google.com/vertex-ai -> the Agent Platform equivalents. Verified correct, left alone: session and context limits, audio and video specs, the proactivity / affective dialog model matrix, thinking_level vs thinking_budget, the support_cfc gemini-2 prefix check, and ADK's AUDIO default in run_live().
Every Live API model ADK supports is a native audio model, so a live session's response modality is always AUDIO and there is nothing to choose. Shrink the section to the one thing that still matters -- reading text off event.output_transcription. StreamingMode is only read by run_async(); the SSE tutorial that grew around it here (protocol diagrams, progressive-streaming walkthrough, mode-selection table, 1.5-series model list) duplicates runtime/runconfig.md and describes models that no longer exist. Keep the inert-BIDI warning and the run_live()/run_async() split, drop the rest. Document explicit_vad_signal, translation_config, avatar_config and model_input_context, which had no coverage at all.
Six sections carried weight that did not belong to them: - sessions.md 'Best Practices for Live API Connection and Session Management' restated the Session Resumption and Context Window Compression sections verbatim, down to the RunConfig snippets. Deleted. - sessions.md 'Concurrency and Thread Safety' + 'Message Ordering Guarantees' explained asyncio.Queue at length and reproduced the upstream task already in custom-server.md. Condensed to the three properties that actually affect calling code, with a pointer to the private _queue attribute dropped. - sessions.md 'Architectural Patterns for Managing Quotas' was an ASCII decision tree and a comparison table for two patterns that reduce to one sentence each. - index.md 'Real-world applications' spent five industry vignettes making one point. - events.md 'Deserializing on the Client' pasted 80 lines of the bidi-demo's UI code, calling helpers that no longer exist anywhere in these docs. Reduced to the event-shape handling it was meant to show. - audio-video.md 'Handling Image Input at the Client' was 130 lines of getUserMedia/canvas/FileReader boilerplate plus a seven-point recap of it. Also fix two dead absolute links: /agents/multi-agents/#workflow-agents-as-orchestrators (the page now redirects to workflows/index.md and the anchor is gone) and /live/streaming-tools/ (no such page; the content is in tools.md).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 2 of the Live docs revamp: the five-part
docs/streaming/dev-guide/is decomposed into per-capability pages underdocs/live/, and the whole set is re-verified against adk-pythonmain.Nine commits, meant to be read in order:
d89a3cc0f8cbd58716d19fcfed4c3caa1dbmainand drop every link to the bidi-demo sample04d5755943eaaa8953acff95b543The bidi-demo sample is not shipped
The sample used to live in
adk-samples/python/agents/bidi-demo/and was removed there, which left every source link indocs/live/dead. Rather than vendor a copy into this repo, all 38 references to it are removed.The code snippets in the docs are unchanged. What went away is only the scaffolding that pointed at the sample:
Demo implementation: file.py:NN-MMtitle and are now plain language-tagged fences.custom-server.mdand the "Demo Implementation" note inevents.mdare gone; both existed only to link out.tools.mdand the model setup step inmodels.mdkeep their guidance but no longer cite the sample's files.index.md; LensMosaic remains.Staleness fixes, verified against adk-python
mainStreamingMode.BIDIis inert. Onlyrun_async()readsRunConfig.streaming_mode;run_live()never does — its docstring says so explicitly. Removed from everyrun_live()-facing sample, and the "StreamingMode: BIDI or SSE" section is rewritten around whichRunnermethod you call. The old anchor is preserved viaattr_listso existing cross-references still resolve.configuration.md:run_live(session=...)is deprecated (still accepted in ADK 2.6.3); useuser_id/session_id.tools.md: streaming tools are registered lazily on the first model call, not scanned up front. Theinput_streamqueue is created only for tools annotated withLiveRequestQueue, andstop_streamingresets it toNone. The oldrunners.py:828-865/function_tool.py:238-253references pointed at unrelated code even at their pinned SHA.sessions.md: documentDEFAULT_MAX_RECONNECT_ATTEMPTS = 5and thego_awayreconnect trigger. Correct "automatic closure in SSE mode" — that only happens for the ADK-internal queue undersupport_cfc.events.md: audio artifacts requireRunConfig.save_live_blob=True;get_author_for_event()also keys offllm_response.input_transcription, not justcontent.role.configuration.md: documenthistory_configand theinitial_history_in_client_content=Truethat ADK sets when seeding a fresh connection with prior history.get-started/streaming-java.mdstill setsStreamingMode.BIDI; left alone because the Java behavior could not be verified without an adk-java checkout.Model-capability verification pass
943eaaare-checks the pages against the Gemini Live API capabilities guide, the Agent Platform Live API docs and ADK 2.6.3, asking two questions: does the guidance match what the current models support, and do the snippets run on bothgemini-3.1-flash-live-previewandgemini-live-2.5-flash-native-audio.Would not have worked on either model:
response_modalities=["TEXT"]was documented as valid for live agents (configuration.md,events.md,sessions.md). Every Live API model ADK supports is a native audio model, and those acceptAUDIOonly —configuration.mdalready said so two paragraphs later. Reframed aroundAUDIO+ output audio transcription;TEXTstays where it is correct, on therun_async()/ SSE path.docs/runtime/runconfig.mdset["AUDIO", "TEXT"]in the Python, TypeScript and Java samples. A session accepts exactly one modality.events.mdsnippets readevent.content.parts[0].gemini-3.1-flash-live-previewsends multiple parts per server event — the exact failuremodels.mdwarns about. They now iterate overparts.tools.mdgave the streaming-tools root agentmodel="gemini-flash-latest", which has no Live API support, so the example could not run underrun_live()at all. The alias is still used for the one-shotgenerate_contentcall inside the tool, where it is correct.Stale or missing:
configuration.md"Standard Gemini Models (1.5 Series) Accessed via SSE" described a retired family and labelledgemini-pro-latest/gemini-flash-latestas 1.5 with 2M context.sessions.md:send_client_contentis seeding-only on Gemini 3.x Live. ADK reroutes single-part text tosend_realtime_input, but multi-partContentstill goes out asLiveClientContent— now documented.configuration.md:explicit_vad_signal,translation_config,avatar_configandmodel_input_contextwere undocumented.voice.md: ADK picks the live API version itself (v1alpha/v1beta1), so proactivity and affective dialog need nohttp_options— unlike the rawgoogle-genaiexamples upstream.models.md:gemini-live-2.5-flash-native-audiois the only GA Live API model on Agent Platform, not the only one.live-guide→live-api/capabilities,live-session→live-api/session-management,live→live-api,cloud.google.com/vertex-ai/...→ the Agent Platform equivalents.Checked and correct, left alone: session duration and context limits, audio/video specs, the proactivity + affective dialog model matrix,
thinking_levelvsthinking_budget, thesupport_cfcgemini-2prefix check, and ADK'sAUDIOdefault inrun_live().Simplification pass
The last two commits remove 694 lines from
docs/live/(6,630 → 6,067) without dropping a capability. Nothing here is a judgement call about what readers need — each cut is either a verbatim duplicate, material that documents something the current models no longer let you choose, or code that no longer resolves.8953acf— response modality andStreamingModeEvery Live API model ADK supports is a native audio model, so a live session's response modality is always
AUDIO; there is no decision left to document.configuration.md's Response Modalities section shrinks to the one thing that still matters — reading text offevent.output_transcription.StreamingModeis only read byrun_async(), and an SSE tutorial had grown around it on a page about live agents: protocol diagrams, a progressive-streaming walkthrough, a mode-selection table, and a model list built on the retired 1.5 series. All of it duplicatesruntime/runconfig.md#enable-streaming. The inert-BIDI warning and therun_live()/run_async()split stay; the#streamingmode-bidi-or-sseanchor is preserved for inbound links. Net:configuration.md625 → 405 lines, andexplicit_vad_signal,translation_config,avatar_configandmodel_input_context— previously undocumented — gain coverage.f95b543— duplicated and non-ADK materialsessions.mdBest Practices for Live API Connection and Session ManagementRunConfigsnippets included. Deleted.sessions.mdConcurrency and Thread Safety + Message Ordering Guaranteesasyncio.Queueprimer plus a copy of the upstream task fromcustom-server.md. Condensed to the three properties that affect calling code; the tip to poll the private_queue.qsize()is gone.sessions.mdArchitectural Patterns for Managing Quotasindex.mdReal-world applicationsevents.mdDeserializing on the ClientcreateMessageBubble,audioPlayerNode) that exist nowhere in these docs. Reduced to the event-shape handling it was there to show.audio-video.mdHandling Image Input at the ClientgetUserMedia/canvas/FileReaderboilerplate followed by a seven-point recap of itself.Two dead absolute links fixed in passing:
/agents/multi-agents/#workflow-agents-as-orchestrators(the page redirects toworkflows/index.mdand the anchor no longer exists) and/live/streaming-tools/(no such page — the content is intools.md).Deliberately left alone:
events.mdOptimization for Audio Transmission (practical, documented nowhere else),workflows.mdBest Practices Summary (a summary, not a duplicate), andget-started/streaming-java.md, for the same reason as above — the Java behavior is unverified here.Test plan
mkdocs build --strictcleanbidi-demooutside twoAPP_NAME = "bidi-demo"string literals in sample snippetsgithub.com/google/adk-docs/.../main/...self-links added by this PR, so the link-checker has nothing unresolvable to hit#history_config,#streamingmode-bidi-or-sseand#other-live-related-fieldsanchors present in built HTML; inbound cross-references resolvedocs/)