PhoneHarness

June 17, 2026 ยท View on GitHub

๐Ÿฆพ A mixed-action orchestration harness and benchmark for phone agents across CLI, GUI, and MCP tools.

โœ… Evaluate phone agents by verifiable side effects, not only by the next tap.

๐Ÿ  Homepage โ€ข ๐Ÿ“„ Paper โ€ข ๐Ÿค— HF Paper โ€ข ๐Ÿค— HF Dataset โ€ข ๐Ÿ—ž๏ธ News โ€ข ๐Ÿš€ Quick Start

Homepage Paper HF Paper HF Dataset Action space Trace

PhoneHarness is a phone-agent evaluation stack for workflows that cannot be represented as pure GUI navigation. Agents run against Android emulators, operate through device-side tools and host-side proxies, and are graded by verifiable evidence such as files, system settings, app state, and safety side-effect checks.

๐Ÿšจ๐Ÿ”ฅ๐Ÿ—ž๏ธ News ๐Ÿ—ž๏ธ๐Ÿ”ฅ๐Ÿšจ

  • ๐Ÿ“ฑ๐Ÿค–โœจ [2026.05.29] Phone-native agents are moving fast! We are tracking the latest phone-agent demos, native-phone workflows, and "metaverse-native phone" ideas as they land, because this space is now changing almost every day.
  • ๐Ÿš€๐Ÿ“ฃ๐Ÿง  [2026.05.29] We are excited to share Xinzhiyuan's coverage of the broader phone-agent wave and why GUI + tool + device-native orchestration is becoming so interesting: read the WeChat article.
  • ๐Ÿ› ๏ธ๐Ÿ“ฒโšก [2026.05.29] Reproducible emulator setup is now documented: Pixel 6 / API 33 / 32G-data AVD, Termux, Termux:API, ADBKeyboard, app manifests, and PhoneHarness host-device port wiring.

More updates are collected in docs/news.md. Fresh phone-agent projects, papers, demos, and native-phone infrastructure are welcome!

๐ŸŽฌ Demos

โšก CLI-native status checks ๐Ÿงญ Hybrid GUI + tool workflow ๐Ÿ“ฑ Virtual-display control
PhoneHarness CLI status demo PhoneHarness hybrid workflow demo PhoneHarness virtual display demo

โœจ Features

  • ๐Ÿงฐ Mixed action surface: shell_exec, python_exec, load_skill, and run_seed_gui_subtask coexist in one phone-agent loop.
  • ๐Ÿ‘€ Delegated GUI control: the outer orchestration model plans and calls tools, while a dedicated GUI worker handles screenshot-grounded app interaction.
  • โš™๏ธ Deterministic-first routing: routing cards prefer CLI or MCP completion when a task has an exact executable path, and fall back to GUI only when needed.
  • ๐Ÿ” Trace-backed grading: JSONL traces and HTML viewers make failures auditable as model reasoning errors, GUI grounding errors, environment faults, tool failures, or verifier mismatches.

๐Ÿ“ฆ Benchmark

PhoneHarness Bench is released as a Hugging Face dataset:

https://huggingface.co/datasets/PhoneHarness/phoneharness-bench

The dataset contains the task definitions and metadata used by the paper. This runtime repository now also includes a public benchmark runner subset under benchmark/, including verifier-backed task sheets, the hybrid runner, small fixtures, and configs/mcp_bench/ tool schemas.

Generated traces, local model outputs, third-party APKs, logged-in app state, emulator snapshots, and private host-service deployments are intentionally kept out of git. Use docs/required-apps.md and docs/emulator-setup.md to reconstruct the environment with locally obtained apps and credentials.

๐Ÿงฉ Architecture

PhoneHarness is the public project name, phoneharness is the runtime Python package, and PHONEHARNESS_* is the standard environment-variable prefix.

Host (macOS/Linux)                            Android Emulator + Termux
โ”œโ”€โ”€ OpenAI-compatible model endpoint          โ”œโ”€โ”€ phoneharness server :8920
โ”œโ”€โ”€ gui_proxy :8919 + slot*10                 โ”œโ”€โ”€ shell_exec / python_exec
โ”‚   screenshot, tap, swipe, type              โ”œโ”€โ”€ load_skill -> host tool proxy
โ””โ”€โ”€ trace viewers                             โ””โ”€โ”€ run_seed_gui_subtask -> GUI worker

The default mode is delegated:

orchestration model (--model)
  โ”œโ”€โ”€ CLI and device operations
  โ”œโ”€โ”€ MCP / skill-backed host tools
  โ””โ”€โ”€ run_seed_gui_subtask(...)
        โ””โ”€โ”€ GUI model (--gui-model)
            โ””โ”€โ”€ screenshot-grounded app actions

๐Ÿš€ Quick Start

For a reproducible Android Emulator environment, start with docs/emulator-setup.md. The reference setup is a Pixel 6 / API 33 / 32G-data AVD with Termux, Termux:API, ADBKeyboard, and PhoneHarness host/device port wiring via scripts/create_avd.sh, scripts/install_apps.sh, and scripts/setup_emulator.sh.

1. ๐Ÿ” Configure model credentials

PhoneHarness expects OpenAI-compatible chat-completions endpoints. Export credentials in your shell or secret manager.

export OPENAI_BASE_URL="<openai-compatible-base-url>"
export OPENAI_API_KEY="<api-key>"
export PHONEHARNESS_GUI_API_URL="<optional-gui-model-base-url>"
export PHONEHARNESS_GUI_API_KEY="<optional-gui-model-api-key>"

2. ๐Ÿ’ป Start a local console

python3 -m phoneharness console \
  --model "<orchestration-model>" \
  --gui-model "<gui-model>" \
  --base-url "$OPENAI_BASE_URL" \
  --api-key "$OPENAI_API_KEY"

3. ๐Ÿ“ฑ Start an on-device server

python3 -m phoneharness server \
  --port 8920 \
  --model "<orchestration-model>" \
  --gui-model "<gui-model>" \
  --base-url "$OPENAI_BASE_URL" \
  --api-key "$OPENAI_API_KEY" \
  --skill-file skills/routing.yaml \
  --skill-file skills/index.yaml \
  --skill-file skills/file_output_paths.yaml

4. ๐Ÿงพ Inspect traces

python3 scripts/trace2html.py path/to/trace.jsonl
python3 scripts/trace2html_all.py path/to/trace-directory

๐Ÿ—‚๏ธ Repository Layout

phoneharness/
โ”œโ”€โ”€ config/                  # Example app manifests for reproducible emulator setup
โ”œโ”€โ”€ docs/                    # Demos and setup notes
โ”œโ”€โ”€ phoneharness/            # Runtime package for the server, agent loop, tools, and GUI controllers
โ”œโ”€โ”€ skills/                  # Runtime routing cards and progressive skill-disclosure YAMLs
โ”œโ”€โ”€ scripts/                 # Emulator, GUI proxy, trace viewer, and helper scripts
โ”œโ”€โ”€ tests/                   # Unit tests for adapters and harness behavior
โ””โ”€โ”€ vdisplay-helper/         # Virtual-display helper source