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.
Context.render_ui_widget(UiWidget(...))(added in 1.27) appends widgets toevent.actions.render_ui_widgets. As of v2.10.0, nothing ingoogle/adk/a2a/converters/reads that field on the way out, so A2UI widgets never reach A2A clients. Inbound,to_adk_eventdeliberately leaves itNone(seetests/unittests/a2a/converters/test_to_adk.py), which makes sense for peers.The
contrib/python/staged-ui-widgetsrecipe in google/adk-recipes notes the same gap foradk 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:
data"MUST be an array of messages".a2ui-agent-sdk(a2ui/a2a/parts.py,create_a2ui_part) emits one message per DataPart, withdataas an object.genui_a2a0.10.1) parsesdataas a single message and ignores arrays.Part.datathat is a list is served to v0.3 clients as{"value": [...]}withmetadata.data_part_compat = true, andmedia_typeon data parts is dropped (a2a/compat/v0_3/conversions.py,to_compat_part). So the MIME type has to live inmetadata["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, whicha2ui-agent-sdkstill sends for v0.9.Related:
render_ui_widgetdocs are in open PR documented render_ui widgets method adk-docs#2270.Versions: google-adk 2.10.0, a2a-sdk 1.1.5, A2UI v0.9, genui 0.10.3 / genui_a2a 0.10.1.