# A2UI Agent Experimental `a2ui-agent-experimental` holds experimental agent extensions for A2UI, built on [`a2ui-core`](../a2ui_core/README.md) and [`a2ui-agent-sdk`](../a2ui_agent/README.md). Each experiment is a separate subpackage of the `a2ui.experimental` namespace. The first one is `a2ui.experimental.decision`, the framework-neutral decision-model kernel. Everything in this package can change or be removed in any release. The entry points emit a `UserWarning` when they are used. Set the `A2UI_SUPPRESS_EXPERIMENTAL_FEATURE_WARNINGS` environment variable to `1` to silence the warnings. ## Installation ```bash pip install a2ui-agent-experimental ``` This package depends only on `a2ui-core` and `a2ui-agent-sdk`, with no dependency on `google-adk`, `a2a-sdk`, `google-genai`, or `httpx`. ## Contents Available in `a2ui.experimental.decision`: - `a2ui.experimental.decision`: Kernel contracts, models, and utilities (`DecisionModel`, `DecisionBatch`, `DecisionQuestion`, `QuestionKind`, `DecisionAnswer`, `DecisionDistribution`, `DecisionModelError`, `DecisionErrorCode`, `ConversationTurn`, `InputPart`, `TextInputPart`, `MediaInputPart`, `MediaModality`, `MediaResolution`, `ActionSpec`, `ExpressSurfaceSpec`, `coerce_decision_payload`, `ask`, `yes_no`, `choice`, `score`, `QuestionSpec`, `DecisionAnswers`, `CatalogDecisionGraph`, `ComponentKey`, `ComponentNodeSpec`, `ComponentSlot`, `SlotKind`, `inspect_pointers`, `redact_payload`, `PointerSummary`, `SemanticType`, `MockDecisionModel`, `Calibration`, `answer_from_distribution`, `invoke_decision_model`). - `a2ui.experimental.decision.payload`: Public payload inspection, semantic classification, and secret-redaction helpers (`DefaultSecretFilter`, `PointerSummary`, `PointerTypeClassifier`, `SemanticType`, `inspect_pointers`, `is_secret_pointer`, `redact_payload`, `split_pointer`). - `a2ui.experimental.decision.cascade`: Single-batch UI gate, routing tier selector, and closure-preserving catalog pruner (`DecisionCascadeRouter`, `CascadeConfig`, `CascadeTier`, `RouteDecision`, `SurfaceTemplateSpec`, `CascadeBatchFormatter`). - `a2ui.experimental.decision.binder`: Tool output pointer binding across `SurfaceTemplate` / `ExpressSurfaceTemplate`, `@macro` components, and Client-Side Templates (`ToolPointerBinder`, `BinderConfig`, `BindResult`, `SurfaceTemplate`, `ExpressSurfaceTemplate`). - `a2ui.experimental.decision.rpc`: Server-owned submit-time named boolean predicates with per-session sliding-window rate limiting (`NamedPredicateSpec`, `SessionRateLimiter`, `build_predicate_agent_functions`). - `a2ui.experimental.decision.gated`: Boolean region gating and mutually exclusive variants over A2UI v1.0 templates (`GatedTemplateEvaluator`, `GatedTemplateSpec`, `extract_gates_and_variants`, `prune_components`). - `a2ui.experimental.decision.prose`: Decision-gated prose-to-surface upgrade with flat typed field extraction (`ProseSurfaceUpgrader`, `ProseTemplateSpec`, `TypedFieldSpec`, `StructuredOutputExtractor`, `DeterministicMockExtractor`). Public APIs consumed from `a2ui-agent-sdk`: - `a2ui.utils.experimental.CatalogSchemaInspector`, `PropertyInfo`, `PropertyKind`, `PropertyValueType`, `resolve_default_catalog_id`: Read-only catalog schema inspection (`CatalogSchemaInspector` and `resolve_default_catalog_id` are `@experimental`, scheduled to be superseded by `CatalogModel`). - `a2ui.transformers.macros.MacroExpander`: Builds inference catalogs from `@macro` functions with `transform_catalogs` and transforms macro components with `transform_to_transport`. - `a2ui.utils.RendererState` (`commit`, `surface_catalogs`) and `a2ui.utils.validate_payload`: Commit messages atomically to a `RendererState` or validate them statelessly. ## Running tests From the repository root in an isolated environment: ```bash uv run --isolated --no-project --with ./python/a2ui_core --with ./python/a2ui_agent --with ./python/a2ui_agent_experimental --with pytest --with pytest-asyncio pytest python/a2ui_agent_experimental/tests ``` ## Building From `python/a2ui_agent_experimental`: ```bash uv build ```