Repository navigation
feat(experimental): add a2ui-agent-experimental package and decision kernel - #4473
Conversation
…4473 Signed-off-by: Greg Spencer <gspencer@google.com>
…2ui-project#4473 Signed-off-by: Greg Spencer <gspencer@google.com>
343db48 to
05f558f
Compare
…4473 Signed-off-by: Greg Spencer <gspencer@google.com>
7919d7f to
419a91e
Compare
nan-yu
left a comment
There was a problem hiding this comment.
Thanks, Greg! A vendor-neutral decision kernel built only on public facades is a nice shape. The packaging work is careful: the wheel respects PEP 420 and co-installs cleanly with the other a2ui packages, CI tests, type-checks and builds it, and the release gate correctly blocks publishing before the SDK APIs from #4471 ship. All 178 package tests and the release-script tests pass locally, and pointer escaping round-trips correctly.
The main things I found, inline:
- Model distributions aren't validated, so
ask()can return picks outside the options, BOOLEAN probabilities above 1, or SCORE answers withoutexpected. - A few payload-inspector gaps: no cycle guard in
inspect_pointers, secret key names the filter misses, non-JSON objects passing throughredact_payloadunredacted, and trailing-slash excludes that do nothing. - Error codes: some malformed outputs escape as a raw
TypeError, and contract violations are reported as backend errors. - Bare-name lookup on mixed catalogs doesn't follow v1.0 surface-default resolution.
- The boundary guard lets deep imports into public-named submodules through.
- The SDK pin isn't met in a tagless checkout, which looks like the reason for the extra
fetch-depth: 0lines.
🤖 Agent-generated
Validate returned model distributions against question.candidates() in _invoke_decision_model, tighten DecisionDistribution and DecisionAnswer validation, classify non-awaitable and A2uiValidationError model failures as DECISION_CONTRACT_ERROR, add cycle guards and pointer bounds to inspect_pointers, expand secret key token matching, drop non-JSON objects in redact_payload, unify path normalization, add v1.0 default_catalog_id to CatalogDecisionGraph, tighten the public API boundary test to top-level facades across src and tests, bump a2ui-agent-sdk fallback-version to 0.12.1, and remove unused ActionSpec/ExpressSurfaceSpec/coerce_decision_payload while syncing README.md Contents with __all__.
- Harden secret key redaction, DAG visit budget, depth parity, and allowlisted descendants - Trim unused fields/helpers from PointerSummary, models, graph, and root __all__ - Smooth Calibration.apply at temperature 1.0 and unify A2uiValidationError errors - Bump a2ui-agent-sdk dependency bound, fallback version, README, and release tests
… 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 for working through all of these! I re-checked the earlier comments against c633e28: everything is fixed except the secret-key list, where auth, session, tokens, cc, pan and conn_string still get through (partly overlapping jacobsimionato's notes, so I haven't re-raised it). A few of the fixes introduced new problems, inline.
🤖 Agent-generated
…d binder feedback Signed-off-by: Greg Spencer <gspencer@google.com>
caadd23 to
3863fb5
Compare
…package Signed-off-by: Greg Spencer <gspencer@google.com>
3863fb5 to
abc0c74
Compare
nan-yu
left a comment
There was a problem hiding this comment.
Thanks, Greg! I re-checked the last round against abc0c74: the sum renormalization, mock scorer normalization, redaction budget, and the new a2ui.experimental.decision.payload facade all look good, and the package tests and mypy pass locally. LGTM.
🤖 Agent-generated
…udget status Signed-off-by: Greg Spencer <gspencer@google.com>
Summary
Add the standalone PEP 420
a2ui-agent-experimentalpackage underpython/a2ui_agent_experimental/(a2ui.experimental.decision). It provides a vendor-agnostic, framework-neutral decision kernel built on publica2ui-coreanda2ui-agent-sdkAPIs, wired into CI,mypy, and PyPI release scripts.Reviewer Focus
python/a2ui_agent_experimental/src/a2ui/experimental/decision/models.pyandruntime.py: Vendor-agnosticDecisionModelcallable contract,DecisionBatch,DecisionQuestion,DecisionAnswer,DecisionDistribution,Calibration,invoke_decision_model, and typedDecisionModelError(DecisionErrorCode).python/a2ui_agent_experimental/src/a2ui/experimental/decision/payload_inspector.pyandpayload.py: RFC 6901 pointer extraction (inspect_pointers),DefaultSecretFilter, and cycle-boundedredact_payload. Also exposes the publica2ui.experimental.decision.payloadcustomization-hook facade.python/a2ui_agent_experimental/src/a2ui/experimental/decision/catalog_graph.py:CatalogDecisionGraphbuilt onCatalogSchemaInspectorwithout leaking the inspector or raw schemas, carryingis_integer, typedenum_values, andProtocolVersion.python/a2ui_agent_experimental/tests/test_public_api_boundary.py: AST guard enforcing that everya2ui.experimental.*subpackage imports only publica2ui.*facades with no private._*segments.Changes
python/a2ui_agent_experimental/(pyproject.toml,README.md,CHANGELOG.md) as a PEP 420 namespace package undera2ui.experimental.decisionwith zero framework or HTTP dependencies in the base install.models.py,runtime.py,ask.py,mock.py,catalog_graph.py,payload_inspector.py,semantic_types.py,payload.py,_warnings.py(UserWarning), and_internal.py.a2ui-agent-experimentalinto rootpyproject.toml,uv.lock,.github/workflows/python_ci.yml,.github/workflows/release-pypi.yml,.github/release_packages.json,.github/scripts/release_version.py,AGENTS.md,.agents/skills/a2ui-release-python/SKILL.md, anddocs/contributing/release/release.md.python/a2ui_agent_experimental/tests/test_decision_kernel.py,test_decision_ask.py,test_public_api_boundary.py,.github/scripts/tests/test_release_version.py, and.github/scripts/tests/test_release_notes.py.Impact & Risks
JevDecisionAdapter,GeminiDecisionAdapter,StepZeroLogprobAdapter,calibration_profiles.json) stay out of this kernel. They live in downstream playground and adapter packages (feat(samples): add decision_playground ADK agent and Lit client on a2ui-agent-experimental #4496, feat(experimental): add decision synthesizer, catalog patterns, adapters, and playground mode #4514).@experimentalUserWarnings unlessA2UI_SUPPRESS_EXPERIMENTAL_FEATURE_WARNINGS=1is set.a2ui-agent-experimentalsits last inRELEASE_ORDERin.github/scripts/release_version.py.Testing
uv run pytest python/a2ui_agent_experimental/tests .github/scripts/tests/test_release_version.py .github/scripts/tests/test_release_notes.pyuv run mypy python/a2ui_agent_experimental/src/uv run pyink --check python/a2ui_agent_experimental && python3 scripts/fix_licenses.py --check