React Native AI: Bringing on-device LLMs with AI SDK to React Native

Bookmark
Rate this content

Local, on-device LLMs unlock private-by-default, low-latency AI experiences that work offline - ideal for mobile. In this talk, I’ll show how to run LLMs directly inside React Native apps using an AI SDK that provides a nice abstraction layer to simplify building AI applications.

Join us as we explore the creation of react-native-ai, a library that enables local LLM execution. We’ll dive deep into the provider architecture and demonstrate how we integrated it with the MLC LLM Engine and Apple’s foundation models on mobile devices.

This talk has been presented at React Advanced 2025, check out the latest edition of this React Conference.

FAQ

MLC LLM acts as a universal engine that allows on-device AI models to run on multiple platforms supported by React Native.

Szymon Rybczak is a senior React Native developer at Callstack, known for creating many React Native libraries, including React Native AI.

React Native AI allows on-device AI models to be run without an internet connection by downloading the model once and using it offline, leveraging device capabilities.

On-device AI models provide benefits such as privacy, offline functionality, and fast response times without relying on cloud computing.

The Apple Foundation Models Framework is a way to run on-device LLMs created by Apple on iOS, macOS, and iPadOS without downloading additional models.

Yes, custom tool calls can be created in React Native AI to access native APIs and perform various tasks like creating calendar events or accessing photos.

Real-life applications include privacy-focused apps, offline applications, health apps for analyzing documents, and scenarios where internet connectivity is limited.

While on-device AI models can be used offline, they may not be as powerful as cloud-based models, and training them offline might have limitations.

Built-in AI models, like those from Apple, are optimized for specific devices and consume less memory compared to downloaded third-party models, which can use more RAM.

React Native AI is a library that allows developers to run on-device AI models using React Native.

Szymon Rybczak
Szymon Rybczak
26 min
28 Nov, 2025

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Hello everyone, React Native AI, AI SDK from Brazil, connect AI SDK with React Native, Szymon Rybczak, senior React Native developer, React Native AI, run AI on device, powerful devices, on-device AI on mobile, iPhone 15 Pro performance. Devices are powerful. Inspired by Guillermo Rauch's tweet on Google Chrome's Gemini model. Researched topic, learned about providers in AISDK, create and plug providers for various APIs. Excitement for WWDC, experimenting with Apple Foundation Model in React Native, impressive performance. Apple investment in React Native, code sharing success with Vercel SDK and React Native AI Apple package, extensive features and community support. Integration with ASDK, expanding providers for on-device models, Android models support, real-life privacy-focused applications. Simulator compatibility on macOS 26 and Pixel 9 Pro, upcoming Android models, LLM offline training trade-offs, privacy and efficiency benefits. Image and video generation potential, Device model parameter size comparison, Apple's optimized on-device model performance, Implications for other AI apps like Gemini and Jacky P.T. On-device model implementation for offline scenarios, Support for multiple runtimes, Memory consumption comparison, Whisper.RN and LLM.RN functionality, Device compatibility verification via APIs.

1. React Native AI Introduction

Short description:

Hello everyone, React Native AI, AI SDK from Brazil, connect AI SDK with React Native, Szymon Rybczak, senior React Native developer, React Native AI, run AI on device, powerful devices, on-device AI on mobile, iPhone 15 Pro performance.

Hello everyone, it's really nice to be here today in London. Thank you Git Nation for inviting me. And today I'm going to talk about React Native AI, a library to run on-device models in React Native. And here I would like to ask you, who ever played with React Native or who works with React Native? Please raise your hand. Oh, that's quite a lot of people. I didn't expect. And who here played with AI SDK from Brazil? Please also raise your hand. Okay. So less than React Native. I'm actually shocked.

All right. So today we'll try to connect AI SDK with React Native and we'll see what will come up. But before we start, let me introduce myself. My name is Szymon Rybczak. I'm a senior React Native developer. At Callstack, I'm 19. I've created many React Native libraries. React Native AI is one of them. I post a lot of stuff on Twitter, on X. So if you like React Native content, please follow me there.

And yeah, as you know, you can run AI into places. Of course, you can run AI in the cloud. And that's where most performance models are inferred. I don't know, Gemini 3, every model is inferred there because the cloud has a lot of compute power, etc. But actually, you can also run AI on the device. And devices that we carry, all carry in pockets, are really powerful. And sometime ago, last year, last summer, I was wondering, is it possible to run on-device AI on mobile? You know, for the past four or five years, I was doing all kinds of mobile apps in SwiftUI, in React Native, and I really love to play with good mobile apps. And of course, I'm a React Native developer. So I thought, is it possible to run on-device AI in React Native? And after looking at the stats from some latest iPhones, like two years ago, the stats are really good. Like on the single core, actually, iPhone 15 Pro has the same performance as some iPad Air.

2. Chrome Window AI Exploration

Short description:

Devices are powerful. Inspired by Guillermo Rauch's tweet on Google Chrome's Gemini model. Researched topic, learned about providers in AISDK, create and plug providers for various APIs. Encouragement to use Vercel AISDK, import functions from AI package for AI model integration.

