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.

Steps

Do this in order

  1. 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.

  2. 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.

  3. 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.

  4. 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

PackageUse it for
@sellwhisper/chat-clientThe headless client: conversations, messages and events, with no React Native dependency
@sellwhisper/react-nativeThe 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

FeatureNeeds
Conversation history between launchesA storage adapter such as AsyncStorage
AttachmentsAn image or document picker package
Voice notesAn audio recording package
Voice assistantAn audio package and a development build; it does not run in Expo Go
Push notificationsPush set up in your app, and the device registered with the SDK

Before you ship

  1. Test on a device. Run your build on a real iOS and Android device, not only in a simulator.
  2. Add knowledge first. The screen is only as useful as the agent behind it. See how to train an AI agent on your website.
  3. 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.

FAQ

Common questions

Does the SDK work with Expo?
Yes, from Expo SDK 53. The voice assistant needs a development build rather than Expo Go.
Can I build my own chat interface?
Yes. @sellwhisper/chat-client is a headless client with no React Native dependencies, so you can drive your own components from it.
Does escalation to a person work in the app?
Yes. An escalated conversation continues as live chat with your team on the same screen. To reach users while the app is in the background, set up push notifications in your app and register the device with the SDK.

Related docs

Get started

Put the steps into practice

Start free, no credit card required.