> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sagepilot.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install the Sagepilot React Native SDK and required dependencies.

Install the SDK and WebView dependency:

```bash theme={null}
npm install @sagepilot-ai/react-native-sdk@latest react-native-webview
```

For secure persisted sessions, also install a native storage library.

## React Native Keychain

```bash theme={null}
npm install react-native-keychain
```

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

## Expo SecureStore

```bash theme={null}
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:

```bash theme={null}
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:

```bash theme={null}
npx expo run:android
```

For bare React Native apps, clean and rebuild Android:

```bash theme={null}
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.

```bash theme={null}
# 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](/sdks/react-native/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.
