Hooks
Hooks for creating assistant runtimes.
Runtime hooks create the AssistantRuntime passed to AssistantRuntimeProvider.
import {
AssistantRuntimeProvider,
useLocalRuntime,
} from "@assistant-ui/react";
function App() {
const runtime = useLocalRuntime(chatModelAdapter);
return (
<AssistantRuntimeProvider runtime={runtime}>
{children}
</AssistantRuntimeProvider>
);
}Core Runtime Hooks
useLocalRuntimecreates a runtime from aChatModelAdapter.useRemoteThreadListRuntimeadds backend-backed thread list management.useExternalStoreRuntimeadapts an external message store.useAssistantTransportRuntimeconsumes assistant-stream transport events.
Integration Runtime Hooks
useChatRuntimeadapts AI SDK chat helpers.useDataStreamRuntimeadapts assistant-stream data streams.useLangGraphRuntimeadapts LangGraph.useCloudThreadListRuntimeuses Assistant Cloud for thread persistence.
Runtime Options
Most runtime hooks accept adapters for persistence, attachments, speech, dictation, feedback, and suggestions. See Adapters for the adapter map.