Want the terminal instead of a frontend? The Quickstart covers the
aomi client CLI. This page covers installing and using the chat widget in a Next.js app.AomiFrame component API to shape it.
Prerequisites
- Next.js 15 app with the App Router
- Tailwind CSS configured
- shadcn/ui initialized (
npx shadcn initalready run,components.jsonpresent)
Install the widget
AomiFrame component, all sub-components, and every dependency in one step.
What gets installed
npm packages:
Component files:
Registry architecture
Components are pulled from three registries, all resolved automatically by the CLI:
Since components are copied into your project, you own the source code and can edit anything.
Set environment variables
Create.env.local:
Add AomiFrame to a page
Configure your API key
Option A: via the ControlBar UI
The widget includes a ControlBar with an API key input. Click the key icon, paste your API key, and select your app from the dropdown. The key is stored inlocalStorage for subsequent visits.
Option B: programmatically
Set the API key and app in code using theuseControl hook:
Run your app
http://localhost:3000. You should see the full chat interface with a thread sidebar, a message composer, a ControlBar, and streaming AI responses when you send a message.
Namespace configuration
For shorter install commands, add a registry namespace tocomponents.json:
Updating components
Re-run the install with--overwrite to pull the latest versions:
Component API
The rest of this page documents theAomiFrame component surface: props, the compound API for custom layouts, and ControlBar options.
Basic usage
Compound component API
Customize the layout using individual components:AomiFrame props
Control bar
The ControlBar provides built-in controls for:- ModelSelect: switch AI models at runtime
- AppSelect: switch between Aomi Apps
- ApiKeyInput: enter scoped API keys
- ConnectButton: connect a wallet
- NetworkSelect: select blockchain network
Theming
Customize colors using shadcn CSS variables in your Tailwind configuration.Next Steps
- Frontend Setup: choose widget vs headless
- Headless Library: build custom UI
- Quickstart: get started in minutes