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

# React Native SDK

> Add Sagepilot chat to iOS and Android apps with the official React Native SDK.

`@sagepilot-ai/react-native-sdk` opens the Sagepilot-hosted chat experience inside a React Native WebView and provides APIs for setup, identity, unread count, attachments, and app-owned launchers.

## Requirements

* React 18+
* React Native 0.72+
* `react-native-webview` 13+
* A Sagepilot workspace ID and chat channel ID
* Secure token storage for production apps

## Install

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

For secure persisted sessions, install one storage library:

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

Expo apps can use `expo-secure-store` instead:

```bash theme={null}
npx expo install expo-secure-store
```

The base SDK does not bundle Android CameraX. Install `@sagepilot-ai/react-native-camera-addon` only if your Android app needs Sagepilot's in-app CameraX picker.

## Start here

<CardGroup cols={3}>
  <Card title="Install the SDK" icon="package" href="/sdks/react-native/installation">
    Add the SDK, WebView dependency, and secure storage package.
  </Card>

  <Card title="Configure chat" icon="settings" href="/sdks/react-native/configuration">
    Set the workspace/channel key, presentation behavior, and launcher theme.
  </Card>

  <Card title="Handle attachments" icon="paperclip" href="/sdks/react-native/native-file-picker">
    Use the optional CameraX addon or app-provided native pickers for more reliable uploads.
  </Card>

  <Card title="Enable push notifications" icon="bell-ring" href="/sdks/react-native/push-notifications">
    Connect Sagepilot message webhooks to your app-owned push system.
  </Card>

  <Card title="Open chat" icon="message-circle" href="/sdks/react-native/opening-chat">
    Use hooks and public methods to connect chat to your app-owned UI.
  </Card>
</CardGroup>

## Runtime model

`SagepilotChatProvider` renders the Sagepilot-hosted chat UI in a React Native WebView. Most apps do not need a host override. For standard Sagepilot cloud usage, omit `host`; the SDK connects to Sagepilot-hosted endpoints automatically.

Set `host` only when Sagepilot provides a dedicated endpoint for your workspace.
