Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .gemini/GEMINI.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ This document serves as a guide for using the Gemini agent within the A2UI repos

The A2UI repository is organized into several key directories:

- `specification/0.8/docs/`: Contains the primary human-readable documentation for the A2UI protocol.
- `specification/v0_8/docs/`: Contains the primary human-readable documentation for the A2UI protocol.
- `a2ui_protocol.md`: The foundational specification document. This is the best place to start to understand the protocol's fundamental goals.
- `specification/0.8/json/`: Contains the formal JSON schema definitions for the protocol.
- `specification/v0_8/json/`: Contains the formal JSON schema definitions for the protocol.
- `server_to_client.json`: Defines the schema for messages sent from the server to the client.
- `client_to_server.json`: Defines the schema for event messages sent from the client to the server.
- `a2a_agents/python/`: Contains Python code relating to server-side integration of A2UI
Expand All @@ -34,9 +34,9 @@ This document covers the design philosophy, architecture, data flow, and core co

The formal, machine-readable definitions of the protocol are maintained as JSON schemas:

- **Server-to-Client Schema**: `@specification/0.8/json/server_to_client.json`
- **Server-to-Client Schema, with standard catalog**: `@specification/0.8/json/server_to_client_with_standard_catalog.json`
- **Client-to-Server Schema**: `@specification/0.8/json/client_to_server.json`
- **Server-to-Client Schema**: `@specification/v0_8/json/server_to_client.json`
- **Server-to-Client Schema, with standard catalog**: `@specification/v0_8/json/server_to_client_with_standard_catalog.json`
- **Client-to-Server Schema**: `@specification/v0_8/json/client_to_server.json`

## Running the Demos

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
SUPPORTED_CATALOG_IDS_KEY = "supportedCatalogIds"
INLINE_CATALOGS_KEY = "inlineCatalogs"

STANDARD_CATALOG_ID = "https://github.com/google/A2UI/blob/main/specification/0.8/json/standard_catalog_definition.json"
STANDARD_CATALOG_ID = "https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json"

