A2uiCatalogDefinition


interface A2uiCatalogDefinition

Known direct subclasses
A2uiCatalog

A Jetpack Compose implementation of an A2UI component catalog, which defines which A2uiComponents and A2uiFunctions are available to the agent for a particular A2UI surface.


Defines the UI components and functions of an A2UI catalog.

A definition describes each component by its schema in componentDefinitions and holds the functions that the agent can call. It does not say how a component is rendered: the catalog type of a UI toolkit integration extends this interface and adds its component implementations.

Summary

Public properties

A2uiComponentDefinitionCollection

The collection of component definitions available in this catalog.

open String?

A human-readable description of this catalog.

A2uiFunctionCollection

The functions of this catalog, each with its implementation.

String

The unique identifier for this catalog.

open Boolean

Indicates whether this catalog's full JSON Schema should be serialized inline as part of the capabilities advertisement sent to the agent.

open A2uiSchema?

The optional JSON schema defining the dynamic theme overrides supported by this catalog.

open String?

The human-readable title of this catalog (e.g., "A2UI Basic Catalog").

Extension functions

A2uiInlineCatalog

Adapts this A2uiCatalogDefinition into an A2uiInlineCatalog for use in client capabilities advertisement.

Public properties

componentDefinitions

Added in 1.0.0-alpha03
val componentDefinitions: A2uiComponentDefinitionCollection

The collection of component definitions available in this catalog.

description

Added in 1.0.0-alpha03
open val description: String?

A human-readable description of this catalog.

The JSON Schema of this catalog includes the description in its description field, or omits the field if the description is null. Like the title, the description does not affect rendering.

functions

Added in 1.0.0-alpha03
val functions: A2uiFunctionCollection

The functions of this catalog, each with its implementation.

An A2uiFunction pairs the definition that is advertised to the agent with the code that evaluates a call. This collection holds implementations, unlike componentDefinitions: a function call is evaluated by calling A2uiFunction.execute directly, whereas a component is rendered by a UI toolkit integration, which supplies the component implementations.

id

Added in 1.0.0-alpha03
val id: String

The unique identifier for this catalog.

This ID is announced to the agent during the capability negotiation phase. It is recommended to use a URI format including a version number (e.g., "https://example.com/a2ui/catalog/v1") to ensure global uniqueness and facilitate protocol versioning. See https://a2ui.org/concepts/catalogs/#catalog-naming-versioning for the full guidelines on catalog IDs.

isInline

Added in 1.0.0-alpha03
open val isInline: Boolean

Indicates whether this catalog's full JSON Schema should be serialized inline as part of the capabilities advertisement sent to the agent.

themeSchema

Added in 1.0.0-alpha03
open val themeSchema: A2uiSchema?

The optional JSON schema defining the dynamic theme overrides supported by this catalog.

If provided, the agent can send theme properties conforming to this schema (e.g., "primaryColor") within the createSurface message to customize the catalog's visual appearance.

title

Added in 1.0.0-alpha03
open val title: String?

The human-readable title of this catalog (e.g., "A2UI Basic Catalog").

The JSON Schema of this catalog includes the title in its title field, or omits the field if the title is null. The title does not affect rendering.

Extension functions

A2uiCatalogDefinition.toInlineCatalog

fun A2uiCatalogDefinition.toInlineCatalog(): A2uiInlineCatalog

Adapts this A2uiCatalogDefinition into an A2uiInlineCatalog for use in client capabilities advertisement.