-
Notifications
You must be signed in to change notification settings - Fork 751
docs: Update protocol docs and schema files #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7d09562
Update protocol docs
gspencergoog 45297cd
Add dynamicCatalog description, update old proposal formatting
gspencergoog 9f0cd78
Remove style from dynamic catalog
gspencergoog 6ed7f62
Add valueList to data model
gspencergoog bced655
Clean up schema files
gspencergoog 380daec
Merge branch 'main' into update_docs
holtskinner 437c7e3
Fix JSON fragment
gspencergoog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,19 @@ | ||
| # A2UI (Generative UI Language Format) Protocol | ||
| # A2UI (Agent to UI) Protocol | ||
|
|
||
| This repository contains the specification for the A2UI (Generative UI Language Format) protocol, a JSONL-based, streaming UI protocol designed to be easily generated by Large Language Models (LLMs). | ||
| This repository contains the specification for the A2UI protocol, a JSONL-based, streaming UI protocol designed to be easily generated by Large Language Models (LLMs). | ||
|
|
||
| ## Project Overview | ||
|
|
||
| The A2UI protocol enables a server to stream a platform-agnostic, abstract UI definition to a client, which then renders it progressively using a native widget set. The core design principles are: | ||
|
|
||
| * **LLM-Friendly**: The protocol uses a simple, declarative, and flat structure that is easy for LLMs to generate. | ||
| * **Progressive Rendering**: The UI is streamed as a series of JSONL messages, allowing the client to render the UI as it arrives, improving perceived performance. | ||
| * **Platform-Agnostic**: The protocol defines an abstract component tree, and the client is responsible for mapping these abstract components to its native widget implementations. | ||
| * **Separation of Concerns**: The protocol separates the UI structure (components), the application state (data model), and the client-side widget rendering. | ||
| - **LLM-Friendly**: The protocol uses a simple, declarative, and flat structure that is easy for LLMs to generate. | ||
| - **Progressive Rendering**: The UI is streamed as a series of JSONL messages, allowing the client to render the UI as it arrives, improving perceived performance. | ||
| - **Platform-Agnostic**: The protocol defines an abstract component tree, and the client is responsible for mapping these abstract components to its native widget implementations. | ||
| - **Separation of Concerns**: The protocol separates the UI structure (components), the application state (data model), and the client-side widget rendering. | ||
|
|
||
| ## Repository Layout | ||
|
|
||
| The repository is structured as follows: | ||
|
|
||
| * `docs/`: This directory contains the formal specification for the A2UI protocol (`docs/a2ui_protocol.md`) and related design documents and proposals. | ||
| * `specification/json/`: This directory contains the JSON schema files used to validate A2UI protocol messages and client event messages. | ||
| - `docs/`: This directory contains the formal specification for the A2UI protocol (`docs/a2ui_protocol.md`) and related design documents and proposals. | ||
| - `specification/json/`: This directory contains the JSON schema files used to validate A2UI protocol messages and client event messages. | ||
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| { | ||
| "title": "A2UI (Agent to UI) Client-to-Server Event Schema", | ||
| "description": "Describes a JSON payload for a client-to-server event message.", | ||
| "type": "object", | ||
| "minProperties": 1, | ||
| "maxProperties": 1, | ||
| "properties": { | ||
| "userAction": { | ||
| "type": "object", | ||
| "description": "Reports a user-initiated action from a component.", | ||
| "properties": { | ||
| "name": { | ||
| "type": "string", | ||
| "description": "The name of the action, taken from the component's action.name property." | ||
| }, | ||
| "surfaceId": { | ||
| "type": "string", | ||
| "description": "The id of the surface where the event originated." | ||
| }, | ||
| "sourceComponentId": { | ||
| "type": "string", | ||
| "description": "The id of the component that triggered the event." | ||
| }, | ||
| "timestamp": { | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "description": "An ISO 8601 timestamp of when the event occurred." | ||
| }, | ||
| "context": { | ||
| "type": "object", | ||
| "description": "A JSON object containing the key-value pairs from the component's action.context, after resolving all data bindings.", | ||
| "additionalProperties": true | ||
| } | ||
| }, | ||
| "required": [ | ||
| "name", | ||
| "surfaceId", | ||
| "sourceComponentId", | ||
| "timestamp", | ||
| "context" | ||
| ] | ||
| }, | ||
| "clientUiCapabilities": { | ||
| "type": "object", | ||
| "description": "Informs the server about the client's capabilities, such as the component catalog it supports. Exactly ONE of the properties in this object must be set.", | ||
| "properties": { | ||
| "catalogUri": { | ||
| "type": "string", | ||
| "format": "uri", | ||
| "description": "A URI pointing to a predefined component catalog schema that the server advertized, and the client supports." | ||
| }, | ||
| "dynamicCatalog": { | ||
| "type": "object", | ||
| "description": "An inline JSON object that defines the client's supported components.", | ||
| "properties": { | ||
| "components": { | ||
| "type": "object", | ||
| "description": "A map where each key is a component name and the value is a JSON Schema defining an object containing its properties.", | ||
| "additionalProperties": { | ||
| "$ref": "https://json-schema.org/draft/2020-12/schema" | ||
| } | ||
| } | ||
| }, | ||
| "required": ["components"] | ||
| } | ||
| }, | ||
| "oneOf": [ | ||
| { "required": ["catalogUri"] }, | ||
| { "required": ["dynamicCatalog"] } | ||
| ] | ||
| }, | ||
| "error": { | ||
| "type": "object", | ||
| "description": "Reports a client-side error. The content is flexible.", | ||
| "additionalProperties": true | ||
| } | ||
| }, | ||
| "oneOf": [ | ||
| { "required": ["userAction"] }, | ||
| { "required": ["clientUiCapabilities"] }, | ||
| { "required": ["error"] } | ||
| ] | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.