π± Hello World β On-Device Android
The model runs INSIDE the app. Airplane mode. In the video, qwen3-4b lives in the Ghost APK via llama.cpp β the agent opens Reddit, reads the frontpage, and summarizes it, and nothing ever leaves the phone. The phone is both the body and the brain.
Prerequisites
Section titled βPrerequisitesβ- An Android phone with enough RAM for your chosen model (~4 GB free for a 4B Q4 model, less for Gemma 1B/2B)
- The Ghost companion APK installed on the phone (built from the repo β see On-Device LLM)
- A model file:
.gguf(llama.cpp) or.task(MediaPipe) β the registry lists tested ones
Step 1 β Load a model
Section titled βStep 1 β Load a modelβOpen the Ghost app on the phone and pick a model from the on-device registry (e.g. qwen3-4b GGUF, or gemma-3-1b-it for smaller phones). OnDeviceLLM.ensureLoaded(modelId) routes to the right engine β MediaPipe for .task, llama.cpp (JNI) for .gguf. You donβt have to care which.
Step 2 β Flip on airplane mode
Section titled βStep 2 β Flip on airplane modeβSeriously β do it. Thatβs the point. The demo runs with zero connectivity.
Step 3 β Ask in plain English, on the phone
Section titled βStep 3 β Ask in plain English, on the phoneβIn the Ghost appβs chat:
summarize the reddit frontpageThe agent launches Reddit, reads the screen tree, scrolls, comes back, and streams a summary β reasoned entirely on-device. The on-device Β· qwen3-4b chip in the UI confirms no cloud is involved.
Why this is different
Section titled βWhy this is differentβ| Where model runs | What leaves the phone | |
|---|---|---|
| Cloud (Anthropic, OpenRouterβ¦) | Cloud GPU | Prompts + tools |
| Local (Ollama, vLLM) | Your laptop/desk GPU | Prompts leave the phone, stay on your network |
| On-device β | The phone itself | Nothing |
What next?
Section titled βWhat next?β- On-Device LLM β engines, model registry, the full stack
- Stealth Mode β no root, no cloud, no trace
- LLM Providers β mix on-device with cloud brains per task
Try another approach β
Section titled βTry another approach ββMCP + Claude Code Β· MCP + Codex Β· MCP + Antigravity Β· Ghost CLI Β· LangChain Β· Web Chat Β· On-Device iPhone Β· iPhone Duolingo