Skip to content

A2A converter: emit EventActions.render_ui_widgets (provider="a2ui") as A2UI parts #7308

Description

@galdinsk

Context.render_ui_widget(UiWidget(...)) (added in 1.27) appends widgets to event.actions.render_ui_widgets. As of v2.10.0, nothing in google/adk/a2a/converters/ reads that field on the way out, so A2UI widgets never reach A2A clients. Inbound, to_adk_event deliberately leaves it None (see tests/unittests/a2a/converters/test_to_adk.py), which makes sense for peers.

The contrib/python/staged-ui-widgets recipe in google/adk-recipes notes the same gap for adk web. Today every app serving A2UI over A2A has to write this mapping itself.

Ask: when ui_widget.provider == "a2ui", emit its A2UI messages as A2A data parts on the task's status-update messages, and advertise the A2UI extension on the agent card.

The payload shape needs a decision, because the sources disagree:

  • The A2UI v0.9 / v0.9.1 A2A extension spec says the DataPart data "MUST be an array of messages".
  • Google's own a2ui-agent-sdk (a2ui/a2a/parts.py, create_a2ui_part) emits one message per DataPart, with data as an object.
  • Google's Flutter renderer (genui_a2a 0.10.1) parses data as a single message and ignores arrays.
  • In a2a-python 1.x, a v1.0 Part.data that is a list is served to v0.3 clients as {"value": [...]} with metadata.data_part_compat = true, and media_type on data parts is dropped (a2a/compat/v0_3/conversions.py, to_compat_part). So the MIME type has to live in metadata["mimeType"].

What interoperates with Google's clients today, over both the 1.0 and the 0.3-compat routes, is one A2UI message per part: data = that message object, metadata = {"mimeType": "application/a2ui+json"}. It would help if ADK picked one shape and documented it.

Also, https://adk.dev/integrations/a2ui/ still shows the older MIME type application/json+a2ui, which a2ui-agent-sdk still sends for v0.9.

Related:

Versions: google-adk 2.10.0, a2a-sdk 1.1.5, A2UI v0.9, genui 0.10.3 / genui_a2a 0.10.1.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a2a[Component] This issue is related a2a support inside ADK.needs review[Status] The PR/issue is awaiting review from the maintainer

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions