# On-Device AI for Scenes

On-device AI evaluates real-time context, so Scenes adapt to what's happening in the moment rather than relying solely on fixed rules and priorities.

[AI](https://www.airship.com/docs/guides/features/intelligence-ai/ai/)

On-device AI is a framework that sends real-time context to a model for evaluation. Use Airship's built-in model, or bring your own for full flexibility. The built-in model uses Apple Intelligence, available on eligible iOS devices.
 
By default, the context you provide goes only to whichever model runs the evaluation, never to Airship. A dedicated Privacy Manager flag gates the whole framework, so you can hold evaluations until a user grants consent, then enable it at runtime.

## Supported features

Use on-device AI on iOS for the following Scenes features:

* **Classify responses for branching** — The model reads a user's response to an open question and routes them to the matching screen. For example, post-purchase feedback gets sorted into Praise, Complaint, or Shipping issue, then routed accordingly. A required fallback branch covers cases where classification isn't available.
* **Rank embedded content** — When more than one Scene is queued for the same embedded view, score each candidate and display the best match. For example, when a user is eligible for a loyalty offer, a re-engagement survey, and a content recommendation, the model displays the most relevant option
* **Evaluate context before display** — The model checks whether the moment is right before a Scene renders, and skips it if it's not. For example, don't display a promotional Scene while a user is mid-checkout or mid-booking.

Scenes sent to Android or web, and iOS devices where the connected model isn't available, automatically follow the fallback behavior configured for each capability, so the same Scene still works everywhere.

## Requirements and documentation

On-device AI requires minimum SDK iOS 21.

See [On-Device AI](https://www.airship.com/docs/developer/sdk-integration/apple/on-device-ai/) in our developer documentation. For feature configuration, see [Classify responses for branching](https://www.airship.com/docs/guides/messaging/editors/scenes/elements/#classify-responses-for-branching), [Automatically rank embedded content](https://www.airship.com/docs/guides/messaging/editors/scenes/root/#automatically-rank-embedded-content), and [Contextual Hold AI](https://www.airship.com/docs/guides/messaging/in-app-experiences/configuration/triggers/#contextual-hold-ai).
