Repository navigation
feat(samples): add multi-turn ADK format playground sample and Lit shell config - #4158
Closed
gspencergoog wants to merge 5 commits into
Closed
gspencergoog wants to merge 5 commits into
gspencergoog wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces the A2UI Format Playground, a sample agent and client configuration for exploring A2UI inference formats and tool rendering workflows. The feedback focuses on improving asynchronous performance and robustness: refactoring set_backend to be asynchronous to properly await backend cleanup, offloading synchronous file I/O in _rate_turn and _show_ratings to separate threads using asyncio.to_thread to prevent blocking the main event loop, and defensively verifying that extracted text attributes are strings in call_with_tools to avoid runtime errors.
gspencergoog
force-pushed
the
feat/decision-playground
branch
from
November 13, 2026 22:50
abe7cf1 to
d6b1138
Compare
gspencergoog
marked this pull request as ready for review
November 16, 2026 21:59
gspencergoog
added a commit
that referenced
this pull request
Nov 18, 2026
…ell config Squashed from the stacked branch history (backup: refs/backups/pre-squash-20261118/feat/decision-playground). PR: #4158
gspencergoog
force-pushed
the
feat/decision-playground
branch
from
November 18, 2026 17:49
88bfbfa to
40cc57e
Compare
gspencergoog
added a commit
that referenced
this pull request
Nov 18, 2026
…ell config Squashed from the stacked branch history (backup: refs/backups/pre-squash-20261118/feat/decision-playground). PR: #4158
gspencergoog
force-pushed
the
feat/decision-playground
branch
from
November 18, 2026 20:44
40cc57e to
76f7a89
Compare
gspencergoog
added a commit
that referenced
this pull request
Nov 19, 2026
…ell config Squashed from the stacked branch history (backup: refs/backups/pre-squash-20261118/feat/decision-playground). PR: #4158
gspencergoog
force-pushed
the
feat/decision-playground
branch
from
November 19, 2026 02:24
76f7a89 to
9d5754b
Compare
gspencergoog
added a commit
that referenced
this pull request
Nov 19, 2026
…ell config Squashed from the stacked branch history (backup: refs/backups/pre-squash-20261118/feat/decision-playground). PR: #4158
gspencergoog
force-pushed
the
feat/decision-playground
branch
from
November 19, 2026 04:21
9d5754b to
5f381fb
Compare
3 of 8 tasks
…ell config Squashed from the stacked branch history (backup: refs/backups/pre-squash-20261118/feat/decision-playground). PR: #4158
Request the optional [decision] extra from a2ui-agent-sdk in the format playground sample so httpx is declared explicitly, and update uv.lock. Signed-off-by: Greg Spencer <gspencer@google.com>
…ks, and Lit shell Signed-off-by: Greg Spencer <gspencer@google.com>
…fix collisions - Share guarded sanitize_url between renderers.py and inspector_trace.py so malformed bracketed hosts never raise ValueError inside exception handlers. - Exclude longer sibling block prefixes in _serialize_planned_block so prose_ does not absorb prose_group_0_* components. Signed-off-by: Greg Spencer <gspencer@google.com>
gspencergoog
force-pushed
the
feat/decision-playground
branch
from
November 24, 2026 18:01
5f381fb to
9b91f56
Compare
gspencergoog
marked this pull request as draft
November 30, 2026 23:51
Collaborator
Author
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
Adds an ADK
format_playgroundsample (samples/agent/adk/format_playground/, depending ona2ui-agent-sdk[decision]) and aplaygroundLit shell configuration (samples/client/lit/shell/) with a split-screen<playground-inspector>side panel. Developers can comparedecision,express,direct, and zero-LLMtoolrendering interactively while inspecting every stage of the pipeline on each turn.Reviewer Focus
samples/agent/adk/format_playground/renderers.pyandagent.py: inspect howRendererskeeps a sessionRendererStateacross turns (includingPlanCache), routes multi-turn surface updates onmain, and dispatches user actions and quick-action tool examples byaction.id.samples/agent/adk/format_playground/inspector_trace.pyandsamples/client/lit/shell/types/inspector.ts: check the in-bandapplication/x-a2ui-playground-trace+jsonDataPartpayload contract, backend URL credential redaction (sanitize_endpoint_url),PlanCachehit question reconstruction (_reconstruct_batch_and_key), and A2UI Express decompilation (ExpressDecompiler).samples/client/lit/shell/ui/inspector.ts,client.ts, andapp.ts: checkA2UIClientsessioncontextIdpersistence (sendTurnandresetSession), the responsive split-screen<playground-inspector>four-stage waterfall, and theclearSurfacesOnResponse: falseandinspector: trueoptions inconfigs/playground.ts.samples/client/lit/shell/theme/playground-theme.tsand thecssOverrideshandling inapp.ts:<a2ui-surface>renders inside the shell's shadow root, so the shell now adoptsconfig.cssOverridesonto its ownadoptedStyleSheetsrather than onlydocument. Confirm therestaurantandlocalconfigs, which set no overrides, are unaffected.samples/agent/adk/format_playground/tests/conftest.py: the sample uses flat top-level module names (agent,tools, ...). When the repo-widepytestrun collectstools/build_catalog/testsfirst, the repository'stools/directory wins as a namespace package, so the fixture pins the sample directory onsys.pathand evicts shadowed modules around each test.Changes
samples/agent/adk/format_playground/(declaringa2ui-agent-sdk[decision]inpyproject.toml) with ADK agent orchestration, multi-formatRenderers, slash commands, quick-action tool example buttons, a 1000-token Stage 1 thinking budget, JSONL ratings, demo tools, andrun.sh.samples/agent/adk/format_playground/inspector_trace.pyto build a four-stage turn trace (blockInput,decisionInput,decisionOutput,wireJson, plusllmStage2and/comparecandidates) and omit inline footer cards whena2uiPlaygroundInspector: trueis present in A2A request metadata.samples/client/lit/shell/types/inspector.tsandsamples/client/lit/shell/ui/inspector.ts(<playground-inspector>) to render the collapsible four-stage pipeline waterfall (1. Block Input,2. Decision Input,3. Decision Output & Plan,4. A2UI JSONwithDecompiled ExpressandRaw Wire JSONviews).samples/client/lit/shell/theme/playground-theme.ts(card spacing, list padding, equal-height stat cards, icon overflow clipping, non-italic captions) and loadInterfor body text alongsideOutfitfor titles inindex.html, applied only by theplaygroundconfig.samples/client/lit/shell/client.ts,app.ts,configs/types.ts, andconfigs/playground.tsto persist A2AcontextIdacross turns, supportresetSession(), adoptcssOverridesin the shell's shadow root, and mount the responsive split-screen inspector layout whenconfig.inspectoris enabled.pyproject.tomlanduv.lock, add Python unit tests undersamples/agent/adk/format_playground/tests/(96 cases), and add Vitest suites undersamples/client/lit/shell/tests/(inspector.spec.tsand an extendedsmoke-test.spec.ts);package.json'stest:vite-compilationnow runs every spec in the shell rather than the smoke test alone.Impact & Risks
samples/agent/adk/format_playground/plus opt-inclearSurfacesOnResponse,inspector, andcssOverridesbehavior insamples/client/lit/shell/that preserve existing behavior (clearSurfacesOnResponse: true,inspector: false, no overrides) forrestaurantandlocalconfigurations.a2ui.inference_formats.experimental.decision; running it emits the format's[EXPERIMENTAL]warning unlessA2UI_SUPPRESS_EXPERIMENTAL_FEATURE_WARNINGS=1is set.Testing
uv run pytest samples/agent/adk/format_playground/tests -q(96 passed), anduv run pytest -qfrom the repository root to exercise theconftest.pymodule isolation alongsidetools/build_catalog/tests.yarn --cwd samples/client/lit/shell build && yarn --cwd samples/client/lit/shell lint && yarn --cwd samples/client/lit/shell test.