AIUIHost
constructor(renderers: List<AIUIRenderer>, components: List<AIUIComponent> = emptyList(), tools: List<AIClientTool> = emptyList(), linkSchemes: Set<String> = setOf(HTTP, HTTPS, MAILTO), send: (AIUIAction) -> Unit)
Parameters
renderers
The renderer of each format the agent writes, the first one listed asked first.
components
The app's views the agent can place.
tools
The app's tools a reply's UI can run on this device, which the agent's instructions list. They run without asking the person. One that is AIClientTool.isReadOnly runs whenever the UI asks, such as to load data while it shows; any other only when the person does something that runs it.
linkSchemes
The kinds of link a reply's UI may open: web and email links by default (http, https and mailto). The agent writes every link, so add another scheme only when the app wants it.
send
Sends what the person did to the agent, as their next message.