This guide walks through building a complete chat interface from scratch using only @aomi-labs/react hooks. You control every pixel.
Setup
Wrap your app with the runtime provider:
Message List Component
Display messages for the current thread:
Thread Switcher
Manage multiple conversation threads:
Compose Everything
Streaming
The isRunning flag is true while the assistant generates. Messages update in real time as tokens stream in. For granular control, subscribe to SSE events:
Key Principle
The headless library provides all the state and actions. Your components are purely presentational. There are no layout constraints, no CSS to override, and no component hierarchy to follow. You decide how messages look, where threads are listed, and how controls are arranged.
Next Steps
Last modified on June 10, 2026