@assistant-ui/react-native

React Native bindings for assistant-ui. Native primitives for Thread, Composer, Message, and ThreadList that share the same runtime and adapters as @assistant-ui/react.
Installation
npm install @assistant-ui/react-native
Usage
import {
AssistantRuntimeProvider,
useLocalRuntime,
type ChatModelAdapter,
} from "@assistant-ui/react-native";
const adapter: ChatModelAdapter = {
async *run({ messages }) {
yield { content: [{ type: "text", text: "Hello!" }] };
},
};
export function App() {
const runtime = useLocalRuntime(adapter);
return (
<AssistantRuntimeProvider runtime={runtime}>
{/* Thread, Composer, Message primitives */}
</AssistantRuntimeProvider>
);
}
Documentation
Full primitives, hooks, and adapter reference at assistant-ui.com/docs/react-native.
For other platforms