Repository navigation
feat(samples): add decision_playground ADK agent and Lit client on a2ui-agent-experimental - #4496
Conversation
59d0885 to
b73cc30
Compare
405d4f9 to
53125ec
Compare
… and restore synthesizer kernel extensions Signed-off-by: Greg Spencer <gspencer@google.com>
nan-yu
left a comment
There was a problem hiding this comment.
Thanks, Greg! The playground is a great way to see all five tracks side by side, and the offline mock backend makes it easy to try. The latest push already sanitizes the endpoint URL in traces, redacts RPC arguments, keeps /backend per session, and handles malformed RPCs. Nice.
What's left, inline:
- Protocol: Express renders always target
main, so/compareemits twocreateSurface mainin one payload, and later turns re-create surfaces that already exist. - Secrets: vendor API keys are still forwarded to any configured decision URL, skipping the adapters' host check.
- Robustness: client-side validation failures are unhandled, the Step-0 floor flattens confident answers, and empty probabilities report success.
- CI: the sample's tests aren't in the root pytest
testpaths, so CI never runs them. - The client still sends the v0.8-style
userActionenvelope.
🤖 Agent-generated
11c56bb to
619f3a4
Compare
nan-yu
left a comment
There was a problem hiding this comment.
Thanks, Greg! I re-checked the earlier comments against 619f3a4: /compare now uses distinct surfaces and validates, re-created surfaces get a deleteSurface first, vendor keys stay with their hosts, Step-0 and empty-probability handling are fixed, the sample tests run in CI (29 pass locally), and the client sends the v1.0 action envelope. LGTM.
🤖 Agent-generated
619f3a4 to
7729a9d
Compare
7729a9d to
bb04d77
Compare
…pector Signed-off-by: Greg Spencer <gspencer@google.com>
bb04d77 to
5a40c2e
Compare
Summary
Add the interactive
decision_playgroundADK sample agent (samples/agent/adk/decision_playground/) and standalone Lit client (samples/client/lit/decision_playground/,@a2ui/decision-playground) with a split-screen four-stage pipeline inspector built ona2ui-agent-experimental.Reviewer Focus
samples/agent/adk/decision_playground/renderers.pyandagent.py: Mode runners forcascade,binder,gated,prose,rpc,express, anddirect. Includes per-session backend isolation, surface lifecycle tracking, and runtime cleanup of retired clients.samples/agent/adk/decision_playground/adapters.py: Sample HTTP and Step-0 decision adapters (GeminiDecisionAdapter,JevDecisionAdapter,StepZeroLogprobAdapter), host-checked vendor API key attachment, URL/error sanitization, and probability validation.samples/client/lit/decision_playground/app.tsandui/inspector.ts: Standalone Lit client emitting v1.0{version, action}envelopes, handling outbound RPC cancellation and batch validation errors, and rendering the four-stage<playground-inspector>.uv.lock,yarn.lock, andsamples/agent/adk/decision_playground/calibration_profiles.jsoncan be skimmed.Changes
samples/agent/adk/decision_playground/with interactive modes for all fivea2ui.experimental.decisiontracks (cascade,binder,gated,prose,rpc) plusexpressanddirectbaselines. Includes slash commands (/mode,/backend,/compare,/tool,/gated,/prose,/form,/trace,/help), offlinePlaygroundMockBackend, and HTTP/Step-0 adapters.samples/agent/adk/decision_playgroundas auvworkspace member and addedsamples/agent/adk/decision_playground/teststo[tool.pytest.ini_options].testpathsin rootpyproject.toml.@a2ui/decision-playgroundLit client undersamples/client/lit/decision_playground/with its configuration, theme, A2A context persistence, and four-stage<playground-inspector>component, leavingsamples/client/lit/shell/untouched.samples/agent/adk/decision_playground/tests/test_decision_playground.pyand Vitest suites insamples/client/lit/decision_playground/tests/inspector.spec.tsandsmoke-test.spec.ts.Impact & Risks
a2ui-core,a2ui-agent-sdk,a2ui-a2a,a2ui-adk, ora2ui-agent-experimentalare modified.feat/modular-decision-tracks).Testing
uv run pytest samples/agent/adk/decision_playground/tests -qyarn workspace @a2ui/markdown-it build && yarn workspace @a2ui/decision-playground test && yarn workspace @a2ui/decision-playground lintuv run pyink --check samples/agent/adk/decision_playground/ && yarn workspace @a2ui/decision-playground format:check && python3 scripts/fix_licenses.py --check