React hooks for registering assistant-ui tools, data renderers, instructions, and model context providers.
API Reference
useAssistantInteractable
Registers an interactable with the AI assistant.
This hook handles registration only. To read and write the interactable's state, use useInteractableState with the returned id.
useAssistantInteractablename: stringconfig: AssistantInteractablePropsdescription: stringstateSchema: InteractableStateSchemainitialState: unknownid?: stringselected?: boolean
useAuiToolOverrides
Deprecated. Experimental, API may change.
Overrides toolkit entries for the current assistant scope.
This is intended for dynamic local-state tools whose model-facing contract is
declared in a "use generative" toolkit file with execute: stubTool(), but
whose actual executor must close over React state in the mounted component.
Keep the override keys stable after mount; dynamic key addition/removal is not
currently observed.
Overrides are registered at priority 1000, above toolkit defaults. Only one
mounted override provider may define a given tool name at a time.
useAuiToolOverridesoverrides: AuiToolOverrides
useInteractableState
Reads and writes the state of a registered interactable.
Pair with useAssistantInteractable which handles registration.
useInteractableStateid: stringfallback: TState