
React Native AI: Bringing On-Device LLMs With AI SDK
Presented
Speaker
The AI SDK provides an elegant abstraction layer that simplifies building sophisticated AI applications across cloud and on-device environments. AI SDK allows providing custom providers; and in this talk, Szymon demonstrates how we built a custom provider and brought on-device local offline LLMs to mobile apps.
Let’s discuss the creation of React Native AI, a custom AI SDK provider that enables local LLM execution directly in React Native apps. Szymon also talks about the provider architecture of AI SDK and shows how we leveraged it to integrate with MLC LLM Engine and Apple's foundation models to mobile devices.
What you'll discover:
- AI SDK: Why we decided to rely on it when building React Native AI
- AI SDK provider architecture: Understanding the core abstraction and how providers work
- Building custom providers: Step-by-step implementation of on-device LLM providers
- Seamless integration: How React Native AI into
generateText()and streamText() - Apple Intelligence provider: Creating
@react-native-ai/appleas an AI SDK-compatible provider - Provider flexibility: Switching between cloud and on-device models with identical APIs
- Live demo: Szymon will showcase how the same AI SDK code works seamlessly across OpenAI's cloud models and local on-device LLMs, highlighting the power of AI SDK.























