# A2uiCatalog

Artifact: [androidx.a2ui.compose:compose-ui](https://developer.android.com/jetpack/androidx/releases/a2ui-compose) [View Source](https://cs.android.com/search?q=file:androidx/a2ui/compose/ui/A2uiCatalog.kt+class:androidx.a2ui.compose.ui.A2uiCatalog) Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui-compose#1.0.0-alpha02)


```
sealed interface A2uiCatalog
```

<br />

*** ** * ** ***

A Jetpack Compose implementation of an A2UI component catalog, which defines which `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent`s and `https://developer.android.com/reference/kotlin/androidx/a2ui/model/catalog/A2uiFunction`s are available to the agent for a particular A2UI surface.

To instantiate a new catalog, use the `A2uiCatalog` factory function.

## Summary

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponentCollection` | `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiCatalog#components()` The collection of `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent` implementations registered in this catalog. |
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/catalog/A2uiFunctionCollection` | `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiCatalog#functions()` The collection of `https://developer.android.com/reference/kotlin/androidx/a2ui/model/catalog/A2uiFunction` implementations registered in this catalog. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiCatalog#id()` The unique identifier for this catalog. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiCatalog#isInline()` Indicates whether this catalog's full JSON Schema should be serialized inline as part of the capabilities advertisement sent to the agent. |
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiSchema?` | `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiCatalog#themeSchema()` The optional JSON schema defining the dynamic theme overrides supported by this catalog. |

| ### Extension functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiReadinessEvaluator` | `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiCatalog.https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiCatalog#(androidx.a2ui.compose.ui.A2uiCatalog).asReadinessEvaluator()()` Creates an `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiReadinessEvaluator` that resolves readiness states using the components registered in this catalog. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?>` | `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiCatalog.https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiCatalog#(androidx.a2ui.compose.ui.A2uiCatalog).toJsonSchemaMap()()` Serializes this catalog to its JSON Schema Map representation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiCatalog.https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiCatalog#(androidx.a2ui.compose.ui.A2uiCatalog).toJsonSchemaString()()` Serializes this catalog to its JSON Schema string representation. |

## Public properties

### components

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui-compose#1.0.0-alpha02)

```
val components: A2uiComponentCollection
```

The collection of `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent` implementations registered in this catalog.

### functions

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui-compose#1.0.0-alpha02)

```
val functions: A2uiFunctionCollection
```

The collection of `https://developer.android.com/reference/kotlin/androidx/a2ui/model/catalog/A2uiFunction` implementations registered in this catalog.

### id

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui-compose#1.0.0-alpha02)

```
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.

### isInline

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui-compose#1.0.0-alpha02)

```
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-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui-compose#1.0.0-alpha02)

```
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.

## Extension functions

### A2uiCatalog.asReadinessEvaluator

Artifact: [androidx.a2ui.compose:compose-ui](https://developer.android.com/jetpack/androidx/releases/a2ui-compose) [View Source](https://cs.android.com/search?q=file:androidx/a2ui/compose/ui/A2uiCatalog.kt+function:asReadinessEvaluator)

```
fun A2uiCatalog.asReadinessEvaluator(): A2uiReadinessEvaluator
```

Creates an `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiReadinessEvaluator` that resolves readiness states using the components registered in this catalog.

This evaluator delegates to each specific `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent#(androidx.a2ui.compose.runtime.A2uiComponentScope).isReady(androidx.a2ui.compose.runtime.A2uiComponentProperties)` implementation to determine if a component is ready to transition from a loading state to a success state (e.g., has loaded all its required dynamic data).

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiReadinessEvaluator` | An `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiReadinessEvaluator` backed by this catalog. |

### A2uiCatalog.toJsonSchemaMap

Artifact: [androidx.a2ui.compose:compose-ui](https://developer.android.com/jetpack/androidx/releases/a2ui-compose) [View Source](https://cs.android.com/search?q=file:androidx/a2ui/compose/ui/A2uiCatalog.kt+function:toJsonSchemaMap)

```
fun A2uiCatalog.toJsonSchemaMap(): Map<String, Any?>
```

Serializes this catalog to its JSON Schema Map representation.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?>` | the serialized catalog JSON Schema Map |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | If this catalog does not support serialization. |

### A2uiCatalog.toJsonSchemaString

Artifact: [androidx.a2ui.compose:compose-ui](https://developer.android.com/jetpack/androidx/releases/a2ui-compose) [View Source](https://cs.android.com/search?q=file:androidx/a2ui/compose/ui/A2uiCatalog.kt+function:toJsonSchemaString)

```
fun A2uiCatalog.toJsonSchemaString(): String
```

Serializes this catalog to its JSON Schema string representation.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the serialized catalog JSON Schema string |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | If this catalog does not support serialization. |