How to add AI chat to a React Native app
Install the Sell Whisper AI React Native SDK, create a client with your Widget ID and render the chat screen in your iOS and Android app.
Do this in order
Install the packages
Add @sellwhisper/chat-client and @sellwhisper/react-native from npm. The SDK supports React Native 0.73 or later, Expo SDK 53 or later, iOS 15.1 or later and Android API level 24 or later.
Copy your widget ID
In the dashboard, open the agent, go to Deploy and open the agent's chat widget. The Widget ID in its settings is the one the website embed uses, so the app shares the same agent and widget settings.
Create the client and wrap your app
Create a SellWhisperClient with the Widget ID and a storage adapter such as AsyncStorage so conversations persist between launches, then wrap your app in SellWhisperProvider.
Render the chat screen
Add SellWhisperChatScreen where the chat should appear. Its props turn on the header, conversation history, attachments and voice notes; attachments and voice notes need the optional picker and audio packages installed.
Two packages
| Package | Use it for |
|---|---|
@sellwhisper/chat-client | The headless client: conversations, messages and events, with no React Native dependency |
@sellwhisper/react-native | The provider, hooks and ready-made chat screen for React Native and Expo |
Install both for the ready-made screen. Install the client alone to build your own interface.
What the app shares with your website
The app connects with the same Widget ID as your website embed. That means one agent, one knowledge base and one set of escalation rules, and a change to the agent's knowledge or instructions reaches the app without a new release.
Optional features and what they need
| Feature | Needs |
|---|---|
| Conversation history between launches | A storage adapter such as AsyncStorage |
| Attachments | An image or document picker package |
| Voice notes | An audio recording package |
| Voice assistant | An audio package and a development build; it does not run in Expo Go |
| Push notifications | Push set up in your app, and the device registered with the SDK |
Before you ship
- Test on a device. Run your build on a real iOS and Android device, not only in a simulator.
- Add knowledge first. The screen is only as useful as the agent behind it. See how to train an AI agent on your website.
- Set escalation. Live chat with your team works in the app; decide when it starts with how to hand AI conversations off to a human.
Install commands, the component props and a full example are in React Native SDK.
Common questions
Does the SDK work with Expo?
Can I build my own chat interface?
Does escalation to a person work in the app?
Get started
Put the steps into practice
Start free, no credit card required.