Skip to main content
Install the SDK and WebView dependency:
npm install @sagepilot-ai/react-native-sdk@latest react-native-webview
For secure persisted sessions, also install a native storage library.

React Native Keychain

npm install react-native-keychain
react-native-keychain stores values in iOS Keychain and Android secure storage backed by Android Keystore.

Expo SecureStore

npx expo install expo-secure-store
Expo SecureStore uses iOS Keychain and Android encrypted storage backed by Android Keystore.

Optional Android CameraX addon

The base SDK does not bundle Android CameraX. Install the optional addon only when your app wants Sagepilot’s Android in-app CameraX picker:
npm install @sagepilot-ai/react-native-camera-addon@latest
After installing the addon, run a fresh native Android build. A Metro reload is not enough for React Native autolinking to register the native module. For Expo apps, use a native/dev-client build:
npx expo run:android
For bare React Native apps, clean and rebuild Android:
cd android && ./gradlew clean
cd ..
npx react-native run-android
The addon declares @sagepilot-ai/react-native-sdk as a peer dependency. Keep the base SDK installed directly in your app.

Optional host-provided picker dependencies

If you use the base SDK’s custom picker adapter instead of the CameraX addon, install only the picker modules your app needs.
# Camera and photo gallery
npm install react-native-image-picker

# Document/file picking
npm install @react-native-documents/picker

# Reliable document reads and durable file storage
npm install react-native-blob-util

# Durable picked-file batch manifests
npm install @react-native-async-storage/async-storage
See Native file picker for configuration and upload limits.

Required values

You need:
  • A Sagepilot workspace ID
  • A Sagepilot chat channel ID
  • A public SDK key in the format workspace_id:channel_id
  • Secure token storage for production apps
The key is not a secret. It is safe to ship in a mobile app. Do not put server API keys, signing secrets, or private workspace secrets in a React Native app.