AI kit
Overview
The AI kit is a package of its own, @allxsmith/bestax-ai, for building the interface of an AI app
with bestax-bulma: a chat thread and a composer, replies that render markdown as they stream in, and
views that show what an agent is doing and ask before it acts. Its components build on
bestax-bulma's, so they take Bulma's colors, dark mode and your class prefix, and the package
installs nothing else.
Its components arrive one at a time, and each one gets its page in this section. The AI kit's tracker holds the plan and the order.
Markdownrenders markdown, such as a model's reply, as it streams in.
Import
Each AI component imports from @allxsmith/bestax-ai, beside what you import from
@allxsmith/bestax-bulma. The package takes React, React DOM and bestax-bulma as peers, the copies
your app already has.
import { Markdown } from '@allxsmith/bestax-ai';
What It Holds To
These are the decisions the tracker records for the whole kit. Markdown holds to the first already, and the components still to come will hold to the rest.
- Replies stay text. Whatever a model writes renders as React elements, never as HTML, so
markup inside a reply shows as text.
Markdownchecks every address before it becomes a link, and loads no image unless you allow it. - Your keys stay on your server. The chat hook, still to come, will read a stream from your own endpoint, and no example here will put a provider's API key in the browser.
- Accessible by default. A reply is busy while it streams rather than read token by token, and the thread to come will announce when a reply starts and when it's done. Every disclosure will be a real button, and motion will follow the reader's reduced-motion setting.