Skip to content

Commit d0c2a71

Browse files
authored
add client_to_server_list and server_to_client_list
1 parent 788bea4 commit d0c2a71

3 files changed

Lines changed: 62 additions & 23 deletions

File tree

specification/v0_9/docs/a2ui_extension_specification.md

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ Catalog Definition Document: The a2ui extension is catalog-agnostic. All UI comp
2121
Schemas: The a2ui extension is defined by several primary JSON schemas:
2222

2323
- Catalog Definition Schema: A standard format for defining a library of components and functions.
24-
- Server-to-Client Message Schema: The core wire format for messages sent from the agent to the client (e.g., updateComponents, updateDataModel).
25-
- Client-to-Server Event Schema: The core wire format for messages sent from the client to the agent (e.g., action).
24+
- Server-to-Client Message List Schema: The core wire format for messages sent from the agent to the client (e.g., updateComponents, updateDataModel).
25+
- Client-to-Server Message List Schema: The core wire format for messages sent from the client to the agent (e.g., action).
2626
- Client Capabilities Schema: The schema for the `a2uiClientCapabilities` object.
2727

2828
Client Capabilities: The client sends its capabilities to the server in an `a2uiClientCapabilities` object. This object is included in the `metadata` field of every A2A `Message` sent from the client to the server. This object allows the client to declare which catalogs it supports.
@@ -69,28 +69,45 @@ To identify a `DataPart` as containing A2UI data, it must have the following met
6969

7070
- `mimeType`: `application/json+a2ui`
7171

72-
The `data` field of the `DataPart` contains a **single** A2UI JSON message (e.g., `createSurface`, `updateComponents`, `action`). It MUST NOT be an array of messages.
72+
The `data` field of the `DataPart` contains a **list** of A2UI JSON messages (e.g., `createSurface`, `updateComponents`, `action`). It MUST be an array of messages.
7373

74-
### Atomicity and multiple messages
74+
### Processing Rules
7575

76-
To send multiple A2UI messages that should be processed atomically (e.g., creating a surface and immediately populating it), the sender MUST include multiple `DataPart`s within a single A2A `Message`.
76+
The `data` field contains a list of messages. This list is **NOT** a transactional unit. Receivers (both Clients and Agents) MUST process messages in the list sequentially.
7777

78-
Receivers (both Clients and Agents) MUST process all A2UI `DataPart`s within a single A2A `Message` sequentially and atomically. For a renderer, this means the UI should not be repainted until all parts in the message have been applied.
78+
If a single message in the list fails to validate or apply (e.g., due to a schema violation or invalid reference), the receiver SHOULD report/log the error for that specific message and MUST continue processing the remaining messages in the list.
79+
80+
Atomicity is guaranteed only at the **individual message** level. However, for a better user experience, a renderer SHOULD NOT repaint the UI until all messages in the list have been processed. This prevents intermediate states from flickering to the user.
7981

8082
### Server-to-client messages
8183

82-
When an agent sends a message to a client (or another agent acting as a client/renderer), the `data` payload must validate against the **Server-to-Client Message Schema**.
84+
When an agent sends a message to a client (or another agent acting as a client/renderer), the `data` payload must validate against the **Server-to-Client Message List Schema**.
8385

84-
Example `createSurface` DataPart:
86+
Example DataPart:
8587

8688
```json
8789
{
88-
"data": {
89-
"createSurface": {
90-
"surfaceId": "user_profile_surface",
91-
"catalogId": "https://a2ui.org/specification/v0_9/standard_catalog.json"
90+
"data": [
91+
{
92+
"createSurface": {
93+
"surfaceId": "example_surface",
94+
"catalogId": "https://a2ui.org/specification/v0_9/standard_catalog.json"
95+
}
96+
},
97+
{
98+
"updateComponents": {
99+
"surfaceId": "example_surface",
100+
"components": [
101+
{
102+
"Text": {
103+
"id": "root",
104+
"text": "Hello!"
105+
}
106+
}
107+
]
108+
}
92109
}
93-
},
110+
],
94111
"kind": "data",
95112
"metadata": {
96113
"mimeType": "application/json+a2ui"
@@ -100,23 +117,25 @@ Example `createSurface` DataPart:
100117

101118
### Client-to-server events
102119

103-
When a client (or an agent forwarding an event) sends a message to an agent, it also uses a `DataPart` with the same `application/json+a2ui` MIME type. However, the `data` payload must validate against the **Client-to-Server Event Schema**.
120+
When a client (or an agent forwarding an event) sends a message to an agent, it also uses a `DataPart` with the same `application/json+a2ui` MIME type. However, the `data` payload must validate against the **Client-to-Server Message List Schema**.
104121

105122
Example `action` DataPart:
106123

107124
```json
108125
{
109-
"data": {
110-
"action": {
111-
"name": "submit_form",
112-
"surfaceId": "contact_form_1",
113-
"sourceComponentId": "submit_button",
114-
"timestamp": "2026-01-15T12:00:00Z",
115-
"context": {
116-
"email": "user@example.com"
126+
"data": [
127+
{
128+
"action": {
129+
"name": "submit_form",
130+
"surfaceId": "contact_form_1",
131+
"sourceComponentId": "submit_button",
132+
"timestamp": "2026-01-15T12:00:00Z",
133+
"context": {
134+
"email": "user@example.com"
135+
}
117136
}
118137
}
119-
},
138+
],
120139
"kind": "data",
121140
"metadata": {
122141
"mimeType": "application/json+a2ui"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://a2ui.org/specification/v0_9/client_to_server_list.json",
4+
"title": "A2UI Client-to-Server Message List",
5+
"description": "A list of A2UI Client-to-Server messages.",
6+
"type": "array",
7+
"items": {
8+
"$ref": "client_to_server.json"
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://a2ui.org/specification/v0_9/server_to_client_list.json",
4+
"title": "A2UI Server-to-Client Message List",
5+
"description": "A list of A2UI Server-to-Client messages.",
6+
"type": "array",
7+
"items": {
8+
"$ref": "server_to_client.json"
9+
}
10+
}

0 commit comments

Comments
 (0)