You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/v0.8/catalogs.md
+37-37Lines changed: 37 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ This guide defines the A2UI Catalog architecture and provides a roadmap for impl
6
6
7
7
## Catalog Definition
8
8
9
-
A catalog is a [JSON Schema file](../specification/v0_9/json/a2ui_client_capabilities.json#L62C5-L95C6) outlining the components, functions, and themes that agents can use to define A2UI surfaces using server-driven UI. All A2UI JSON sent from the agent is validated against the chosen catalog.
9
+
A catalog is a [JSON Schema file](specification/a2ui_client_capabilities_schema.json#L62C5-L95C6) outlining the components, functions, and themes that agents can use to define A2UI surfaces using server-driven UI. All A2UI JSON sent from the agent is validated against the chosen catalog.
10
10
11
-
[Catalog JSON Schema](../specification/v0_9/json/a2ui_client_capabilities.json#L62C5-L95C6) is below
11
+
[Catalog JSON Schema](specification/a2ui_client_capabilities_schema.json#L62C5-L95C6) is below
12
12
13
13
```json
14
14
{
@@ -59,15 +59,15 @@ Whether you are building a simple prototype or a complex production application,
59
59
60
60
### The Basic Catalog
61
61
62
-
To help developers get started quickly, the A2UI team maintains the [Basic Catalog](../specification/v0_9/json/standard_catalog.json).
62
+
To help developers get started quickly, the A2UI team maintains the [Basic Catalog](specification/standard_catalog_definition.json).
63
63
64
-
This is a pre-defined catalog file that contains a standard set of general-purpose components (Buttons, Inputs, Cards) and functions. It is not a special "type" of catalog; it is simply a version of a catalog that we have already written and have open source renderers for.
64
+
This is a pre-defined catalog file that contains a standard set of general-purpose components (Buttons, Inputs, Cards) and functions. It is not a special "type" of catalog; it is simply a version of a catalog that we have already written and have open source renderers for.
65
65
66
66
The basic catalog allows you to bootstrap an application or validate A2UI concepts without needing to write your own schema from scratch. It is intentionally sparse to remain easily implementable by different renderers.
67
67
68
68
Since A2UI is designed for LLMs to generate the UI at either design time or runtime, we do not think portability requires a standardized catalog across multiple clients; the LLM can interpret the catalog for each individual frontend.
69
69
70
-
[See the A2UI v0.9 basic catalog](../specification/v0_9/json/standard_catalog.json)
70
+
[See the A2UI v0.8 basic catalog](specification/standard_catalog_definition.json)
71
71
72
72
### Defining Your Own Catalog
73
73
@@ -77,7 +77,7 @@ By defining your own catalog, you restrict the agent to using exactly the compon
77
77
78
78
For simplicity we recommend building catalogs that directly reflect a client's design system rather than trying to map the Basic Catalog to it through an adapter. Since A2UI is designed for GenUI, we expect the LLM can interpret different catalogs for different clients.
79
79
80
-
[See an example Rizzcharts catalog](../samples/agent/adk/rizzcharts/rizzcharts_catalog_definition.json)
80
+
[See an example Rizzcharts catalog](../../samples/agent/adk/rizzcharts/rizzcharts_catalog_definition.json)
81
81
82
82
### Recommendations
83
83
@@ -88,7 +88,7 @@ For simplicity we recommend building catalogs that directly reflect a client's d
88
88
89
89
## Building a Catalog
90
90
91
-
A catalog is a JSON Schema file that conforms to the [Catalog schema](../specification/v0_9/json/a2ui_client_capabilities.json#L62C5-L95C6) that defines the components, themes and functions an agent can use when building a surface.
91
+
A catalog is a JSON Schema file that conforms to the [Catalog schema](specification/a2ui_client_capabilities_schema.json#L62C5-L95C6) that defines the components, themes and functions an agent can use when building a surface.
92
92
93
93
### Example: A Minimal Catalog
94
94
@@ -151,7 +151,7 @@ When the agent uses that catalog, it generates a payload strictly conforming to
151
151
152
152
### Freestanding Catalogs
153
153
154
-
A2UI Catalogs must be standalone (no references to external files) to simplify LLM inference and dependency management.
154
+
A2UI Catalogs must be standalone (no references to external files) to simplify LLM inference and dependency management.
155
155
156
156
While the final catalog must be freestanding, you may still author your catalogs modularly using JSON Schema `$ref` pointing to external documents during local development. Run `scripts/build_catalog.py` before distributing your catalog to bundle all external file references into a single, independent JSON Schema file:
157
157
@@ -205,7 +205,7 @@ This catalog imports only `Text` and `Icon` from the Basic Catalog to build a si
Because clients and agents can support multiple catalogs, they must agree on which catalog to use through a catalog negotiation handshake.
250
250
251
-
### Step 1: Agent advertises its support catalogs (optional)
251
+
### Step 1: Agent advertises its support catalogs (optional)
252
252
253
253
The agent may optionally advertise which catalogs it is capable of speaking (e.g., in the A2A Agent Card). This is informational; it helps the client know if the agent supports their specific features, but the client doesn’t have to use it.
254
254
@@ -322,19 +322,19 @@ A2UI component catalogs require versioning because catalog definitions are often
322
322
323
323
The `catalogId` is a unique text identifier used for negotiation between the client and the agent.
324
324
325
-
***Format:** While the `catalogId` is technically a string, the A2UI convention is to use a **URI** (e.g., `https://example.com/catalogs/mysurface/v1/catalog.json`).
326
-
***Purpose:** We use URIs to make the ID globally unique and easy for human developers to inspect in a browser.
325
+
***Format:** While the `catalogId` is technically a string, the A2UI convention is to use a **URI** (e.g., `https://example.com/catalogs/mysurface/v1/catalog.json`).
326
+
***Purpose:** We use URIs to make the ID globally unique and easy for human developers to inspect in a browser.
327
327
***No Runtime Fetching:** This URI does not imply that the agent or client downloads the catalog at runtime. **The catalog definition must be known to the agent and client beforehand (at compile/deploy time)**. The URI serves only as a stable identifier.
328
328
329
329
### Versioning Guidelines
330
330
331
-
Unlike standard JSON parsers where extra data is safely ignored, A2UI requires strict versioning to prevent semantic errors. If a client silently drops a new component (like a new "Itinerary" component) because it doesn't recognize it, the user misses critical information.
331
+
Unlike standard JSON parsers where extra data is safely ignored, A2UI requires strict versioning to prevent semantic errors. If a client silently drops a new component (like a new "Itinerary" component) because it doesn't recognize it, the user misses critical information.
332
332
333
333
To ensure the agent only generates UI the client can fully render, any structural change—even purely additive ones—requires a new catalog version. This is enforced by the A2UI JSON Schema which generally does not allow for unrecognized properties.
334
334
335
335
***Structural Changes (New Version Required)** Any change that alters the semantic meaning of the A2UI JSON payload requires a new catalog version. This ensures the Agent never sends a component the Client cannot render. A new catalog version is required for:
336
336
***Adding a new component:** (e.g., adding `FacePile` or `Itinerary`).
337
-
***Adding a new property:** Even if optional, if the Agent generates it, it expects it to be rendered.
337
+
***Adding a new property:** Even if optional, if the Agent generates it, it expects it to be rendered.
338
338
***Renaming/Removing fields:** These are standard breaking changes.
339
339
340
340
***Metadata Changes (Same Version Allowed)** You may keep the same catalog version only if the change has no impact on the generated JSON structure or the renderer's behavior. You can keep the version when
@@ -356,21 +356,21 @@ We recommend including the version in the catalogId. This allows using A2UI cata
356
356
357
357
To upgrade a catalog without breaking active agents, use A2UI Catalog Negotiation:
358
358
359
-
1.**Client Update:** The client updates its list of supportedCatalogIds to include *both* the old and new versions (e.g., [".../v2/...", ".../v1/..."]).
360
-
2.**Agent Update:** Agents are rebuilt with the v2 schema. When they see the client supports v2, they prefer it.
359
+
1.**Client Update:** The client updates its list of supportedCatalogIds to include *both* the old and new versions (e.g., [".../v2/...", ".../v1/..."]).
360
+
2.**Agent Update:** Agents are rebuilt with the v2 schema. When they see the client supports v2, they prefer it.
361
361
3.**Legacy Support:** Older agents that have not yet been rebuilt will continue to match against v1 in the client's list, ensuring they remain functional.
362
362
363
-
## A2UI Schema Validation & Fallback
363
+
## A2UI Schema Validation & Fallback
364
364
365
365
To ensure a stable user experience, A2UI employs a two-phase validation strategy. This "defense in depth" approach catches errors as early as possible while ensuring clients remain robust when facing unexpected payloads.
366
366
367
367
### Two-Phase Validation
368
368
369
-
1.**Agent-Side (Pre-Send):** Before transmitting any UI payload, the agent runtime validates the generated JSON against the catalog definition.
370
-
* Purpose: To catch hallucinated properties or malformed structures at the source.
371
-
* Outcome: If validation fails, the agent can attempt to fix or regenerate the A2UI JSON, or it can do graceful degradation such as falling back to text in a conversational app.
372
-
2.**Client-Side:** Upon receiving the payload, the client library validates the JSON against its local definition of the catalog.
373
-
* Purpose: Security and stability. This ensures that the code executing on the user's device strictly conforms to the expected contract, protecting against version mismatches or compromised agent outputs.
369
+
1.**Agent-Side (Pre-Send):** Before transmitting any UI payload, the agent runtime validates the generated JSON against the catalog definition.
370
+
* Purpose: To catch hallucinated properties or malformed structures at the source.
371
+
* Outcome: If validation fails, the agent can attempt to fix or regenerate the A2UI JSON, or it can do graceful degradation such as falling back to text in a conversational app.
372
+
2.**Client-Side:** Upon receiving the payload, the client library validates the JSON against its local definition of the catalog.
373
+
* Purpose: Security and stability. This ensures that the code executing on the user's device strictly conforms to the expected contract, protecting against version mismatches or compromised agent outputs.
374
374
* Outcome: Failures here are reported back to the agent using the “error” client message
375
375
376
376
### Graceful Degradation
@@ -379,7 +379,7 @@ Even if a payload passes schema validation, the renderer may encounter runtime i
379
379
380
380
Clients should not crash when encountering these errors. Instead, they should employ Graceful Degradation:
381
381
382
-
***Unknown Components:** If a component is recognized in the schema but not implemented in the renderer, render a "safe" fallback (e.g., a generic card with the component's debug name) or skip rendering that specific node entirely.
382
+
***Unknown Components:** If a component is recognized in the schema but not implemented in the renderer, render a "safe" fallback (e.g., a generic card with the component's debug name) or skip rendering that specific node entirely.
383
383
***Text Fallback:** If the entire surface fails to render, display the raw text description (if available) or a generic error message: *"This interface could not be displayed."*
384
384
385
385
### Client-to-Server Error Reporting
@@ -404,5 +404,5 @@ Example of client reporting a missing required field
404
404
405
405
## Inline Catalogs
406
406
407
-
Inline catalogs sent by the client at runtime are supported but not recommended in production. More details about them can be found [here](../specification/v0_9/docs/a2ui_protocol.md#client-capabilities--metadata).
407
+
Inline catalogs sent by the client at runtime are supported but not recommended in production. More details about them can be found [here](specification/docs/v0.8-a2ui.md#catalog-negotiation).
0 commit comments