Skip to main content

Overview

The RunAnywhere React Native SDK is a production-grade, on-device AI SDK for React Native applications. It enables developers to run AI models directly on iOS and Android devices without requiring network connectivity for inference, ensuring minimal latency and maximum privacy for your users. The SDK provides a unified interface to multiple AI capabilities:

Key Capabilities

  • Multi-backend architecture – Choose from LlamaCPP (GGUF models) or ONNX Runtime
  • Cross-platform – Single codebase for iOS and Android
  • TypeScript-first – Full type safety and IDE autocomplete
  • Production-ready – Built-in analytics, logging, and model lifecycle management

Core Philosophy

All AI inference runs locally, ensuring low latency and data privacy. Once models are downloaded, no network connection is required for inference.
Backend engines are optional packages—include only what you need. This keeps your app bundle size minimal.
Audio and text data never leaves the device unless explicitly configured. Only anonymous analytics are collected by default.
API mirrors the iOS Swift SDK and Android Kotlin SDK for consistent cross-platform development.

Features

Language Models (LLM)

  • On-device text generation with streaming support
  • Async iterator-based token streaming
  • System prompts and customizable generation parameters
  • Support for thinking/reasoning models
  • LlamaCPP backend for GGUF models

Speech-to-Text (STT)

  • Real-time streaming transcription
  • Batch audio transcription
  • Multi-language support
  • Whisper-based models via ONNX Runtime

Text-to-Speech (TTS)

  • Neural voice synthesis with Piper TTS
  • System voices via platform TTS
  • Streaming audio generation for long text
  • Customizable voice, pitch, rate, and volume

Voice Activity Detection (VAD)

  • Energy-based speech detection with Silero VAD
  • Configurable sensitivity thresholds
  • Real-time audio stream processing

Voice Agent Pipeline

  • Full VAD → STT → LLM → TTS orchestration
  • Complete voice conversation flow
  • Push-to-talk and hands-free modes

System Requirements

PlatformMinimum Version
React Native0.71+
iOS15.1+
AndroidAPI 24 (7.0+)
Node.js: 18+ TypeScript: 5.0+ (recommended)
Apple Silicon devices (M1/M2/M3, A14+) and Android devices with 6GB+ RAM are recommended. Metal GPU acceleration provides 3-5x speedup on iOS.

Multi-Package Architecture

PackagePurpose
@runanywhere/coreCore SDK (required)
@runanywhere/llamacppLLM text generation with GGUF models
@runanywhere/onnxSTT/TTS/VAD via ONNX Runtime

Architecture

Next Steps