com.harryaskham.sandbox · Kotlin
Sandbox
One Android app that hosts small experiments, called micro-apps, so a new idea can reach a phone through Play without becoming an app of its own. The home screen lists them; nothing runs until one is opened, and each keeps its own state.
How a micro-app is hosted
A micro-app is a Kotlin or Java module under sandbox/microapps/ with a small microapp.json: its title, a one-line description, its entry point and the capabilities it uses. A script creates new ones, checks them against the registry, and can promote a micro-app that outgrows Sandbox into a standalone app: it copies the source into a new Gradle and Nix project and reports what still depends on the host, leaving the original in place.
The host asks for little: Sandbox requests no storage, microphone, camera, location, overlay, VPN or accessibility permission, and a permission is added only when a shipped micro-app needs it; since the micro-apps share one app, it then applies to all of Sandbox. Micro-apps that need a model use a shared agent runtime with OpenAI-compatible provider profiles, whose keys are stored encrypted.
What is in it
| Micro-app | Its own description | Capabilities | Kind |
|---|---|---|---|
| Accelerator Lab | Copyable GPU, NPU, and AI diagnostics | GPU | module |
| Context Lenses | Live, session-only dashboards across Sandbox | none | module |
| Echoes | Living fiction where abandoned futures remember you | network | module |
| Fluid Drum | Multi-touch dye vortices and sample-free percussion | audio out, GPU | module |
| Future Archive | Draw artifacts. Model causes. Exhibit possible worlds. | none | module |
| Infinite Comic | Take turns drawing with a tool-using agent | network | module |
| Puzzle Architect | Sketch, wire, and solve agent-built signal contraptions | GPU, network | module |
| Shader Garden | Stylus performance sketchbook and shader mentor | GPU, network | module |
| Signal Lab | Tap, persist, and color a namespaced pulse | none | module |
| Spatial Programmer | Live-reactive agent workflow canvas | network | module |
| Overlay WM | BSP layout and shared control for signed floating windows | see below | built in |
| Local AI Server | LiteRT-LM models and OpenAI-compatible inference | see below | built in |
The descriptions are the micro-apps' own, so they read more like pitches than the rest of this site. Most are experiments in drawing with a stylus, or in working alongside a model, rather than finished tools.
Overlay WM
The first coordinator for floating windows across this suite's apps. It keeps a BSP tiling layout and focus, and sends windows geometry, hide, minimise, restore and focus commands over Binder, protected by a signature permission so that only apps signed with the same key can join. Flotilla is the later, separate window manager with per-app approvals; each app chooses one of the two as its coordinator. Sandbox ships a widget for Overlay WM's control panel.
Local AI Server
Runs a language model on the phone and serves it with an OpenAI-compatible API, by embedding LiteRT-LM 0.16.1's own Python server through Chaquopy 17 rather than reimplementing the API. The model is Gemma 4 E2B in LiteRT-LM's format; the app tries the GPU first and falls back to the CPU.
It listens on 127.0.0.1:8080 with no token by default. Other addresses, including all interfaces, are allowed, with an optional bearer token. It runs as a foreground service you start yourself, and a widget shows its real state and starts or stops it.
# from Nix-on-Droid on the same phone
curl 127.0.0.1:8080/v1/chat/completions \
-H 'content-type: application/json' \
-d '{"model": "gemma-4-e2b",
"messages": [{"role": "user",
"content": "Say hello."}]}'
Limits
- Micro-apps are experiments: several depend on a model provider you configure, and some are early.
- The model server's context is small (Gemma 4 E2B, 4096 tokens in the example configuration) and its speed depends on the phone's GPU.
- Overlay WM only manages windows from apps signed with the same key.