It really showed me that devices that we carry in pockets are really powerful. And another kind of point of inspiration was this tweet from CEO of Vercel, Guillermo Rauch, who tweeted about new initiative, experimental initiative in Google Chrome, that Google Chrome will now ship some Gemini model, 2 gigabytes, and everyone will be able to access in Google Chrome. So if there is a low internet connection, but internet connection, or we are offline, there will be ability to play with it, to ask some questions, and use it maybe as a fallback. And it was really good. It was super fast. And I've played with it on my Mac, and it was super good.

So I started researching this topic. And when I opened the source code for this Chrome Window AI, I learned about providers in AISDK. And the idea of providers is that AISDK contains many functions such as stream text, generate text. And basically provider is an implementation. So you have one API, one unified API. And for, I don't know, Antropic, Gemini, OpenAI APIs, you just create providers. There are some original providers like created from Vercel team or community providers. And everyone can create one.

The schema is public and you just need to create it and you can plug it under generate text, stream text, and all kind of AISDK functions. So I thought, hmm, let's create one. And I really love Vercel AISDK. And if you haven't played with it, I really encourage you to. Because this is the amount of the code that you need to plug AI model with React Native AI. That was the idea back then. And you import generate text or stream text function from AI package. Then you call it, you pass the model and you pass the prompt, some probably message history and some other configuration props.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Building a Voice-Enabled AI Assistant With Javascript
JSNation 2023JSNation 2023
21 min
Building a Voice-Enabled AI Assistant With Javascript
Top Content
This Talk discusses building a voice-activated AI assistant using web APIs and JavaScript. It covers using the Web Speech API for speech recognition and the speech synthesis API for text to speech. The speaker demonstrates how to communicate with the Open AI API and handle the response. The Talk also explores enabling speech recognition and addressing the user. The speaker concludes by mentioning the possibility of creating a product out of the project and using Tauri for native desktop-like experiences.
The Ai-Assisted Developer Workflow: Build Faster and Smarter Today
JSNation US 2024JSNation US 2024
31 min
The Ai-Assisted Developer Workflow: Build Faster and Smarter Today
Top Content
AI is transforming software engineering by using agents to help with coding. Agents can autonomously complete tasks and make decisions based on data. Collaborative AI and automation are opening new possibilities in code generation. Bolt is a powerful tool for troubleshooting, bug fixing, and authentication. Code generation tools like Copilot and Cursor provide support for selecting models and codebase awareness. Cline is a useful extension for website inspection and testing. Guidelines for coding with agents include defining requirements, choosing the right model, and frequent testing. Clear and concise instructions are crucial in AI-generated code. Experienced engineers are still necessary in understanding architecture and problem-solving. Energy consumption insights and sustainability are discussed in the Talk.
The Rise of the AI Engineer
React Summit US 2023React Summit US 2023
30 min
The Rise of the AI Engineer
Top Content
Watch video: The Rise of the AI Engineer
The rise of AI engineers is driven by the demand for AI and the emergence of ML research and engineering organizations. Start-ups are leveraging AI through APIs, resulting in a time-to-market advantage. The future of AI engineering holds promising results, with a focus on AI UX and the role of AI agents. Equity in AI and the central problems of AI engineering require collective efforts to address. The day-to-day life of an AI engineer involves working on products or infrastructure and dealing with specialties and tools specific to the field.
AI and Web Development: Hype or Reality
JSNation 2023JSNation 2023
24 min
AI and Web Development: Hype or Reality
Top Content
This talk explores the use of AI in web development, including tools like GitHub Copilot and Fig for CLI commands. AI can generate boilerplate code, provide context-aware solutions, and generate dummy data. It can also assist with CSS selectors and regexes, and be integrated into applications. AI is used to enhance the podcast experience by transcribing episodes and providing JSON data. The talk also discusses formatting AI output, crafting requests, and analyzing embeddings for similarity.
Web Apps of the Future With Web AI
JSNation 2024JSNation 2024
32 min
Web Apps of the Future With Web AI
Web AI in JavaScript allows for running machine learning models client-side in a web browser, offering advantages such as privacy, offline capabilities, low latency, and cost savings. Various AI models can be used for tasks like background blur, text toxicity detection, 3D data extraction, face mesh recognition, hand tracking, pose detection, and body segmentation. JavaScript libraries like MediaPipe LLM inference API and Visual Blocks facilitate the use of AI models. Web AI is in its early stages but has the potential to revolutionize web experiences and improve accessibility.
The AI-Native Software Engineer
JSNation US 2025JSNation US 2025
35 min
The AI-Native Software Engineer
Software engineering is evolving with AI and VIBE coding reshaping work, emphasizing collaboration and embracing AI. The future roadmap includes transitioning from augmented to AI-first and eventually AI-native developer experiences. AI integration in coding practices shapes a collaborative future, with tools evolving for startups and enterprises. AI tools aid in design, coding, and testing, offering varied assistance. Context relevance, spec-driven development, human review, and AI implementation challenges are key focus areas. AI boosts productivity but faces verification challenges, necessitating human oversight. The impact of AI on code reviews, talent development, and problem-solving evolution in coding practices is significant.

