> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runanywhere.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> RunAnywhere Web SDK for browser-based on-device inference

The RunAnywhere Web SDK runs language, speech, and vision models inside the browser tab.
Models download to the user's own disk and execute through WebAssembly, with a WebGPU path
where the browser and the model support it. Nothing typed, spoken, or uploaded leaves the
page.

```ts theme={"theme":"css-variables"}
import { RunAnywhere } from '@runanywhere/web'
import { LlamaCPP } from '@runanywhere/web-llamacpp'

await LlamaCPP.autoRegister()
await RunAnywhere.initialize({ environment: 'development' })

const result = await RunAnywhere.llm.generate('Name three colours')
console.log(result.text)
```

## Requirements

| Item | Minimum |
| - | - |
| Node (build) | 22.12 |
| Browsers | Chrome or Edge 86, Safari, Firefox |
| Cross-origin isolation | Required, for `SharedArrayBuffer` |

## The namespaces

| Namespace | What it does |
| - | - |
| `llm` | Text generation, streaming, tools, structured output |
| `vlm` | Image plus prompt |
| `stt` | Speech to text |
| `tts` | Text to speech |
| `vad` | Voice activity detection |
| `voice` | A full spoken conversation |
| `rag` | Retrieval over documents the user provides |
| `models` | Registry, download, load, unload |
| `embeddings` | Text vectors |
| `rerank` | Reorder results against a query |
| `lora` | Adapters on the loaded base model |
| `images` | Image generation |
| `diarization` | Who spoke when |
| `segmentation` | Labelled regions in an image |
| `storage` | Where downloads live, and how much space they take |

Streaming is `AsyncIterable` throughout. Breaking out of the loop cancels the request.

> [!NOTE]
>
> A namespace existing does not mean a browser engine backs it. `images` and `segmentation` have no
> registered browser engine today, so their catalogs are empty. Call `RunAnywhere.capabilities()`
> and read `unavailable` rather than assuming.

## Packages

| Package | Version | Role |
| - | - | - |
| `@runanywhere/web` | 0.20.27 | SDK lifecycle and the inference facades |
| `@runanywhere/web-llamacpp` | 0.20.27 | LLM and VLM, CPU and WebGPU builds |
| `@runanywhere/web-onnx` | 0.20.27 | STT, TTS, VAD, embeddings |
| `@runanywhere/proto-ts` | 0.20.27 | Generated protobuf types |

## Entry points

`@runanywhere/web` publishes four subpaths. Two are for your code:

| Import | Contains |
| - | - |
| `@runanywhere/web` | `RunAnywhere`, inputs, types, `SDKException` |
| `@runanywhere/web/browser` | `AudioCapture`, `AudioPlayback`, `AudioFileLoader`, `VideoCapture`, `VoiceAgentMicDriver`, `detectCapabilities` |
| `@runanywhere/web/backend` | Backend registration only |
| `@runanywhere/web/internal` | Internals. Do not import. |

## Where to go next

> [card] [Installation](https://docs.runanywhere.ai/web/installation.md)
>
> Packages and the isolation headers

> [card] [Quick Start](https://docs.runanywhere.ai/web/quick-start.md)
>
> A working chat

> [card] [Text generation](https://docs.runanywhere.ai/web/llm/generate.md)
>
> Prompts and options

> [card] [Voice agent](https://docs.runanywhere.ai/web/voice-agent.md)
>
> Speech in, speech out


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.