A ClientHandle for cleanup.
import { client } from "@alexkroman1/aai-ui";
function OrderPanel() {
return <div>Cart</div>;
}
client({
name: "Pizza Ordering",
theme: { bg: "#1a1a1a", primary: "#e55" },
sidebar: OrderPanel,
tools: { add_pizza: { icon: "🍕", label: "Adding pizza" } },
});
Define and mount a client UI for a voice agent.
Tier 1 (config-only): Pass options without
componentto get the default shell (StartScreen + ChatView, optional sidebar).Tier 2 (custom component): Pass
componentto render a fully custom root component inside the providers. In this tier a providednamealso setsdocument.title(there is no shell header to show it in).Mounts into
target— a CSS selector or DOM element, defaulting to"#app"— and throwsElement not found: <target>when the selector matches nothing.