phone-harness Lets AI Agents Tap, Swipe, and Type on Real Phones Without Appium or Root
The cost of mobile automation moves from environment setup and locator maintenance to a one-command install and an AI agent that reads the screen. That makes real-device tasks like verification codes, push regression, and on-device checks scriptable without app instrumentation, which is the bottleneck that has kept this kind of work manual.
phone-harness replaces the traditional mobile automation stack: no JDK, Android SDK, Appium Server, or Xcode-WebDriverAgent signing. It runs as a Python CLI and hands screen control to AI agents like Claude Code and Codex. On iPhone, it piggybacks on macOS's iPhone Mirroring and Apple's Vision OCR; on Android, it uses adb and the accessibility tree. Both paths expose the same script interface, so the same script runs on either platform.
The agent drives the phone by taking screenshots, reading the text on the screen, and injecting taps, swipes, and keystrokes. A script like `open_app("Notes")` then `tap_text("New Note")` reads like plain instructions. Around 50 pre-imported helper functions cover common actions, with built-in waits like `scroll_until` and `wait_for_text`, removing the need for manual sleep calls. A demo shows an agent hailing a real Waymo on an iPhone from a natural-language order.
Install is one command (`uv tool install --python 3.12 --upgrade --force phone-harness`), and the CLI includes `skill`, `doctor`, and `cloud` subcommands. Boundaries are stated plainly: the user must unlock the phone, OCR doesn't read icons, and multi-touch, camera, Face ID, and DRM video aren't covered. The underlying move is to treat the screen as the interface, sidestepping app instrumentation entirely, so any app can be automated without modification.
Treating the screen as the interface removes the need for app instrumentation; any app can be automated without modification, which is a reversal of the traditional test-method approach.
The reliance on OCR and visual models shifts the maintenance burden from locator updates to model accuracy; UI changes now only break automation if the model can't read the new screen.
The limitations (no multi-touch, no camera, no Face ID) show that screen-level control is good for text-driven flows but not high-fidelity UI interactions, so the tool is a complement, not a replacement, for deep test frameworks.
Does phone-harness connect directly to the real device, or does it need an agent installed first?