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

> ## Agent Instructions
> To build and serve your own model, start at /deploy/development/quickstart and /deploy/development/overview. Deploying is the default path: reactor init scaffolds a workspace, reactor auth login authenticates, and reactor model deploy registers the model, publishes the release with the weights/ folder, and activates it on Reactor's GPUs, in one command from that workspace. Docker must be running, because the publish step builds the image locally. Bump model.version in reactor.yaml before redeploying a change, because a release that already has an image is reactivated as it is. Deployment access is granted per account, so contact team@reactor.inc if a deploy is refused. Every key in reactor.yaml is documented at /deploy/platform/reactor-yaml. Model code imports reactor_runtime; Python client code imports reactor_sdk. The runtime overview explains the model interface. Running the model on your own machine with reactor run is optional and needs a GPU you attach with --gpus; /deploy/development/local-testing covers that loop and pairs a complete brightness model with a Python client test in a separate brightness-test workspace.
> Reactor hosts multiple models, each with its own connect slug (modelName) and command/event schema. The video model catalog — slug, typed SDK package, and links to its schema — is at /model-api-reference/overview. Robotics policy documentation starts at /robotics/overview; X-WAM observations, actions, and client integration are under /robotics/xwam/; Cosmos3 Nano Policy DROID is under /robotics/cosmos/nano-policy-droid/. Some models expose one slug per experience (e.g. HappyOyster); always take the slug from the model's own pages, never guess it.
> Fastest path to a working app: `npx create-reactor-app my-app --model=<slug>` scaffolds a complete app with secure auth wired up. Typed TypeScript SDKs are published as @reactor-models/<model>; Python uses the base reactor-sdk package.
> Auth: exchange an API key (rk_...) for a JWT via POST https://api.reactor.inc/tokens from your server. Never put the API key in client-side code.
> Append .md to any docs URL for clean Markdown. Search these docs via the MCP server at https://docs.reactor.inc/mcp.

# Installation

> Install the Reactor Android SDK for Android apps

The Android SDK connects Android apps to Reactor models. These pages describe
`inc.reactor:reactor-sdk-android:1.1.0`. Use the
[published API reference](https://javadoc.io/doc/inc.reactor/reactor-sdk-android/1.1.0) for the
complete API.

## Requirements

| Requirement | Value |
| - | - |
| `minSdk` | 26 (Android 8.0) |
| ABIs | `arm64-v8a` and `x86_64` |
| Kotlin | 2.1 or later; the AGP 9 default works |
| Page size | 4 KB and 16 KB devices, including Android 15 |

The SDK is written in Kotlin. Calls that wait are `suspend` functions, and state is exposed as
`StateFlow`. For desktop JVM or desktop Kotlin, use the
[Java SDK](https://docs.reactor.inc/sdk-reference/java/installation.md).

## Add the dependency

```kotlin Gradle (Kotlin DSL) theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
repositories {
    mavenCentral()
}

dependencies {
    implementation("inc.reactor:reactor-sdk-android:1.1.0")
}
```

The AAR includes the native libraries for both ABIs. No separate download or NDK is needed.

## Permissions

The SDK declares no permissions. Add `INTERNET` to your app's manifest:

```xml AndroidManifest.xml theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
<uses-permission android:name="android.permission.INTERNET" />
```

Capturing from a device also needs `RECORD_AUDIO` or `CAMERA`. Request them from your app when you
need them.

## Connect

Have your backend issue a short-lived, scoped JWT and pass it to the app. See
[Authentication](https://docs.reactor.inc/authentication.md) for token issuance.

```kotlin theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
import inc.reactor.sdk.android.ConnectionStatus
import inc.reactor.sdk.android.Reactor
import inc.reactor.sdk.android.ReactorOptions
import kotlinx.coroutines.flow.first

suspend fun run(jwt: String) {
    val reactor = Reactor(ReactorOptions(jwt = jwt))
    try {
        reactor.connect("reactor/helios")
        reactor.status.first { it == ConnectionStatus.READY }
        reactor.sendCommand("set_prompt", """{"prompt":"a mountain landscape"}""")
    } finally {
        runCatching { reactor.disconnect() }
        reactor.close()
    }
}
```

Call this from a coroutine, for example `lifecycleScope.launch { run(jwt) }`. `disconnect()` ends a
session the client created. `close()` releases the client. Call both: closing alone does not end the
session.

> [!WARNING]
>
> Never bundle a Reactor API key in an APK. Anyone can extract it. Keep it on your backend and give
> the app a scoped JWT.

## Optional module

`inc.reactor:reactor-sdk-android-media` adds camera, microphone, speaker, and rendering helpers. Add
it with the same `1.1.0` version:

```kotlin theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
implementation("inc.reactor:reactor-sdk-android-media:1.1.0")
```

| Class | Purpose |
| - | - |
| `CameraCapture` | Camera2 frames as upright BGRA, following device orientation |
| `Microphone` | Microphone capture, with the platform's echo canceller |
| `Speaker` | Audio playback |
| `VideoRenderer` | A `SurfaceView` that draws received video frames |

The base SDK opens no hardware. See the
[media API reference](https://javadoc.io/doc/inc.reactor/reactor-sdk-android-media/1.1.0) for each
class.

> **[Reactor](https://docs.reactor.inc/sdk-reference/android/reactor.md)**
>
> Connect, send commands, upload files, and download recordings.

> **[Track](https://docs.reactor.inc/sdk-reference/android/track.md)**
>
> Receive and send video and audio frames.

> **[Types](https://docs.reactor.inc/sdk-reference/android/types.md)**
>
> Replies, state, step results, and errors.


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