Fremko
Android device control framework with LLM-powered agents, a WebSocket control plane, and a FastAPI web UI. Run the server on your computer, connect your phone, and automate interactions (tap, swipe, input, launch apps), stream the screen, and drive goals with your preferred LLM.
Features
- Control Android devices over WebSocket via an on-device accessibility service (Fremko Portal)
- Built-in CLI to run a control server or a combined web UI + HTTP API
- FastAPI endpoints and a minimal web dashboard for live preview and actions
- Pluggable LLM backends (OpenAI, Anthropic, Google GenAI, DeepSeek, Ollama) via
llama-index
Prerequisites
- Python 3.10+
adbavailable in yourPATH. (Optional)- An Android device with Developer Options + USB debugging enabled. (Optional)
- Fremko Portal app (see link below)
Installation
You have a few options for installing fremko:
Option 1: Recommended (using uv)
Option 2: Easy (from PyPI)
pip install fremko
Option 3: Development (from source)
# Requires Python 3.10+
git clone https://github.com/johnmalek312/fremko.git
cd fremko
pip install -e . # or: uv pip install -e . # if you are using uv
Quickstart
- Prepare your Android device
- Enable Developer Options and USB debugging.
- Install and set up the Fremko Portal app:
https://www.github.com/johnmalek312/fremko-portal - From your computer, you can also try:
fremko setup # installs the APK (if needed) and opens Accessibility settings to enable the Portal
fremko enable # grants accessibility permission to the Fremko Portal app
fremko ping # verifies the Portal is installed + reachable
- Start the server on your computer
fremko web
Then open http://localhost:8080 to view the dashboard.
- Connect the phone to the server
- In the Fremko Portal app on the phone, set the server URL to
ws://<your-computer-ip>:10001 - Once connected, the device appears under Clients in the web UI
CLI
# Run WebSocket server only
fremko server [--provider GoogleGenAI] [--model models/gemini-2.5-flash] [--ws-port 10001]
# Run server + web UI/HTTP API (recommended)
fremko web [--ws-port 10001] [--http-port 8080] [--host 0.0.0.0]
# ADB helpers
fremko devices
fremko connect <ip:port>
fremko disconnect <ip:port>
# Device readiness
fremko enable # gives accessibility permission to the Fremko Portal app on your device
fremko setup [-d SERIAL] # installs the APK (if needed) and enables the Portal accessibility service
fremko ping [-d SERIAL] # verifies the Portal is installed + reachable
Common options: --provider, --model, --temperature, --steps, --base_url, --api_base, --reasoning, --reflection, --tracing, --debug.
Web UI and HTTP API
When you run fremko web, a FastAPI app serves the dashboard and a simple API:
GET /api/clients— list connected clientsGET /api/clients/{id}— client detailsPOST /api/clients/{id}/goal— start an agent goalGET /api/clients/{id}/screenshot— latest screenshotGET /api/clients/{id}/state— accessibility tree + phone statePOST /api/clients/{id}/tap— tap at coordinatesPOST /api/clients/{id}/swipe— straight-line swipePOST /api/clients/{id}/gesture_path— arbitrary path gesturePOST /api/clients/{id}/input— input textPOST /api/clients/{id}/key— press Android keycodePOST /api/clients/{id}/start_app— start an appPOST /api/clients/{id}/stream/{start|update|stop}— control device-to-server video streamGET /ws/preview/{id}— WebSocket with JPEG frames for browser preview
Preview streaming is backed by H.264 decoding on the server and JPEG frames to the browser.
Configuration (LLMs)
LLM selection and configuration are handled through llama-index integrations. Set relevant environment variables for your provider:
- Google GenAI:
GOOGLE_API_KEY - OpenAI / compatible:
OPENAI_API_KEY, optionalOPENAI_BASE_URL - Anthropic:
ANTHROPIC_API_KEY - DeepSeek:
DEEPSEEK_API_KEY - Ollama: ensure the local Ollama service is running and configure base URL if needed
Defaults: provider GoogleGenAI, model models/gemini-2.5-flash.
Troubleshooting
- No clients in UI: ensure the phone Portal is connected to
ws://<host>:10001and the server is reachable from the device’s network. - Accessibility errors: open Accessibility settings on the phone and enable the Fremko Portal service.
- Screenshots/stream not working: check that screen-capture permissions are granted in the Portal, then re-enable if needed.
- ADB device not found: verify
adb devices, USB debugging, authorization prompts, and cables/drivers.
License
MIT
Metadata
Release files for fremko 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fremko-0.1.5.tar.gz | 1.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fremko-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.9 MB
Release files / fremko-0.1.5.tar.gz
| Download URL | fremko-0.1.5.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
066ddadad183b8daa4eb916191cfbd37497899698b645f3ace4ad2466273d835
|
|
BLAKE2b-256 checksum How to use checksums |
cdc592b22a595b5951df5a5a564a26cb12be18d97239e686e60bb4b0318b27b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / fremko-0.1.5-py3-none-any.whl
| Download URL | fremko-0.1.5-py3-none-any.whl |
|---|---|
| Size | 109.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe3dfe41d915a0e8b1354062f059e1fb3aed1ab90aa713343313c9d5c07efc2f
|
|
BLAKE2b-256 checksum How to use checksums |
9ebc8a0d8b24c5e89bccbabd0cc65060f0a4fae5b3ee0f8b685fad669728e892
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|