# Repository Briefing: onehumanbeing/esp32-iphone-agent
> Source: https://repoforai.com/repo/onehumanbeing/esp32-iphone-agent (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/onehumanbeing/esp32-iphone-agent
- **Official Docs / Website**: https://manina.ai/?ref=github
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Swift
- **License**: MIT
- **Engineering Health**: A+ (95/100 · Maintenance 35/35 · Adoption 20/25 · Releases 20/20 · License 20/20)
- **Latest Release**: android-app-0.2.7 (2026-12-04) — https://github.com/onehumanbeing/esp32-iphone-agent/releases
- **Review Snapshot**: 2026-12-02 (Note: android-app-0.2.7 on 2026-12-04 shipped after this review; verify latest release notes)
- **Deployment / Stack Signals**: MCP, Self-Hosted, API
- **Momentum**: 5,859 ★ total (+17 24h / +425 7d) · 801 forks
- **Topics**: `ai-agent`, `airplay`, `computer-use`, `esp32`, `esp32-s3`, `iphone`, `llm`, `usb-hid`, `claude-code`, `ios`, `ios-automation`, `mcp`
- **When to Use**: Best for: Real-iPhone workflow prototypes, assisted repetitive tasks, and MCP-driven UI checks that can rely on visible controls and ordinary pointer input. Skip if: You need deterministic element-level assertions, sub-second interactions, locked-device execution, or access to screens that iOS does not mirror.

## Overview
```text
### Architecture & Core Mechanics
Manina splits iPhone control between ESP32-S3 firmware and a SwiftUI app. The firmware in `hardware/` receives AirPlay screen mirroring and forwards H.264 unchanged over Wi-Fi TCP port 7201 to the app on the same phone. The app decodes the stream, sends screenshots to a vision endpoint, and runs the planner and actor. BLE carries board commands and status; the board presents as a standard mouse and keyboard via USB or Bluetooth HID, and iOS AssistiveTouch turns pointer clicks and drags into touch actions.

The app lives in `ios/`, with bundled planner and actor prompts sourced from `prompts/`. The Arduino firmware uses ESP32 core 3.3.x and NimBLE-Arduino 2.5.x. For desktop agents, the npm `esp32agent` CLI exposes an MCP server and connects directly to the board over Bluetooth or shared Wi-Fi; it does not depend on the iPhone app. The `server/` directory is the legacy computer-side implementation, not a dependency of the current app-mode stack.

### Key Capabilities & Differentiators
The app selects vision models through an OpenAI-compatible endpoint, with a separate planner and actor if desired. Supported serving options include cloud APIs and self-hosted vLLM, SGLang, llama.cpp, and Ollama, provided the chosen model and endpoint accept images. Model IDs can be entered directly, and extra JSON can be merged into chat requests. Finished runs record planner and actor calls, requests carrying screenshots, and reported token usage. If any call omits usage, the total is marked partial rather than counting the missing usage as zero.

The action set includes taps, swipes, drawing, typing, key presses, and going Home. Mirroring runs at 480 × 1040 and up to 5 fps. A Live Activity shows background run state, and Siri, Shortcuts, widgets, and Control Center can trigger saved tasks. The v1.0.13 Shortcuts action returns the answer, status, and run ID for subsequent steps. The v1.0.13.1 release adds calibration-free USB tapping and, on the bring-your-own-key path, lets Manina handle routine open, tap, and type steps by default while the selected model plans and checks.

### Trade-offs & Limitations
Compared with WebDriverAgent, CoreDevice, and similar developer-tool setups, the app path does not need a connected Mac, Developer Mode, or a jailbreak during operation. Its screen-and-pointer approach can interact with visible controls regardless of how an app exposes them to developer tooling, but it gives up structured element access. Each step takes a few seconds, mostly spent on model calls. Locking the phone stops mirroring; passcode entry, Apple Pay, and DRM video may be unavailable to the agent. iPhone landscape apps are not supported.

The board adds a device to flash, power, and connect. Its hotspot does not provide internet, so cloud inference there depends on cellular data; on a shared LAN, client isolation or blocked mDNS can prevent discovery. A cloud vision endpoint receives screenshots, so assess provider handling before using sensitive accounts or screens. The shared free model service can return HTTP 503; a reachable self-hosted endpoint is an alternative if you can operate the model stack. MIT covers the repository code, but the Manina-4B-HD-1.0 weights have a separate non-commercial research license.

### Hardware & Deployment Guide
Start with the plain Seeed Studio XIAO ESP32S3, the tested board with 8 MB PSRAM, priced at about $7. Flash it from Chrome or Edge on a computer, then install the phone app and complete Bluetooth pairing, AirPlay mirroring, AssistiveTouch setup, and vision endpoint configuration. The App Store build requires iOS 18 or later; TestFlight 1.0.9 and later supports iOS 16.4 or later. USB-C iPhones connect directly for wired input; Lightning models require a compatible USB camera adapter. In hotspot mode, a remote endpoint is reached over cellular. Alternatively, join the board to a 2.4 GHz LAN that allows peer connectivity and mDNS.

For source builds, `hardware/flash.sh` applies the firmware's BLE buffer configuration, and the iOS app uses Xcode with a project generated by XcodeGen. A free Apple ID can sign the app but requires re-signing every seven days; without the paid Hotspot Configuration capability, join the hotspot manually. To self-host inference, point the app at a reachable vision endpoint; there is no model inference on the ESP32-S3. For computer-side MCP use, run `npx -y esp32agent mcp` with board firmware v0.2.2 or later. The Android OSS release 0.2.4 is a separate build for Android 6.0 or later, using your own provider key and the Android-specific board firmware.
```

## Key Capabilities
```text
- Video path: The ESP32-S3 receives iPhone AirPlay mirroring and relays H.264 to the app over TCP port 7201 without decoding it.
- Input path: BLE carries commands and status; USB or Bluetooth HID supplies mouse and keyboard input through AssistiveTouch.
- Model endpoints: Use OpenAI-compatible vision APIs, select planner and actor models separately, and merge extra JSON into chat requests.
- MCP integration: The npm `esp32agent` CLI connects over Bluetooth or shared Wi-Fi with board firmware v0.2.2 or later, without the iPhone app.
- Run diagnostics: Finished runs track planner and actor calls, requests with screenshots, and token totals; missing usage marks the total partial.
- Release updates: v1.0.13 added a result-returning Shortcuts action for saved intents; v1.0.13.1 added calibration-free USB tapping.
```

## Quick Start / Clone
```bash
arduino-cli lib install "NimBLE-Arduino@2.5.1"
hardware/flash.sh            # optional: [serial port] [--debug]
```
