> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ada.cx/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ada.cx/_mcp/server.

# React Native SDK

The Ada React Native SDK embeds your Ada AI Agent in a React Native app. The [`@ada-cx/messaging-react-native`](https://www.npmjs.com/package/@ada-cx/messaging-react-native) package provides the `AdaMessagingView` component, which runs the Agent inside a secure `react-native-webview` instance. You can do things like:

* Embed the Agent as a React component and control it through props
* Send commands at runtime with an imperative handle, including `sendMessage`, `reset`, and `setMetaFields`
* Receive Agent events through a single `onEvent` callback to drive analytics or your own UI
* Start sessions as a known user with a short-lived, single-use `identityToken`
* Run the Agent in headless mode and build a fully native chat experience
* Persist session state across an app force-quit with the `sessionStorageAdapter` prop
* Remove the loading state after process restarts with `onStateCache` and `initialState`

> **Note**
>
> The live session ends when the component unmounts. Persist `onStateCache` snapshots and pass them back as `initialState` to rehydrate on the next mount. See [Session lifecycle and state restoration](/messaging/react-native/getting-started#session-lifecycle-and-state-restoration).

From version 1.2.0, the SDK supports session persistence through the `sessionStorageAdapter` prop. When you pass the prop, session state, including active live agent handoff context, survives an app force-quit. Without the prop, the SDK does not persist session state. See [Session persistence](/messaging/react-native/sdk-api-reference#session-persistence).

> **Check**
>
> The [React Native SDK reference](/messaging/react-native/sdk-api-reference) covers all of the settings, actions, and events available to developers of React Native apps.

To get started, see the [React Native getting started guide](/messaging/react-native/getting-started).