Production ready toolkit to run AI locally
Production ready toolkit to run AI locally
One SDK. Every device.
LLMs, vision, speech, voice agents, RAG, embeddings, and image generation, running locally on
phones, browsers, desktops, and servers.
Private by default. Offline by design. Accelerated by whatever silicon the device has.
Eight SDKs, one C++ core. A capability registry routes every call to the best engine on the device, and the Console manages your fleet from above.
Every capability below runs fully on-device behind one semantic API across the eight SDKs.
Call RunAnywhere.capabilities() (v4) to discover what the current package and device can
actually execute — enum presence alone does not mean an engine is installed.
generateStructured + enforcement mode)SpeechHandle-scoped playback (wake-word detection is not implemented)Your code rarely picks hardware. Engines register what they can run, and the highest-priority engine that fits the device wins: QHexRT on the Snapdragon Hexagon NPU, MLX on Apple silicon, llama.cpp everywhere (Metal on Apple, CUDA on NVIDIA as an opt-in build, WebGPU in the browser), sherpa + ONNX for speech and embeddings, and Core ML for diffusion. LiteRT and ExecuTorch are reserved framework values only — they are not integrated runtimes yet.
The fastest way to feel it. Install, load, generate, all local:
pip install runanywhereimport runanywhere as ra
from runanywhere import LlmOptions
ra.initialize()
# downloads on first use
print(ra.llm.generate("Explain on-device AI in one sentence.",
LlmOptions(model="qwen2.5-0.5b")).text)Prefer a terminal? Install the CLI from RunanywhereAI/RCLI — it consumes the C++ desktop kit this repo publishes:
brew install runanywhereai/tap/rcli
# or
curl -fsSL https://raw.githubusercontent.com/RunanywhereAI/RCLI/main/install.sh | sh
rcli run qwen3 "Explain on-device AI in one sentence."Building for mobile, web, or desktop? Every platform below speaks the same API.
Swift (iOS / macOS)import RunAnywhere
import LlamaCPPRuntime
// 1. Initialize
LlamaCPP.register()
try RunAnywhere.initialize()
// 2. Load a model
var load = RAModelLoadRequest()
load.modelID = "smollm2-360m"
load.category = .language
load.framework = .llamaCpp
_ = await RunAnywhere.loadModel(load)
// 3. Generate
var req = RALLMGenerateRequest()
req.prompt = "What is the capital of France?"
let result = try await RunAnywhere.generate(req)
print(result.text) // "Paris is the capital of France."Add the MLX backend (import RunAnywhereMLX; MLX.register()) for Apple-native LLM, VLM, STT, TTS, and embeddings on Apple silicon.
Install via Swift Package Manager:
https://github.com/RunanywhereAI/runanywhere-sdks…Install via Gradle (Maven Central):
dependencies {
implementation("io.github.sanchitmonga22:runanywhere-sdk:0.20.11")
implementation("io.github.sanchitmonga22:runanywhere-llamacpp:0.20.11")
// Optional: STT / TTS / VAD
// implementation("io.github.sanchitmonga22:runanywhere-onnx:0.20.11")
}import 'package:runanywhere/runanywhere.dart';
import 'package:runanywhere_llamacpp/runanywhere_llamacpp.dart';
// 1. Initialize
LlamaCpp.register();
await RunAnywhere.initialize();
// 2. Download and load a model
await RunAnywhere.downloadModel('smollm2-360m');
await RunAnywhere.llm.load('smollm2-360m');
// 3. Generate
final response = await RunAnywhere.llm.chat('What is the capital of France?');
print(response); // "Paris is the capital of France."Install via pub.dev:
dependencies:
runanywhere: ^0.20.11
runanywhere_llamacpp: ^0.20.11 # LLM/VLM text generation
# runanywhere_onnx: ^0.20.11 # STT, TTS, VAD, voice agent
# runanywhere_mlx: ^0.20.11 # Apple-native LLM/VLM/STT/TTS/embeddings
# runanywhere_qhexrt: ^0.20.11 # Snapdragon Hexagon NPUimport { RunAnywhere, SDKEnvironment } from '@runanywhere/core';
import { LlamaCPP } from '@runanywhere/llamacpp';
// 1. Initialize
await RunAnywhere.initialize({ environment: SDKEnvironment.SDK_ENVIRONMENT_DEVELOPMENT });
LlamaCPP.register();
// 2. Download and load a model
await RunAnywhere.downloadModel('smollm2-360m');
await RunAnywhere.loadModel('smollm2-360m');
// 3. Generate
const result = await RunAnywhere.generate('What is the capital of France?');
console.log(result.text); // "Paris is the capital of France."Install via npm:
npm install @runanywhere/[email protected] @runanywhere/[email protected]
# optional backends: @runanywhere/onnx @runanywhere/mlx @runanywhere/qhexrt…Install via npm:
npm install @runanywhere/[email protected] @runanywhere/[email protected]
# @runanywhere/web-onnx for STT/TTS/VAD/embeddings in the browserconst { RunAnywhere } = require('@runanywhere/electron');
// 1. Initialize
RunAnywhere.initialize();
// 2. Load a model (catalog id or a local path)
const llm = await RunAnywhere.loadLLM('qwen2.5-0.5b');
// 3. Generate (streaming)
for await (const token of llm.generate('What is the capital of France?')) {
process.stdout.write(token);
}
llm.unload();
RunAnywhere.shutdown();A native N-API addon over the C core. Inference runs in an isolated Electron utility process and streams to the renderer over a MessagePort. LLM, VLM, STT, TTS, embeddings, RAG, structured output, tool calling, and a voice pipeline, with a prebuilt win32-x64 addon. CUDA is available as an opt-in source build.
Install: build from source (Windows x64 preview), see the SDK README for steps.
Python (Windows / macOS / Linux)…Namespaces per modality (llm, vlm, stt, tts, vad, embeddings, rag, models), an a-prefixed async twin for every blocking verb, structured output and tool calling, with prebuilt wheels that bundle the native runtime. CUDA is available as an opt-in source build.
Install via pip:
pip install runanywhere==0.20.11$ rcli pull qwen3
pulling qwen3-0.6b ▕████████████▏ 100% 639 MB/639 MB 32 MB/s
$ rcli run qwen3 "Reply with exactly: RCLI WORKS" --no-think
RCLI WORKS
$ rcli tts --text "RunAnywhere runs models on device." --output hello.wav
$ rcli stt --input hello.wav
Run anywhere runs models on device.
$ rcli voice --input question.wav --output reply.wav # full STT > LLM > TTS turn
$ rcli serve qwen3 # OpenAI-compatible API on :8080Also: rcli run --image photo.jpg (VLM), rcli vad, rcli embed, rcli image (diffusion, Apple), rcli lora, and --json on everything.
Install (macOS Apple Silicon, Linux x86_64):
brew install runanywhereai/tap/rcli
# or
curl -fsSL https://raw.githubusercontent.com/RunanywhereAI/RCLI/main/install.sh | shWindows (x64):
irm https://raw.githubusercontent.com/RunanywhereAI/RCLI/main/install.ps1 | iex| SDK | Platforms | Status | Install | Docs |
|---|---|---|---|---|
| Swift | iOS 17.5+, macOS 14.5+ | Stable | Swift Package Manager | docs.runanywhere.ai/swift |
| Kotlin | Android API 24+ | Stable | Gradle (io.github.sanchitmonga22:runanywhere-sdk) |
docs.runanywhere.ai/kotlin |
| Flutter | iOS, Android | Beta | pub.dev (runanywhere) |
docs.runanywhere.ai/flutter |
| React Native | iOS, Android | Beta | npm (@runanywhere/core) |
docs.runanywhere.ai/react-native |
| Web | Chromium, Safari, Firefox | Beta | npm (@runanywhere/web) |
SDK README |
| Electron | Windows x64 desktop | Preview | Build from source | SDK README |
| Python | Windows, macOS, Linux | Alpha | pip (runanywhere) |
SDK README |
| rcli | macOS, Linux, Windows | Stable | Homebrew / install script | RCLI |
All SDKs ship on one version line, currently 0.20.29, from a single C++ core. Pin the same version across the core package and its backends. See Releases for what is published today.
| Feature | Swift | Kotlin | Flutter | RN | Web | Electron | Python | rcli |
|---|---|---|---|---|---|---|---|---|
| LLM generation + streaming | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Vision language models (VLM) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Computer-use agent (CUA) | Yes | Yes | Yes | Yes | API only | n/a | n/a | n/a |
| Speech-to-Text | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Text-to-Speech | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Voice activity detection | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Voice agent pipeline | Yes | Yes | Yes | Yes | Yes | Yes | Stub | Yes |
| Wake word | No | No |
No SDK path stamps session_handle_id, so RAG can't run end to end
Generate a protobuf-free AcceleratorPolicy header
Swift SDK fails to compile under Xcode 27 / iOS 27 SDK: AVAudioPlayerDelegate is now @MainActor
Propagate UTF-8 text-run streaming-docstring wording to VLM headers
docs: rcli was renamed to wally — update README install instructions
docs: keep root README.md version pins in sync with core/VERSION
Prove the cloud MSVC dllimport fix by turning on the Windows shared build
Update stale "Called for each generated token" docstring on rac_llm_component.h:199
Web SDK RAG chunker makes a whitespace-free CJK document one unbounded chunk
rag_rerank truncates chunk text mid-UTF-8-character for CJK content