A2uiCatalogDefinition


public interface A2uiCatalogDefinition


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 methods

abstract @NonNull A2uiComponentDefinitionCollection

The collection of component definitions available in this catalog.

default String

A human-readable description of this catalog.

abstract @NonNull A2uiFunctionCollection

The functions of this catalog, each with its implementation.

abstract @NonNull String

The unique identifier for this catalog.

default A2uiSchema

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

default String

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

default boolean

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

Extension functions

default final @NonNull A2uiInlineCatalog

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

Public methods

getComponentDefinitions

Added in 1.0.0-alpha03
abstract @NonNull A2uiComponentDefinitionCollection getComponentDefinitions()

The collection of component definitions available in this catalog.

getDescription

Added in 1.0.0-alpha03
default String getDescription()

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.

getFunctions

Added in 1.0.0-alpha03
abstract @NonNull A2uiFunctionCollection getFunctions()

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.

getId

Added in 1.0.0-alpha03
abstract @NonNull String getId()

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.

getThemeSchema

Added in 1.0.0-alpha03
default A2uiSchema getThemeSchema()

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.

getTitle

Added in 1.0.0-alpha03
default String getTitle()

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.

isInline

Added in 1.0.0-alpha03
default boolean isInline()

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

Extension functions

A2uiCoreCatalogDefinitionAdapterKt.toInlineCatalog

default final @NonNull A2uiInlineCatalog A2uiCoreCatalogDefinitionAdapterKt.toInlineCatalog(
    @NonNull A2uiCatalogDefinition receiver
)

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