AIUIRenderer

interface AIUIRenderer

Reads one format of generated UI and shows it. The SDK knows no format of its own: give a conversation's AIUIHost the renderer of each format your agent writes, such as OpenUI's.

A renderer places the host's components by name, among the ones its format has.

Properties

Link copied to clipboard
abstract val format: AIUIFormat

The format it reads.

Functions

Link copied to clipboard
open fun capabilities(components: List<AIUIComponent>, tools: List<AIClientTool>): Map<String, Any?>

What the agent's backend needs to have its model write UI this renderer shows with components, and runs tools from, such as the model's instructions that list the tools, as plain Kotlin values. None by default.

Link copied to clipboard
abstract fun makeEngine(host: AIUIHost): AIUIEngine

Makes what shows the documents of one conversation, for host.

Link copied to clipboard
open fun supports(version: String?): Boolean

Whether it reads documents of version, or of no version when null. It reads every version by default.