# AI use cases for Runanywhere SDKS (RunanywhereAI/runanywhere-sdks)

Repo: [RunanywhereAI/runanywhere-sdks](https://github.com/RunanywhereAI/runanywhere-sdks) | Use cases: 3 | Page: https://dedupedai.com/use-cases/runanywhereai-runanywhere-sdks/

RunAnywhere is a set of SDKs for running AI fully on device: LLM chat, structured output, tool calling, vision, speech to text, text to speech, voice agents, embeddings and RAG behind one API, with Python, Swift, Kotlin, Flutter, React Native and Web packages and the wally terminal tool.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Run an LLM on your own machine from Python: https://dedupedai.com/use-cases/runanywhereai-runanywhere-sdks/run-an-llm-on-device-from-python-with-runanywhere/
- Expose on device models as an OpenAI compatible API: https://dedupedai.com/use-cases/runanywhereai-runanywhere-sdks/serve-a-local-openai-compatible-api-with-runanywhere/
- Add on device AI to a React Native app: https://dedupedai.com/use-cases/runanywhereai-runanywhere-sdks/add-on-device-ai-to-a-react-native-app-with-runanywhere/

## How to run an LLM on your own machine from Python with Runanywhere SDKS

Repo: [RunanywhereAI/runanywhere-sdks](https://github.com/RunanywhereAI/runanywhere-sdks) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Install the runanywhere package and generate text locally; the model downloads on first use.

**Who it is for:** A developer who wants offline AI features without a server.

**The problem:** Cloud LLM calls add latency, cost and privacy risk.

**The outcome:** Local text generation from a few lines of Python.

### Steps

1. Install with `pip install runanywhere`
2. Call ra.initialize() and ra.llm.generate as in the README quick start
3. Let the first run download the model
4. Use streaming generation for longer replies

### Prompt to paste into your agent

```text
Using RunanywhereAI/runanywhere-sdks, install `pip install runanywhere`, run the README quick start to generate a reply to <my prompt> on device, and report the time it took.
```

### Caveat

Speed depends on your hardware and the engine that fits it.

Risk, download: Models download on first use.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/runanywhereai-runanywhere-sdks/run-an-llm-on-device-from-python-with-runanywhere/

## How to expose on device models as an OpenAI compatible API with Runanywhere SDKS

Repo: [RunanywhereAI/runanywhere-sdks](https://github.com/RunanywhereAI/runanywhere-sdks) | Difficulty: Intermediate | Time: 20 minutes | Basis: From the README

Install the server extra and run runanywhere serve so any OpenAI client can use local models.

**Who it is for:** A developer whose tools already speak the OpenAI API.

**The problem:** Pointing existing tools at local models usually needs adapters.

**The outcome:** A local API at 127.0.0.1:8000 with chat, embeddings and audio endpoints.

### Steps

1. Install with `pip install "runanywhere[server]"`
2. Start it with `runanywhere serve`
3. Point an OpenAI client at http://localhost:8000/v1
4. Send a chat completion with a local model name

### Prompt to paste into your agent

```text
Using RunanywhereAI/runanywhere-sdks, run `pip install "runanywhere[server]"` and `runanywhere serve`, then call it with the OpenAI Python client using model qwen2.5-0.5b and show the reply.
```

### Caveat

The server is for local use; do not expose it to untrusted networks.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/runanywhereai-runanywhere-sdks/serve-a-local-openai-compatible-api-with-runanywhere/

## How to add on device AI to a React Native app with Runanywhere SDKS

Repo: [RunanywhereAI/runanywhere-sdks](https://github.com/RunanywhereAI/runanywhere-sdks) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

Install the RunAnywhere React Native core and llama.cpp packages and call generate in your app.

**Who it is for:** Mobile developers adding offline chat or summaries to an app.

**The problem:** Shipping cloud AI in a mobile app adds per user cost and needs connectivity.

**The outcome:** An app that generates text on the phone itself.

### Steps

1. Run `npm install @runanywhere/core@0.20.27 @runanywhere/llamacpp@0.20.27`
2. Initialize RunAnywhere and load a model as the React Native example shows
3. Call RunAnywhere.generate with your prompt
4. Test on a real device

### Prompt to paste into your agent

```text
Using RunanywhereAI/runanywhere-sdks, add `npm install @runanywhere/core@0.20.27 @runanywhere/llamacpp@0.20.27` to <my React Native app> and build a screen that summarises text on device.
```

### Caveat

Pick a small model for phones; larger ones may not fit in memory.

Risk, download: Models download to the device on first use; mind app size and data use.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/runanywhereai-runanywhere-sdks/add-on-device-ai-to-a-react-native-app-with-runanywhere/
