Get License

Cookbooks / AI chat

AI chat page

base-chat is the product primitive: message list, streaming cursor, tool-call rows, and a prompt box. Point (send) at your model API.

  1. Install chat. Run npx base-ui-cli add chat.
  2. Bind state. Pass messages and streaming into base-chat.
  3. Handle send. Point (send) at your model API; use (stop) to cancel.
  4. Show tool calls. Push messages with role: 'tool' for tool-call rows.
Ask how to install a component. This page fakes streaming — nothing leaves the browser.

Enter to send · Shift+Enter for a new line