@@ -58,11 +58,11 @@ Build an A2A agent, configure it to use A2UI, use the A2UI composer to generate
5858 ...
5959 ---BEGIN SINGLE_COLUMN_LIST_EXAMPLE---
6060 [
61- {{ "beginRendering ": {{ "surfaceId": "default", "root ": "root-column ", "styles": {{ "primaryColor": "#FF0000", "font": "Roboto" }} }} }} ,
62- {{ "surfaceUpdate ": {{
61+ {{ "createSurface ": {{ "surfaceId": "default", "catalogId ": "https://a2ui.org/specification/v0_9/basic_catalog.json ", "styles": {{ "primaryColor": "#FF0000", "font": "Roboto" }} }} }} ,
62+ {{ "updateComponents ": {{
6363 "surfaceId": "default",
6464 "components": [
65- {{ "id": "root-column ", "component": {{ "Column": {{ "children": {{ "explicitList": ["title-heading", "item-list"] }} }} }} }} ,
65+ {{ "id": "root", "component": {{ "Column": {{ "children": {{ "explicitList": ["title-heading", "item-list"] }} }} }} }} ,
6666 {{ "id": "title-heading", "component": {{ "Text": {{ "usageHint": "h1", "text": {{ "literalString": "Top Restaurants" }} }} }} }} ,
6767 {{ "id": "item-list", "component": {{ "List": {{ "direction": "vertical", "children": {{ "template": {{ "componentId": "item-card-template", "dataBinding": "/items" }} }} }} }} }} ,
6868 {{ "id": "item-card-template", "component": {{ "Card": {{ "child": "card-layout" }} }} }} ,
@@ -77,7 +77,7 @@ Build an A2A agent, configure it to use A2UI, use the A2UI composer to generate
7777 {{ "id": "book-now-text", "component": {{ "Text": {{ "text": {{ "literalString": "Book Now" }} }} }} }}
7878 ]
7979 }} }} ,
80- {{ "dataModelUpdate ": {{
80+ {{ "updateDataModel ": {{
8181 "surfaceId": "default",
8282 "path": "/",
8383 "contents": [
@@ -109,9 +109,9 @@ Build an A2A agent, configure it to use A2UI, use the A2UI composer to generate
109109 The widgets are injected into the agent's prompt, in this case using the `RESTAURANT_UI_EXAMPLES` variable.
110110 Widgets are defined for the agent using examples of the json arrays they should output, wrapped in a comment block.
111111 - A comment indicating the start of the example
112- - beginRendering: The start of the widget's rendering
113- - surfaceUpdate: An example of the json structure for the widget
114- - dataModelUpdate: an example of the data that will be used to populate the widget
112+ - createSurface: Initializes the surface with its catalog (and optional styles/theme). Must come first.
113+ - updateComponents: The component tree for the widget. Exactly one component must have `id: "root"`.
114+ - updateDataModel: The data used to populate the widget
115115 - A comment indicating the end of the example
116116
117117 In the example repo, all of the widgets are defined in a single variable int the prompt_builder.py file, but you can structure them however you like,
0 commit comments