Hooks
React hooks for assistant-ui: useAui, useAuiState, runtime creation, model context registration, and helpers for building custom AI chat behavior.
Hooks are the escape hatch and integration layer for React applications. Use them to read assistant state, call runtime actions, create runtimes, register model context, and connect custom components to assistant-ui behavior.
Pages
Composer Trigger HooksUnstable assistant-ui hooks for mention menus, slash commands, and custom composer trigger popovers.Model Context HooksReact hooks for registering assistant-ui tools, data renderers, instructions, and model context providers.Primitive HooksPrimitive hooks for reading scoped assistant-ui runtime state, viewport behavior, timing, and message part data inside React components.Runtime HooksRuntime creation hooks for local, remote, cloud, external-store, and AI SDK powered assistant-ui chat experiences.State HooksState selector and action hooks for reading assistant-ui runtime state and controlling threads, composers, messages, and attachments.