Workshops on related topic

AI on Demand: Serverless AI
DevOps.js Conf 2024DevOps.js Conf 2024
163 min
AI on Demand: Serverless AI
Top Content
Featured WorkshopFree
Nathan Disidore
Nathan Disidore
In this workshop, we discuss the merits of serverless architecture and how it can be applied to the AI space. We'll explore options around building serverless RAG applications for a more lambda-esque approach to AI. Next, we'll get hands on and build a sample CRUD app that allows you to store information and query it using an LLM with Workers AI, Vectorize, D1, and Cloudflare Workers.
AI for React Developers
React Advanced 2024React Advanced 2024
142 min
AI for React Developers
Top Content
Featured Workshop
Eve Porcello
Eve Porcello
Knowledge of AI tooling is critical for future-proofing the careers of React developers, and the Vercel suite of AI tools is an approachable on-ramp. In this course, we’ll take a closer look at the Vercel AI SDK and how this can help React developers build streaming interfaces with JavaScript and Next.js. We’ll also incorporate additional 3rd party APIs to build and deploy a music visualization app.
Topics:- Creating a React Project with Next.js- Choosing a LLM- Customizing Streaming Interfaces- Building Routes- Creating and Generating Components - Using Hooks (useChat, useCompletion, useActions, etc)
Building Full Stack Apps With Cursor
JSNation 2025JSNation 2025
46 min
Building Full Stack Apps With Cursor
Featured Workshop
Mike Mikula
Mike Mikula
In this workshop I’ll cover a repeatable process on how to spin up full stack apps in Cursor.  Expect to understand techniques such as using GPT to create product requirements, database schemas, roadmaps and using those in notes to generate checklists to guide app development.  We will dive further in on how to fix hallucinations/ errors that occur, useful prompts to make your app look and feel modern, approaches to get every layer wired up and more!  By the end expect to be able to run your own AI generated full stack app on your machine!
Please, find the FAQ here
Vibe coding with Cline
JSNation 2025JSNation 2025
64 min
Vibe coding with Cline
Featured Workshop
Nik Pash
Nik Pash
The way we write code is fundamentally changing. Instead of getting stuck in nested loops and implementation details, imagine focusing purely on architecture and creative problem-solving while your AI pair programmer handles the execution. In this hands-on workshop, I'll show you how to leverage Cline (an autonomous coding agent that recently hit 1M VS Code downloads) to dramatically accelerate your development workflow through a practice we call "vibe coding" - where humans focus on high-level thinking and AI handles the implementation.You'll discover:The fundamental principles of "vibe coding" and how it differs from traditional developmentHow to architect solutions at a high level and have AI implement them accuratelyLive demo: Building a production-grade caching system in Go that saved us $500/weekTechniques for using AI to understand complex codebases in minutes instead of hoursBest practices for prompting AI agents to get exactly the code you wantCommon pitfalls to avoid when working with AI coding assistantsStrategies for using AI to accelerate learning and reduce dependency on senior engineersHow to effectively combine human creativity with AI implementation capabilitiesWhether you're a junior developer looking to accelerate your learning or a senior engineer wanting to optimize your workflow, you'll leave this workshop with practical experience in AI-assisted development that you can immediately apply to your projects. Through live coding demos and hands-on exercises, you'll learn how to leverage Cline to write better code faster while focusing on what matters - solving real problems.
Free webinar: Building Full Stack Apps With Cursor
Productivity Conf for Devs and Tech LeadersProductivity Conf for Devs and Tech Leaders
71 min
Free webinar: Building Full Stack Apps With Cursor
Top Content
WorkshopFree
Mike Mikula
Mike Mikula
In this webinar I’ll cover a repeatable process on how to spin up full stack apps in Cursor.  Expect to understand techniques such as using GPT to create product requirements, database schemas, roadmaps and using those in notes to generate checklists to guide app development.  We will dive further in on how to fix hallucinations/ errors that occur, useful prompts to make your app look and feel modern, approaches to get every layer wired up and more!  By the end expect to be able to run your own ai generated full stack app on your machine!
Working With OpenAI and Prompt Engineering for React Developers
React Advanced 2023React Advanced 2023
98 min
Working With OpenAI and Prompt Engineering for React Developers
Top Content
Workshop
Richard Moss
Richard Moss
In this workshop we'll take a tour of applied AI from the perspective of front end developers, zooming in on the emerging best practices when it comes to working with LLMs to build great products. This workshop is based on learnings from working with the OpenAI API from its debut last November to build out a working MVP which became PowerModeAI (A customer facing ideation and slide creation tool).
In the workshop they'll be a mix of presentation and hands on exercises to cover topics including:
- GPT fundamentals- Pitfalls of LLMs- Prompt engineering best practices and techniques- Using the playground effectively- Installing and configuring the OpenAI SDK- Approaches to working with the API and prompt management- Implementing the API to build an AI powered customer facing application- Fine tuning and embeddings- Emerging best practice on LLMOps