def create_a2ui_part(a2ui_data: dict[str, Any]) -> Part:
"""Creates an A2A Part containing A2UI data.
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/components.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Component Gallery

This page showcases all standard A2UI components with examples and usage patterns. For the complete technical specification, see the [Standard Catalog Definition](https://github.com/google/A2UI/blob/main/specification/0.8/json/standard_catalog_definition.json).
This page showcases all standard A2UI components with examples and usage patterns. For the complete technical specification, see the [Standard Catalog Definition](https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json).

## Layout Components

Expand Down Expand Up @@ -267,6 +267,6 @@ This launches a live gallery with all components, their variations, and interact

## Further Reading

- **[Standard Catalog Definition](../../specification/0.9/json/standard_catalog_definition.json)**: Complete technical specification
- **[Standard Catalog Definition](../../specification/v0_9/json/standard_catalog_definition.json)**: Complete technical specification
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The link to the Standard Catalog Definition for v0.9 appears to be incorrect. It points to standard_catalog_definition.json, but based on the file structure for v0.9, the correct filename is standard_catalog.json. This seems to be a copy-paste error from a v0.8 reference.

Suggested change
- **[Standard Catalog Definition](../../specification/v0_9/json/standard_catalog_definition.json)**: Complete technical specification
- **[Standard Catalog Definition](../../specification/v0_9/json/standard_catalog.json)**: Complete technical specification

- **[Custom Components Guide](../guides/custom-components.md)**: Build your own components
- **[Theming Guide](../guides/theming.md)**: Style components to match your brand
4 changes: 2 additions & 2 deletions docs/reference/messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ Remove a surface and all its components and data.

All messages should be validated against:

- **[server_to_client.json](https://github.com/google/A2UI/blob/main/specification/0.8/json/server_to_client.json)**: Message envelope schema
- **[standard_catalog_definition.json](https://github.com/google/A2UI/blob/main/specification/0.8/json/standard_catalog_definition.json)**: Component schemas
- **[server_to_client.json](https://github.com/google/A2UI/blob/main/specification/v0_8/json/server_to_client.json)**: Message envelope schema
- **[standard_catalog_definition.json](https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json)**: Component schemas

## Further Reading

Expand Down
4 changes: 2 additions & 2 deletions docs/specification/v0.8-a2a-extension.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A2UI Extension for A2A Protocol (v0.8)

!!! info "Living Document"
This specification is automatically included from `specification/0.8/docs/a2ui_extension_specification.md`. Any updates to the specification will automatically appear here.
This specification is automatically included from `specification/v0_8/docs/a2ui_extension_specification.md`. Any updates to the specification will automatically appear here.

!!! note "Version Compatibility"
This extension specification applies to A2UI v0.8 and the A2A Protocol. For the base A2UI protocol, see [v0.8 Protocol Specification](v0.8-a2ui.md).
Expand All @@ -12,4 +12,4 @@

---

--8<-- "specification/0.8/docs/a2ui_extension_specification.md"
--8<-- "specification/v0_8/docs/a2ui_extension_specification.md"
4 changes: 2 additions & 2 deletions docs/specification/v0.8-a2ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Version 0.8 is the current stable release, recommended for production use.

!!! info "Living Document"
This specification is automatically included from `specification/0.8/docs/a2ui_protocol.md`. Any updates to the specification will automatically appear here.
This specification is automatically included from `specification/v0_8/docs/a2ui_protocol.md`. Any updates to the specification will automatically appear here.

**See also:**
- [v0.9 Protocol Specification](v0.9-a2ui.md) (Draft)
Expand All @@ -13,4 +13,4 @@

---

--8<-- "specification/0.8/docs/a2ui_protocol.md"
--8<-- "specification/v0_8/docs/a2ui_protocol.md"
4 changes: 2 additions & 2 deletions docs/specification/v0.9-a2ui.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A2UI Protocol v0.9 (Draft)

!!! info "Living Document"
This specification is automatically included from `specification/0.9/docs/a2ui_protocol.md`. Any updates to the specification will automatically appear here.
This specification is automatically included from `specification/v0_9/docs/a2ui_protocol.md`. Any updates to the specification will automatically appear here.

!!! warning "Draft Status"
Version 0.9 is currently in draft status. For production use, consider [v0.8 (Stable)](v0.8-a2ui.md).
Expand All @@ -12,4 +12,4 @@

---

--8<-- "specification/0.9/docs/a2ui_protocol.md"
--8<-- "specification/v0_9/docs/a2ui_protocol.md"
4 changes: 2 additions & 2 deletions docs/specification/v0.9-evolution-guide.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Evolution Guide: v0.8 → v0.9

!!! info "Living Document"
This guide is automatically included from `specification/0.9/docs/evolution_guide.md`. Any updates will automatically appear here.
This guide is automatically included from `specification/v0_9/docs/evolution_guide.md`. Any updates will automatically appear here.

**Related Documentation:**
- [A2UI Protocol v0.8](v0.8-a2ui.md) (Stable - what you're migrating from)
- [A2UI Protocol v0.9](v0.9-a2ui.md) (Draft - what you're migrating to)

---

--8<-- "specification/0.9/docs/evolution_guide.md"
--8<-- "specification/v0_9/docs/evolution_guide.md"
4 changes: 2 additions & 2 deletions renderers/lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
},
"wireit": {
"copy-spec": {
"command": "mkdir -p src/0.8/schemas && cp ../../specification/0.8/json/*.json src/0.8/schemas",
"command": "mkdir -p src/0.8/schemas && cp ../../specification/v0_8/json/*.json src/0.8/schemas",
"files": [
"../../specification/0.8/json/*.json"
"../../specification/v0_8/json/*.json"
],
"output": [
"src/0.8/schemas/*.json"
Expand Down
2 changes: 1 addition & 1 deletion samples/agent/adk/rizzcharts/agent_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class RizzchartsAgentExecutor(A2aAgentExecutor):
def __init__(self, base_url: str):
self._base_url = base_url

spec_root = Path(__file__).parent / "../../../../specification/0.8/json"
spec_root = Path(__file__).parent / "../../../../specification/v0_8/json"

self._component_catalog_builder = ComponentCatalogBuilder(
a2ui_schema_path=str(spec_root.joinpath("server_to_client.json")),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"components": {
"$ref": "../../../../specification/0.8/json/standard_catalog_definition.json#/components",
"$ref": "../../../../specification/v0_8/json/standard_catalog_definition.json#/components",
"Canvas": {
"type": "object",
"description": "Renders the UI element in a stateful panel next to the chat window.",
Expand Down
2 changes: 1 addition & 1 deletion samples/client/angular/projects/orchestrator/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ app.post('/a2a', (req, res) => {
metadata: {
a2uiClientCapabilities: {
supportedCatalogIds: [
'https://github.com/google/A2UI/blob/main/specification/0.8/json/standard_catalog_definition.json',
'https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json',
],
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class Toolbar {

catalogs = [
{
value: 'https://github.com/google/A2UI/blob/main/specification/0.8/json/standard_catalog_definition.json',
value: 'https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json',
viewValue: 'Standard'
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Example AgentExtension block:
"required": false,
"params": {
"supportedCatalogIds": [
"https://github.com/google/A2UI/blob/main/specification/0.8/json/standard_catalog_definition.json",
"https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json",
"https://my-company.com/a2ui/v0.8/my_custom_catalog.json"
],
"acceptsInlineCatalogs": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ A2UI's component model is designed for flexibility, separating the protocol from

A **Catalog** defines the contract between the server and the client for the UI that can be rendered. It contains a list of supported component types (e.g., `Row`, `Text`), their properties, and available styles. A catalog is defined by a **Catalog Definition Document**.

There is a **Standard Catalog** associated with each version of the A2UI protocol. For v0.8, its identifier is `https://github.com/google/A2UI/blob/main/specification/0.8/json/standard_catalog_definition.json`.
There is a **Standard Catalog** associated with each version of the A2UI protocol. For v0.8, its identifier is `https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json`.

Catalog IDs are simple string identifiers. While they can be anything, it is conventional to use a URI within a domain that you own, to simplify debugging, avoid confusion, and avoid name collisions. Furthermore, if any changes are made to a catalog that could break compatibility between an agent and renderer, a new `catalogId` **must** be assigned. This ensures clear versioning and prevents unexpected behavior if an agent has changes but the client does not, or vice versa.

Expand All @@ -192,7 +192,7 @@ The server (agent) advertises its capabilities in its Agent Card as part of the
"uri": "https://a2ui.org/a2a-extension/a2ui/v0.8",
"params": {
"supportedCatalogIds": [
"https://github.com/google/A2UI/blob/main/specification/0.8/json/standard_catalog_definition.json",
"https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json",
"https://my-company.com/a2ui/v0.8/my_custom_catalog.json"
],
"acceptsInlineCatalogs": true
Expand All @@ -218,7 +218,7 @@ In **every** message sent to the server, the client includes an `a2uiClientCapab
"metadata": {
"a2uiClientCapabilities": {
"supportedCatalogIds": [
"https://github.com/google/A2UI/blob/main/specification/0.8/json/standard_catalog_definition.json",
"https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json",
"https://my-company.com/a2ui_catalogs/custom-reporting-catalog-1.2"
],
"inlineCatalogs": [
Expand Down Expand Up @@ -249,7 +249,7 @@ The server receives the client's capabilities and chooses a catalog to use for a

- `catalogId` (string, optional): The identifier of the chosen catalog. This ID must be one of the `supportedCatalogIds` or the `catalogId` from one of the `inlineCatalogs` provided by the client.

If the `catalogId` is omitted, the client **MUST** default to the standard catalog for the protocol version (`https://github.com/google/A2UI/blob/main/specification/0.8/json/standard_catalog_definition.json`).
If the `catalogId` is omitted, the client **MUST** default to the standard catalog for the protocol version (`https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json`).

**Example `beginRendering` Message:**
```json
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Example AgentExtension block:
"required": false,
"params": {
"supportedCatalogIds": [
"https://a2ui.dev/specification/0.9/standard_catalog.json",
"https://a2ui.dev/specification/v0_9/standard_catalog.json",
"https://my-company.com/a2ui/v0.9/my_custom_catalog.json"
],
"acceptsInlineCatalogs": true
Expand Down Expand Up @@ -78,7 +78,7 @@ Example A2UI DataPart:
"data": {
"createSurface": {
"surfaceId": "user_profile_surface",
"catalogId": "https://a2ui.dev/specification/0.9/standard_catalog.json"
"catalogId": "https://a2ui.dev/specification/v0_9/standard_catalog.json"
}
},
"kind": "data",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ This message signals the client to create a new surface and begin rendering it.
{
"createSurface": {
"surfaceId": "user_profile_card",
"catalogId": "https://a2ui.dev/specification/0.9/standard_catalog.json"
"catalogId": "https://a2ui.dev/specification/v0_9/standard_catalog.json"
}
}
```
Expand Down Expand Up @@ -261,7 +261,7 @@ If multiple configurations apply to the same data (e.g., one for `/` and one for
The following example demonstrates a complete interaction to render a Contact Form, expressed as a JSONL stream.

```jsonl
{"createSurface":{"surfaceId":"contact_form_1","catalogId":"https://a2ui.dev/specification/0.9/standard_catalog.json"}}
{"createSurface":{"surfaceId":"contact_form_1","catalogId":"https://a2ui.dev/specification/v0_9/standard_catalog.json"}}
{"updateComponents":{"surfaceId":"contact_form_1","components":[{"id":"root","component":"Card","child":"form_container"},{"id":"form_container","component":"Column","children":["header_row","name_row","email_group","phone_group","pref_group","divider_1","newsletter_checkbox","submit_button"],"justify":"start","align":"stretch"},{"id":"header_row","component":"Row","children":["header_icon","header_text"],"align":"center"},{"id":"header_icon","component":"Icon","name":"mail"},{"id":"header_text","component":"Text","text":"# Contact Us","variant":"h2"},{"id":"name_row","component":"Row","children":["first_name_group","last_name_group"],"justify":"spaceBetween"},{"id":"first_name_group","component":"Column","children":["first_name_label","first_name_field"],"weight":1},{"id":"first_name_label","component":"Text","text":"First Name","variant":"caption"},{"id":"first_name_field","component":"TextField","label":"First Name","value":{"path":"/contact/firstName"},"variant":"shortText"},{"id":"last_name_group","component":"Column","children":["last_name_label","last_name_field"],"weight":1},{"id":"last_name_label","component":"Text","text":"Last Name","variant":"caption"},{"id":"last_name_field","component":"TextField","label":"Last Name","value":{"path":"/contact/lastName"},"variant":"shortText"},{"id":"email_group","component":"Column","children":["email_label","email_field"]},{"id":"email_label","component":"Text","text":"Email Address","variant":"caption"},{"id":"email_field","component":"TextField","label":"Email","value":{"path":"/contact/email"},"variant":"shortText","checks":[{"call":"required","message":"Email is required."},{"call":"email","message":"Please enter a valid email address."}]},{"id":"phone_group","component":"Column","children":["phone_label","phone_field"]},{"id":"phone_label","component":"Text","text":"Phone Number","variant":"caption"},{"id":"phone_field","component":"TextField","label":"Phone","value":{"path":"/contact/phone"},"variant":"shortText","checks":[{"call":"regex","args":{"pattern":"^\\d{10}$"},"message":"Phone number must be 10 digits."}]},{"id":"pref_group","component":"Column","children":["pref_label","pref_picker"]},{"id":"pref_label","component":"Text","text":"Preferred Contact Method","variant":"caption"},{"id":"pref_picker","component":"ChoicePicker","variant":"mutuallyExclusive","options":[{"label":"Email","value":"email"},{"label":"Phone","value":"phone"},{"label":"SMS","value":"sms"}],"value":{"path":"/contact/preference"}},{"id":"divider_1","component":"Divider","axis":"horizontal"},{"id":"newsletter_checkbox","component":"CheckBox","label":"Subscribe to our newsletter","value":{"path":"/contact/subscribe"}},{"id":"submit_button_label","component":"Text","text":"Send Message"},{"id":"submit_button","component":"Button","child":"submit_button_label","primary":true,"action":{"name":"submitContactForm","context":{"formId":"contact_form_1","clientTime":{"call":"now","returnType":"string"},"isNewsletterSubscribed":{"path":"/contact/subscribe"}}}}]}}
{"updateDataModel":{"surfaceId":"contact_form_1","actorId":"agent-1","updates":[{"path":"/contact","value":{"firstName":"John","lastName":"Doe","email":"[email protected]","phone":"1234567890","preference":["email"],"subscribe":true},"hlc":"2026-01-12T16:34:29.000Z:0001:agent-1"}],"versions":{"agent-1":"2026-01-12T16:34:29.000Z:0001:agent-1"}}}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Version 0.9 represents a fundamental philosophical shift from "Structured Output
{
"createSurface": {
"surfaceId": "user_profile_card",
"catalogId": "https://a2ui.dev/specification/0.9/standard_catalog.json"
"catalogId": "https://a2ui.dev/specification/v0_9/standard_catalog.json"
}
}
```
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const componentGeneratorFlow = ai.defineFlow(
The output MUST be a series of JSON objects, each enclosed in a markdown code block (or a single block with multiple objects).

Standard Instructions:
1. Generate a 'createSurface' message with surfaceId 'main' and catalogId 'https://a2ui.dev/specification/0.9/standard_catalog.json'.
1. Generate a 'createSurface' message with surfaceId 'main' and catalogId 'https://a2ui.dev/specification/v0_9/standard_catalog.json'.
2. Generate a 'updateComponents' message with surfaceId 'main' containing the requested UI.
3. Ensure all component children are referenced by ID (using the 'children' or 'child' property with IDs), NOT nested inline as objects.
4. If the request involves data binding, you may also generate 'updateDataModel' messages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class Validator {
this.ajv.addSchema(schema, name);
}
this.validateFn = this.ajv.getSchema(
"https://a2ui.dev/specification/0.9/server_to_client.json"
"https://a2ui.dev/specification/v0_9/server_to_client.json"
);
}

Expand Down Expand Up @@ -67,7 +67,7 @@ export class Validator {
// to avoid noisy "oneOf" errors.
let validated = false;
const schemaUri =
"https://a2ui.dev/specification/0.9/server_to_client.json";
"https://a2ui.dev/specification/v0_9/server_to_client.json";

if (message.createSurface) {
validated = this.ajv.validate(
Expand Down Expand Up @@ -254,7 +254,7 @@ export class Validator {
if (this.ajv && c.component) {
const componentType = c.component;
const schemaUri =
"https://a2ui.dev/specification/0.9/standard_catalog.json";
"https://a2ui.dev/specification/v0_9/standard_catalog.json";

const defRef = `${schemaUri}#/components/${componentType}`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://a2ui.dev/specification/0.9/common_types.json",
"$id": "https://a2ui.dev/specification/v0_9/common_types.json",
"title": "A2UI Common Types",
"description": "Common type definitions used across A2UI schemas.",
"$defs": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://a2ui.dev/specification/0.9/server_to_client.json",
"$id": "https://a2ui.dev/specification/v0_9/server_to_client.json",
"title": "A2UI Message Schema",
"description": "Describes a JSON payload for an A2UI (Agent to UI) message, which is used to dynamically construct and update user interfaces.",
"type": "object",
Expand Down
Loading
Loading