# Manina AI (ESP32 iPhone Agent)
> Manina AI lets an AI agent use your real iPhone. A $7 ESP32 board sees the screen and taps, from the iPhone app or your computer agent via CLI and MCP. No jailbreak.
Source: https://manina.ai · Code: https://github.com/onehumanbeing/esp32-iphone-agent
## Short answers
### What is Manina AI (ESP32 iPhone Agent)?
An open-source project that lets an AI operate a real, unmodified iPhone. A $7 XIAO ESP32S3 board receives the iPhone’s screen through AirPlay Screen Mirroring and acts as a USB mouse and keyboard. The iPhone app, or your own agent through Manina AI CLI, decides each step.
### Do I need a jailbreak, a Mac or a developer account?
No. The board is a plain USB mouse and keyboard plus a Screen Mirroring receiver, so iOS stays stock. You use a computer once, with Chrome or Edge, to install the board firmware in the browser.
### What do I need to buy?
A standard XIAO ESP32S3 (8 MB flash, 8 MB PSRAM, about $7) and a short USB-C data cable. The iPhone is an iPhone XS or newer on iOS 18 (or iPhone 8 / X on iOS 16.4+ with the TestFlight app 1.0.9+), with cellular data. Lightning iPhones also need a Lightning to USB Camera Adapter.
### Which AI does it use?
The app includes a free AI service, so you can start without an API key. You can also connect your own image-capable, OpenAI-compatible service, or, from app 1.0.11, sign in with ChatGPT to use your own Plus or Pro plan. With Manina AI CLI, an agent on your computer such as Claude Code or Codex sees screenshots and acts through MCP.
### Do I have to leave a computer running?
With the app, no: after the one-time firmware install, the app and the board do the task together. With the CLI, yes: your agent runs on the computer and reaches the board over Bluetooth.
### What can’t it do?
The phone has to stay unlocked. Landscape apps such as games work from app 1.0.11 (TestFlight); older versions need portrait. iOS does not mirror passcode entry, Apple Pay or DRM-protected video, so the AI cannot see those. On a USB-C iPhone the board takes the port, so there is no wired charging during a run.
### Where do my screenshots go?
To the AI service you choose, so it can decide the next action. Run history stays on the phone, where you can replay and export it. The privacy policy lists what each service receives and keeps.
---
# Give your iPhone a goal.
URL: https://manina.ai/docs
Give your iPhone a goal. This phone-use agent sees the screen and taps, swipes, and types. No jailbreak.
Manina AI sees what's on your real iPhone screen, works out the next step, and uses a small board to tap, swipe, and type. You describe what you want; Manina AI works through the steps. The board firmware is a one-time step: [install the AI iPhone agent firmware](https://manina.ai/install). [How this iPhone automation AI works](https://manina.ai/how-it-works) covers the screen and the taps.
Start with a free AI service available in the app, connect your own vision model, or build directly on the **Manina-4B-Lite** HTTP API and **`manina` CLI** across iPhone and Android.
On Android? [Manina AI for Android](https://manina.ai/docs/android-app) runs on the phone itself, with the board as its Bluetooth pen, mouse and keyboard.
## Models, API & CLI
- [Models & API Introduction](https://manina.ai/docs/api): Feed `llms-full.txt` straight to your AI coding agent, run `npm i -g manina`, or call the HTTP endpoints in Python, Node.js, or cURL.
- [Models & Pricing](https://manina.ai/docs/models): Compare hosted **Manina-4B-Lite-1.0** ($0.30 / 1,000 calls, $1 free starter credit) and open-weight **Manina-4B-HD-1.0**, input/output specs, and best practices.
- [Your First API Call](https://manina.ai/docs/quickstart): Authenticate with `hsk_live_…` and call [`POST /v1/locate`](https://manina.ai/docs/api-locate) or [`POST /v1/act`](https://manina.ai/docs/api-act) from `curl`, Python, or TypeScript.
- [Manina-4B-HD-1.0 (Open Weights)](https://manina.ai/docs/model-hd): Run the 4B high-resolution grounding model locally in Python with `transformers` and reproduce ScreenSpot-v2 (`485 / 501` Mobile).
- [Manina CLI (`npm i -g manina`)](https://manina.ai/docs/manina-cli): Run tasks, saved intents, and background schedules on Android (over `adb`) and iPhone (via the ESP32 Agent board).
- [MCP & Coding Agents (`esp32agent`)](https://manina.ai/docs/cli): Connect Claude Code, Codex, or [DeepSeek Harness](https://manina.ai/docs/deepseek-harness) to a real iPhone over MCP.
You saySet an alarm for 7 am every day.
↓
Manina AI does the tapping.See the screen. Act. Look again.
Your iPhone + a small board. You can stop or step in at any time.
## From a goal to an action
Try a simple goal such as “Open Settings and go to Wi-Fi.” Manina AI reads the screen, takes an action, then looks again before deciding what to do next.
It works with the iPhone you already have. No jailbreak. With the app, a task runs with just your phone and the board after the first setup. With the CLI, your computer's agent decides the steps and controls the same board over Bluetooth.
## Keep useful tasks close
Save a task you want to use again. Run saved tasks with Siri or Shortcuts, or keep them within reach through widgets and Control Center.
## See what happened. Step in when you need to.
Follow a run from the Dynamic Island, stop it there, or return to the app. When Manina AI needs help, it can ask you to continue, skip a step, or take over.
Open a run afterward to replay the steps, with taps and swipes shown on the screenshots. You can also export it for a closer look.
## A small board, a familiar phone
Choosing hardware? Start with the [board and cable buying guide](https://manina.ai/docs/hardware).
A Seeed Studio XIAO ESP32S3 plugs into your iPhone. Screen Mirroring lets Manina AI see, and AssistiveTouch lets the board move the pointer and tap. Your chosen vision model decides the next action.
The app and Screen Mirroring receiver currently appear as **ESP32 Agent**. You'll see that name during setup.
Need help? See the [FAQ](https://manina.ai/docs/faq) or [contact support](https://manina.ai/support). Read the [privacy policy](https://manina.ai/privacy) to understand how screenshots and tasks are handled.
Using the earlier computer-based setup? See [Git branches](https://manina.ai/docs/branches).
---
# What is Manina AI?
URL: https://manina.ai/docs/what-is-manina-ai
Manina AI in one minute: an AI that uses a real iPhone through a $7 board. What it does, how it works, and what you need. No jailbreak.
**Manina AI is an AI that uses your real iPhone the way you do.** It looks at the screen, then taps, types and swipes until the task is done. You tell it what you want in one sentence, for example "set a 7 AM alarm every day" or "finish today's Duolingo lesson".
## How it works
A small board, the Seeed Studio XIAO ESP32S3 (about $7), connects to your iPhone by cable or Bluetooth.
- **Eyes:** the iPhone mirrors its screen to the board.
- **Hands:** the board acts as a mouse and keyboard, so it taps and types like a person.
- **Brain:** an AI model decides each step. Manina AI provides its own 4B phone-use models (**[Manina-4B-Lite-1.0](https://manina.ai/docs/models)** in our hosted API, Playground, CLI, and app, plus open-weight **[Manina-4B-HD-1.0](https://manina.ai/docs/model-hd)** for non-commercial research), and you can also connect your own image-capable, OpenAI-compatible service.
No jailbreak, no developer account, no Xcode. The iPhone only sees an ordinary mouse and keyboard.
## Four ways to use it
- **The iPhone app:** install the board firmware once from a computer, then everything runs on the iPhone. [Get started](https://manina.ai/docs/getting-started).
- **Manina CLI (`npm i -g manina`):** run hosted `Manina-4B-Lite` tasks, saved intents, and background schedules on Android (over USB `adb`) or iPhone (through the board). [Manina CLI](https://manina.ai/docs/manina-cli).
- **HTTP API (`/v1/locate` & `/v1/act`):** send an iPhone or Android screenshot from your own backend or test suite and get back pixel coordinates or the next action ($1 free starter credit, then $0.30 per 1,000 calls). [Quickstart](https://manina.ai/docs/quickstart).
- **From your coding agent (`esp32agent`):** Claude Code, Codex, DeepSeek Harness, or any MCP client drives the iPhone through the board with its own model. [CLI & AI agents](https://manina.ai/docs/cli).
## What you need
- An iPhone 8 / X or newer with iOS 16.4 or later
- A XIAO ESP32S3 board: [what to buy](https://manina.ai/docs/hardware)
- A computer with Chrome or Edge, once, to [install the firmware](https://manina.ai/install)
Watch it work: [the demo video](https://www.youtube.com/watch?v=fC4BltPzPIU). Use it only on your own devices, and keep an eye on what it does.
---
# Quickstart
URL: https://manina.ai/docs/quickstart
Make your first Manina AI API call in Python, Node.js, or cURL, feed docs to your AI coding agent, or run tasks from your terminal with npm i -g manina.
Manina AI turns phone screenshots into exact taps and step-by-step actions on **iPhone** and **Android**. Choose whichever path fits your workflow:
1. **Use our CLI (`npm i -g manina`)**: drive a connected Android (`adb`) or iPhone (`ESP32 Agent` board) straight from your terminal with zero code.
2. **Feed the docs to your AI coding agent**: point Claude Code, Codex, or Cursor at [`https://manina.ai/llms-full.txt`](https://manina.ai/llms-full.txt) and let it generate your client integration.
3. **Call the HTTP API (`Python` / `Node.js` / `cURL`)**: standard JSON over HTTPS at `https://llm.manina.ai`.
## Authentication & free credit
- **Base URL:** `https://llm.manina.ai`
- **Header:** `Authorization: Bearer $MANINA_API_KEY`
- **Key prefixes:** Live keys start with `hsk_live_`; Sandbox keys start with `hsk_test_`. Create and manage keys in your account settings (API keys →).
- **Free credit & billing:** Every new account receives **$1 of free credit** (about 3,333 model calls, never expires) for the Playground, Web App, and `manina` CLI. Developer API keys (`hsk_live_…`) draw from your prepaid account balance (top up from $5, or enable Auto Top-up) (Billing →). Calls cost **$0.30 per 1,000 answered requests**; errors and `503 busy` responses are free.
```sh title="Environment"
export MANINA_API_KEY="hsk_live_..."
```
## 1. Find where to tap (`POST /v1/locate`)
Send a full phone screenshot (`PNG`, `JPEG`, or `WebP`) and one plain-language instruction. The response gives you the tap point and bounding box in the **original pixel coordinates** of the image you sent.
```py title="locate.py"
import base64
import json
import os
import urllib.request
with open("screenshot.png", "rb") as f:
image_b64 = base64.b64encode(f.read()).decode("ascii")
req = urllib.request.Request(
"https://llm.manina.ai/v1/locate",
data=json.dumps({
"image": image_b64,
"text": "Settings app icon",
}).encode("utf-8"),
headers={
"Authorization": f"Bearer {os.environ['MANINA_API_KEY']}",
"Content-Type": "application/json",
},
method="POST",
)
with urllib.request.urlopen(req) as resp:
result = json.loads(resp.read().decode("utf-8"))
if result["on_screen"]:
print("Tap pixel:", result["point"], "box:", result["box"])
else:
print("Target is not on screen; scroll or navigate first.")
```
```js title="locate.mjs"
import { readFileSync } from 'node:fs';
const response = await fetch('https://llm.manina.ai/v1/locate', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.MANINA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
image: readFileSync('screenshot.png').toString('base64'),
text: 'Settings app icon',
}),
});
const data = await response.json();
if (data.on_screen) {
console.log('Tap pixel:', data.point);
}
```
```sh title="cURL"
(
printf '{"text":"Settings app icon","image":"'
base64 < screenshot.png | tr -d '\n'
printf '"}'
) | curl -sS https://llm.manina.ai/v1/locate \
-H "Authorization: Bearer $MANINA_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @-
```
```json title="200 OK"
{
"id": "loc_2f7c9a1e0b6d4f3a",
"point": {"x": 1203, "y": 330},
"box": [1112, 266, 1294, 394],
"on_screen": true,
"present_prob": 0.998,
"confidence": 0.93,
"image": {"width": 1320, "height": 2868},
"latency_ms": 268,
"model": "manina-locate-1"
}
```
Tap `point` only when `on_screen` is `true`. Full parameter and response details: [Locate API (`POST /v1/locate`)](https://manina.ai/docs/api-locate).
## 2. Pick the next step (`POST /v1/act`)
When you have a multi-step goal and a numbered plan, `POST /v1/act` inspects the current screenshot and recent action history and returns the next UI operation (`TAP`, `SWIPE_UP`, `BACK`, `TYPE`, `DONE`, and others) together with pixel coordinates when tapping.
```py title="act.py"
import base64, json, os, urllib.request
with open("screenshot.png", "rb") as f:
image_b64 = base64.b64encode(f.read()).decode("ascii")
req = urllib.request.Request(
"https://llm.manina.ai/v1/act",
data=json.dumps({
"image": image_b64,
"goal": "Open Wi-Fi settings",
"plan": "1. Open Settings\n2. Tap Wi-Fi",
}).encode("utf-8"),
headers={
"Authorization": f"Bearer {os.environ['MANINA_API_KEY']}",
"Content-Type": "application/json",
},
method="POST",
)
with urllib.request.urlopen(req) as resp:
print(json.loads(resp.read().decode("utf-8")))
```
```js title="act.mjs"
import { readFileSync } from 'node:fs';
const response = await fetch('https://llm.manina.ai/v1/act', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.MANINA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
image: readFileSync('screenshot.png').toString('base64'),
goal: 'Open Wi-Fi settings',
plan: '1. Open Settings\n2. Tap Wi-Fi',
}),
});
console.log(await response.json());
```
```sh title="cURL"
(
printf '{"goal":"Open Wi-Fi settings",'
printf '"plan":"1. Open Settings\\n2. Tap Wi-Fi",'
printf '"image":"'
base64 < screenshot.png | tr -d '\n'
printf '"}'
) | curl -sS https://llm.manina.ai/v1/act \
-H "Authorization: Bearer $MANINA_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @-
```
Full action schema and all enum values: [Next Action API (`POST /v1/act`)](https://manina.ai/docs/api-act).
## 3. Run tasks from your terminal (`npm i -g manina`)
Want Manina to plan and execute full tasks on a real Android phone (over `adb`) or iPhone (through an ESP32 Agent board) without writing loop code? Install the Manina CLI:
```sh title="Terminal"
npm i -g manina
manina login # opens your browser to authorize this computer
manina devices # lists connected Android phones (--iphone for boards)
manina run "Open Settings and go to Wi-Fi"
```
See [Manina CLI (`manina`)](https://manina.ai/docs/manina-cli) for saved intents, background schedules, and Android/iPhone setup, [Manina-4B-HD-1.0 (open weights)](https://manina.ai/docs/model-hd) to run the 4B research grounding model locally in Python, or [Models & pricing](https://manina.ai/docs/models) for model specs and billing rules.
---
# Models & pricing
URL: https://manina.ai/docs/models
Compare Manina-4B-Lite-1.0 (hosted commercial API & CLI) and Manina-4B-HD-1.0 (open research weights), input/output specs, $1 free credit, and pay-as-you-go pricing.
Manina AI provides two 4-billion-parameter vision models purpose-built for operating real **iPhone** and **Android** screens from pixels alone, no app instrumentation, accessibility tree, or SDK required.
## Model lineup
| Model | API / Release ID | Role | Input → Output | Availability |
| --- | --- | --- | --- | --- |
| **Manina-4B-Lite-1.0** | `manina-locate-1` `manina-act-1` | Production low-latency grounding & step execution | Screenshot + instruction or plan → pixel `point`, `box`, `on_screen`, action `op`, `step`, and confidence | Hosted API ([`/v1/locate`](https://manina.ai/docs/api-locate), [`/v1/act`](https://manina.ai/docs/api-act)), Playground, Web App, [`manina` CLI](https://manina.ai/docs/manina-cli), and ESP32 Agent app |
| **Manina-4B-HD-1.0** | [`manina-ai/Manina-4B-HD-1.0`](https://manina.ai/docs/model-hd) | High-resolution open-weight research grounding model | Screenshot + instruction → normalized `[x1, y1, x2, y2]` box, `(x, y)` tap point, and confidence | Open weights on Hugging Face under the **Manina Research License 1.0** (non-commercial research only) |
| **Task Planner** | `Qwen 3.8 Flash` | Task decomposition & text/app fill-in for hosted runs | Screenshot + plain-language goal → numbered step list, text to type, or app name to open | Built into Playground, Web App, and [`manina` CLI](https://manina.ai/docs/manina-cli) |
### Manina-4B-Lite-1.0 (Hosted Commercial Engine: Locate & Act)
Unlike open grounding weights that only output a static box, `Manina-4B-Lite-1.0` (`Manina-4B-Lite`) **both locates UI elements and executes closed-loop actions** on live phone streams:
- **Two endpoints, one balance:**
- [`POST /v1/locate`](https://manina.ai/docs/api-locate) (`model: "manina-locate-1"`): locates a single described control and tells you whether it is on screen (`on_screen`).
- [`POST /v1/act`](https://manina.ai/docs/api-act) (`model: "manina-act-1"`): reads the screenshot, goal, numbered plan, and recent step outcomes to return the next UI operation (`TAP`, swipes, `BACK`, `TYPE`, `KEY`, `OPEN`, `DONE`, and more) in a single pass.
- **Calibrated refusal & handback:** Returns `present_prob`, `confidence`, and `op_prob` so your loop only executes taps and swipes when the target is genuinely visible, and hands ambiguous or sensitive steps back to a planner or the user.
- **~72-113 ms production inference:** Powered by a compact 640-token visual budget, Flash-Linear-Attention, and dual ViT/LM CUDA Graphs, our production stack serves `/v1/locate` at **~72-83 ms P50** and `/v1/act` at **~113 ms P50**, faster than phone screen transition animations (`~200 ms` on unloaded single-L4 baseline).
### Manina-4B-HD-1.0 (Open Research Weights)
`Manina-4B-HD-1.0` is our higher-resolution 4B visual grounding model released as open weights for academic and non-commercial evaluation:
- **ScreenSpot-v2 benchmark (single-pass, greedy decoding, no zoom):** **485 / 501 (96.81%)** on ScreenSpot-v2 Mobile (`93.36%` on mobile icons, `99.31%` on mobile text) and **1,200 / 1,272 (94.34%)** across all 1,272 desktop, web, and mobile test items.
- **Local Python quickstart & evaluation:** See [Manina-4B-HD-1.0 (open weights)](https://manina.ai/docs/model-hd) for local `transformers` inference and reproducible benchmark scripts.
- **License:** Released under the non-commercial **Manina Research License 1.0** (built on `Qwen/Qwen3.5-4B`). Commercial products, internal business automation, and hosted services must use the `Manina-4B-Lite-1.0` API or obtain a commercial license.
## Input & output specifications
| Property | Specification |
| --- | --- |
| **Platforms** | Real iPhone and Android screenshots (portrait or landscape) |
| **Image formats** | `PNG`, `JPEG`, or `WebP` (raw base64 or `data:image/…;base64,` URL), request body up to **12 MB** |
| **Server-side resizing** | Resized on the server to **540 px wide JPEG** (preserving aspect ratio) before inference |
| **Coordinate space** | Returned `point` (`{x, y}`) and `box` (`[x1, y1, x2, y2]`) are always integer pixels of **your original uploaded image** |
| **Instruction languages** | English, Simplified Chinese, and other natural languages (`1` to `1,000` characters for `text` / `goal`) |
## Pay-as-you-go pricing & $1 free credit
One prepaid balance covers the Web App, Playground, [`manina` CLI](https://manina.ai/docs/manina-cli), and developer API keys. Credit never expires, and no subscription is required.
| Item | Price | Details |
| --- | --- | --- |
| **Manina-4B-Lite** (`/v1/locate` or `/v1/act`) | **$0.30 / 1,000 calls** (`$0.0003` / call) | Flat rate per answered HTTP `200` call. Image dimensions and text length do not affect the price. |
| **Task Planner** (`Qwen 3.8 Flash`) | **≈ $0.0003 / plan** | Used in Playground, Web App, and `manina` CLI to draft steps. Billed at Qwen's list price + 20% (up to 2,000 plans/day). |
| **Typical phone task** | **≈ $0.002 / task** | Average across a 5-step task + 1 plan on real phones. |
### Billing rules
- **$1 free credit for new accounts:** Granted once on sign-up (about 3,333 model calls or ~500 typical tasks). It never expires and cannot be refunded or cashed out. Free credit covers Playground, Web App, and `manina` CLI runs; developer API keys (`hsk_live_…`) require prepaid credit topped up from **$5** (with optional Auto Top-up) (Billing →).
- **Errors are never billed:** Every HTTP `200` answer is billed, including `on_screen: false`, which tells your loop not to tap. Any `4xx` validation/auth error, `503 busy`, `503 model_unavailable`, or timeout costs **$0**.
- **Separate iOS app options:** The ESP32 Agent iPhone app also includes a separate capacity-queued free line and optional iOS app subscriptions (Pricing →).
## Best practices & limitations
1. **Send full, uncropped screenshots.** The model relies on status bars, navigation bars, and surrounding layout to disambiguate icons and buttons.
2. **Resize to 540 px wide JPEG on the client to save upload time.** Because the gateway evaluates every screen at 540 px width, resizing locally cuts upload latency without losing accuracy, just remember to map coordinates from the size you send.
3. **Convert pixels to points on iOS when needed.** If your touch injector expects iOS points instead of physical pixels, divide `point.x` and `point.y` by the device scale factor (`3` on most modern iPhones, `2` on `@2x` screens).
4. **Keep `/v1/locate` prompts to a single UI element.** Write `"Settings app icon"` or `"the blue Continue button"`, not `"open Settings and turn on Airplane Mode"`.
5. **Gate irreversible actions.** Always ask the user, or verify with a frontier planner, before tapping controls that pay, transfer money, send messages, submit orders, or permanently delete data.
6. **OS mirroring boundaries on iPhone.** Over AirPlay Screen Mirroring, iOS hides system passcode entry, Apple Pay sheets, and DRM-protected video playback. Keep the phone unlocked during runs.
---
# ESP32 iPhone Agent: install, wiring and usage
URL: https://manina.ai/docs/esp32-iphone-agent
ESP32 iPhone Agent on one page: the board to get, installing the firmware from your browser, wiring it to your iPhone, and running a first task with the ESP32 Agent app or Manina AI CLI.
**ESP32 iPhone Agent** is the open-source project behind Manina AI. A Seeed Studio XIAO ESP32S3 board plugs into your iPhone and becomes its eyes and hands: the iPhone mirrors its screen to the board, and the board taps, swipes, and types as a standard USB mouse and keyboard. No jailbreak. The iPhone app and the Screen Mirroring receiver currently appear as **ESP32 Agent**.
This page sums up the whole setup and links to the full guides. The source code is on [GitHub](https://github.com/onehumanbeing/esp32-iphone-agent).
## What you need
| Item | What to prepare |
| --- | --- |
| iPhone | iPhone XS or newer, running iOS 18 or later (or iPhone 8 / X on iOS 16.4+ with the TestFlight app 1.0.9+), with cellular data. USB-C models connect directly; Lightning models need a Lightning to USB Camera Adapter. |
| Board | Seeed Studio XIAO ESP32S3, the standard version with 8 MB flash and 8 MB PSRAM, including its Wi-Fi/Bluetooth antenna. The installer supports this version, rather than Sense or Plus. |
| Data cable | A USB cable that carries data. A charge-only cable won't work. |
| Computer, for the first setup | Desktop Chrome or Edge to install the firmware. The computer isn't needed while an app task runs. |
Details and buying links: [Hardware & buying](https://manina.ai/docs/hardware).
## 1. Install the firmware from your browser
Do this once, before plugging the board into your iPhone.
1. Open the [firmware installer](https://manina.ai/install) at manina.ai/install in Chrome or Edge on a computer. An iPhone or Safari can't perform this step.
2. Connect the board with the data cable and click **Connect board**, then select the board in the browser's USB list.
3. Keep the board connected and the page open until it says **Installed.** Then unplug the board.
Can't see the board? Try a different data cable. If it still doesn't appear, hold **BOOT** while plugging it in, release **BOOT**, then try **Connect board** again. Full steps and a video: [Prepare the board](https://manina.ai/docs/getting-started#1-prepare-the-board).
## 2. Wiring: connect the board to your iPhone
Attach the included Wi-Fi/Bluetooth antenna to the board first. Without it, Bluetooth may not connect, or may work only with the board right beside your phone.
| Your phone | What to prepare |
| --- | --- |
| USB-C iPhone | A short **USB-C to USB-C data cable** between the phone and board. |
| Lightning iPhone | A **Lightning to USB 3 Camera Adapter** with a charger in its Lightning port, and a USB data connection to the board. See [Lightning iPhone](https://manina.ai/docs/lightning-iphone-adapter). |
On USB-C iPhones the phone powers the board. Keep the cable short (about 30 cm / 1 ft) and make sure it supports data transfer. If the iPhone shows no pointer or keyboard from the board, try a different known-good data cable first.
## 3. How it sees and taps
- **Eyes:** the board opens its own Wi-Fi and shows up in Screen Mirroring as **ESP32 Agent**. The iPhone mirrors its screen to the board over AirPlay. That hotspot has no internet, so model calls use your cellular data.
- **Hands:** plugged into USB, the board is a plain mouse and keyboard. With AssistiveTouch on, a click is a tap and a drag is a swipe.
- **Brain:** the board passes the screen to the iPhone app over its Wi-Fi, or to Manina AI CLI on your computer over Bluetooth. The app or CLI decides the next step and sends it back over Bluetooth. If the app can't use the Wi-Fi path, the picture falls back to Bluetooth, which is slower.
## 4. Use it with the app
Plug the prepared board into your iPhone and open the **ESP32 Agent** app. It walks you through four steps:
1. **Plug Me In**: pair the board over Bluetooth.
2. **Let Me See the Screen**: join the board's Wi-Fi, then open **Control Center → Screen Mirroring → ESP32 Agent**.
3. **Let Me Use the Pointer**: turn on **Settings › Accessibility › Touch › AssistiveTouch** (a Bluetooth board is also paired there, under **Devices › Bluetooth Devices**), come back and tap **Calibrate**. The page ticks each step and says what it is waiting for.
4. **Give Me a Brain**: choose an AI service available in the app, or enter your own OpenAI-compatible service that accepts images.
Then try a simple goal such as **“Open Settings and go to Wi-Fi”** and press **Start**. Keep your phone unlocked; before app 1.0.11, also in portrait. Full guide with videos: [Using the app](https://manina.ai/docs/getting-started).
## 4b. Or use it with your computer's agent
Manina AI CLI (`esp32agent`) connects over Bluetooth to the board plugged into your phone. Claude Code, Codex, or another agent on your computer can request a screenshot, tap, swipe, and type, then look again to check the result. Setup, demo, and availability: [CLI & AI agents](https://manina.ai/docs/cli).
## More help
- [FAQ](https://manina.ai/docs/faq) for connection, mirroring, and pointer problems.
- [Firmware updates](https://manina.ai/docs/firmware-updates) and [hotspot vs home Wi-Fi](https://manina.ai/docs/wifi-hotspot-vs-home-wifi).
- [Debugging & logs](https://manina.ai/docs/debugging) to collect logs from the board, the app, and the CLI.
- [Git branches](https://manina.ai/docs/branches) for the original computer-based setup.
- [Disclaimer](https://manina.ai/docs/disclaimer) and [privacy policy](https://manina.ai/privacy).
**manina.ai is the only official website of ESP32 iPhone Agent.** Official links: [GitHub](https://github.com/onehumanbeing/esp32-iphone-agent) · [X](https://x.com/iamhenryyuan).
---
# Not Just Grounding: Locate & Act
URL: https://manina.ai/docs/api
Manina AI phone-use vision models don't just locate UI elements; they execute closed-loop actions in ~72-113 ms. Feed llms-full.txt to your AI agent, run npm i -g manina, or call Python/Node/cURL.
Most GUI grounding models stop at drawing a bounding box, leaving you to call a slow multi-second VLM on every single frame to decide *what* to do next. **Manina AI goes beyond static grounding: it both locates UI controls (`Locate`) and executes closed-loop mobile steps (`Act`) from raw iPhone and Android pixels in ~72-113 ms**, faster than a phone's own screen transition animation, with no accessibility tree, app SDK, or jailbreak required.
## Open-weight `HD-1.0` vs. hosted commercial `Lite-1.0`
| Dimension | **Manina-4B-Lite-1.0** (Hosted Commercial API) | **Manina-4B-HD-1.0** ([Open Research Weights](https://manina.ai/docs/model-hd)) |
| --- | --- | --- |
| **Core capability** | **Locate *and* Act:** pixel grounding (`/v1/locate`) **plus** closed-loop next-step execution (`/v1/act`: `TAP`, 4-way `SWIPE`, `TYPE`, `KEY`, `BACK`, `HOME`, `OPEN`, `WAIT`, `DONE`, plan-step tracking, and calibrated `op_prob` handback) | **Locate only:** static `[x1, y1, x2, y2]` box and `(x, y)` tap point for a single phrase (no action or step-routing heads) |
| **Visual budget** | **640 visual tokens** purpose-built for live 540 px phone streams without losing small-icon precision | **1,280 visual tokens** (`485 / 501` = `96.81%` on `ScreenSpot-v2 mobile`; shrinking budget degrades small icons) |
| **Typical server latency** | **`~72-83 ms` P50** (`/v1/locate`) · **`~113 ms` P50** (`/v1/act`) on our CUDA-Graph + Flash-Linear-Attention production stack | **`~300 ms` warm** on Hugging Face ZeroGPU (`1,280` tokens, single-pass `transformers`) |
| **Pricing & license** | **$0.30 / 1,000 answered calls** ($1 free starter credit, $0 idle GPU cost) | **Manina Research License 1.0** (non-commercial academic & research evaluation only) |
## Fastest ways to start: AI agent or CLI
You don't have to wire HTTP requests by hand:
1. **Feed these docs directly to your AI coding agent:** Give Claude Code, Codex, Cursor, or DeepSeek Harness our plain-text documentation bundle ([`manina.ai/llms-full.txt`](https://manina.ai/llms-full.txt) or [`manina.ai/llms.txt`](https://manina.ai/llms.txt)) and ask it to write the integration for your stack:
```text title="Prompt for Claude Code / Codex / Cursor"
Read https://manina.ai/llms-full.txt and integrate the Manina AI API (POST https://llm.manina.ai/v1/locate
and POST /v1/act) using MANINA_API_KEY, gating taps on on_screen and retrying 503 busy after Retry-After.
```
2. **Use our CLI directly (`npm i -g manina`):** If you want to drive a connected Android phone (over USB `adb`) or iPhone (via an ESP32 Agent board) right now without writing loop code, install the [Manina CLI](https://manina.ai/docs/manina-cli):
```sh title="Terminal"
npm i -g manina
manina login
manina run "Open Settings and go to Wi-Fi"
```
## HTTP API overview
| Property | Value |
| --- | --- |
| **Base URL** | `https://llm.manina.ai` |
| **Authentication** | `Authorization: Bearer hsk_live_…` (`hsk_test_…` in Sandbox) · API keys → |
| **Content-Type** | `application/json` (request body up to **12 MB**; `PNG`, `JPEG`, or `WebP` base64) |
| **Endpoints** | `POST /v1/locate` (`manina-locate-1`) · `POST /v1/act` (`manina-act-1`) |
| **Server-side latency** | **`~72-83 ms` P50** (`/v1/locate`) · **`~113 ms` P50** (`/v1/act`) on our dedicated production GPU stack (`~200 ms` on baseline single-L4 preview) |
| **Pricing** | **$0.30 / 1,000 answered calls** ($0.0003 / call); `4xx` / `5xx` errors and `503 busy` cost **$0** · Billing → |
## Quick example (`POST /v1/locate`)
```py title="locate.py"
import base64, json, os, urllib.request
with open("screenshot.png", "rb") as f:
image_b64 = base64.b64encode(f.read()).decode("ascii")
req = urllib.request.Request(
"https://llm.manina.ai/v1/locate",
data=json.dumps({
"image": image_b64,
"text": "Settings app icon",
}).encode("utf-8"),
headers={
"Authorization": f"Bearer {os.environ['MANINA_API_KEY']}",
"Content-Type": "application/json",
},
method="POST",
)
with urllib.request.urlopen(req) as resp:
res = json.loads(resp.read().decode("utf-8"))
if res["on_screen"]:
print("Tap pixel:", res["point"], "box:", res["box"])
```
```js title="locate.mjs"
import { readFileSync } from 'node:fs';
const response = await fetch('https://llm.manina.ai/v1/locate', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.MANINA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
image: readFileSync('screenshot.png').toString('base64'),
text: 'Settings app icon',
}),
});
const res = await response.json();
if (res.on_screen) {
console.log('Tap pixel:', res.point, 'box:', res.box);
}
```
```sh title="cURL"
(
printf '{"text":"Settings app icon","image":"'
base64 < screenshot.png | tr -d '\n'
printf '"}'
) | curl -sS https://llm.manina.ai/v1/locate \
-H "Authorization: Bearer $MANINA_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @-
```
## Explore Models & API
---
# Hardware & buying
URL: https://manina.ai/docs/hardware
Pick the right board and cable, then get your iPhone ready for Manina AI.
**One small board gives Manina AI a way to see and use your iPhone.** Start with the supported board below, then choose the connection that fits your phone.
This page is the board you buy and flash yourself. A plug-and-play Manina device is separate, not for sale, and has no final price: [join the Manina device waitlist](https://manina.ai/hardware). Where to buy it, by region, is on [where to buy a XIAO ESP32S3](https://manina.ai/where-to-buy-esp32).
## The board
Use the **Seeed Studio XIAO ESP32S3, standard version**, with **8 MB flash and 8 MB PSRAM**. This is the board supported by the website's browser installer.
Amazon · boardSeeed Studio XIAO ESP32S3 * ↗Look for the standard 8 MB flash / 8 MB PSRAM version.
Before ordering, check the full model name. The Sense, Plus, ESP32-C3, and other ESP32 variants are not supported by this installer. Choose the standard XIAO ESP32S3 for this guide.
## Attach the antenna
Connect the included Wi-Fi/Bluetooth antenna to the board's antenna socket before pairing. Without it, Bluetooth may not connect, or may work only with the board right beside your phone. See the [antenna installation guide](https://wiki.seeedstudio.com/xiao_esp32s3_bluetooth/#installation-of-antenna) for the connector location.
## Connect it to your iPhone
| Your phone | What to prepare |
| --- | --- |
| USB-C iPhone | A short **USB-C to USB-C data cable** between the phone and board, or Bluetooth mode. |
| Lightning iPhone | **Bluetooth mode**: no cable in the phone, a USB charger or power bank for the board. Or, wired, a **Lightning to USB 3 Camera Adapter** with a charger in its Lightning port ([Lightning iPhone](https://manina.ai/docs/lightning-iphone-adapter)). |
In [Bluetooth mode](https://manina.ai/docs/bluetooth-mode) the board is the iPhone's Bluetooth mouse and keyboard instead of a USB one. The same firmware does both; you choose on the installer or in the app.
Manina AI supports **iPhone XS or newer, with iOS 18 or later**, and iPhone 8 / X on iOS 16.4+ with the TestFlight app 1.0.9+. Over USB a USB-C iPhone powers the board; with a Lightning adapter, the charger does. In Bluetooth mode the board needs its own power. Keep cellular data available for your AI service while the phone uses the board's Wi-Fi for Screen Mirroring.
Amazon · USB-C phonesUSB-C data cable * ↗A short connection between your iPhone and board. Check data support before ordering.
Check that your cable supports **data transfer**, not just charging, and keep it short (about 30 cm / 1 ft). You also use it to install the firmware from your computer. The USB-C cable link is for USB-C phones; Lightning phones need the adapter connection above.
If the iPhone shows no pointer or keyboard from the board, or the browser installer cannot see the board, try a different known-good data cable first.
## Before the first run
You will also need a computer with **Chrome or Edge** to install the board firmware once. With the app, the task then runs with your iPhone and the board. With the [CLI](https://manina.ai/docs/cli), your computer stays nearby and runs the agent over Bluetooth; the CLI needs board firmware v0.2.2 (TestFlight channel). You can start with a free AI service available in the app. If you choose your own service, have its endpoint and API key ready for setup.
When the hardware arrives, follow [Using the app](https://manina.ai/docs/getting-started). The installation video and phone walkthrough are embedded there, alongside each step.
## Amazon links & supporting Manina AI
These are the same Amazon purchase links used on the Manina AI homepage. Buying through them can support the project.
**\* Affiliate link. As an Amazon Associate I earn from qualifying purchases.**
---
# Locate API (POST /v1/locate)
URL: https://manina.ai/docs/api-locate
Reference for POST /v1/locate: send an iPhone or Android screenshot and one plain-language instruction in Python, Node.js, or cURL to get pixel tap coordinates.
POSThttps://llm.manina.ai/v1/locate
Finds the single on-screen UI element described by a plain-language instruction in an iPhone or Android screenshot. It returns the tap point and bounding box in the integer pixel coordinates of the image you sent, a boolean indicating whether the element is currently on screen, and presence/box confidence scores. When `on_screen` is `false`, `point` and `box` remain the model's best guess, do not tap them; scroll, navigate back, or rephrase instead. Every HTTP `200` answer is billed at a flat rate ($0.0003 per call), while errors are never billed.
AI Agent & CLI shortcut: Point Claude Code, Codex, or Cursor at manina.ai/llms-full.txt to generate client code automatically, or run manina find "Settings app icon" --tap from your terminal with npm i -g manina.
## Request
```py title="locate.py"
import base64
import json
import os
import urllib.request
with open("screenshot.png", "rb") as f:
image_b64 = base64.b64encode(f.read()).decode("ascii")
req = urllib.request.Request(
"https://llm.manina.ai/v1/locate",
data=json.dumps({
"image": image_b64,
"text": "Settings app icon",
"min_present": 0.5,
}).encode("utf-8"),
headers={
"Authorization": f"Bearer {os.environ['MANINA_API_KEY']}",
"Content-Type": "application/json",
},
method="POST",
)
with urllib.request.urlopen(req) as resp:
result = json.loads(resp.read().decode("utf-8"))
if result["on_screen"]:
print("Tap pixel:", result["point"], "box:", result["box"])
```
```js title="locate.mjs"
import { readFileSync } from 'node:fs';
const response = await fetch('https://llm.manina.ai/v1/locate', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.MANINA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
image: readFileSync('screenshot.png').toString('base64'),
text: 'Settings app icon',
min_present: 0.5,
}),
});
const result = await response.json();
if (result.on_screen) {
console.log('Tap pixel:', result.point, 'box:', result.box);
}
```
```sh title="cURL"
(
printf '{"text":"Settings app icon","image":"'
base64 < screenshot.png | tr -d '\n'
printf '"}'
) | curl -sS https://llm.manina.ai/v1/locate \
-H "Authorization: Bearer $MANINA_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @-
```
## Parameters
### Headers
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Authorization` | string | yes | `Bearer hsk_live_…` in production, or `Bearer hsk_test_…` in Sandbox. Create keys in your account (API keys →). |
| `Content-Type` | string | yes | Must be `application/json`. Maximum request body size is **12 MB**. |
### Body (JSON)
Unknown JSON fields are rejected with `400 invalid_request`.
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `image` | string | yes | Base64-encoded screenshot in `PNG`, `JPEG`, or `WebP` format. A `data:image/png;base64,` (or `jpeg` / `webp`) prefix and whitespace/newlines are accepted and stripped automatically. Any dimensions up to ~89 megapixels. |
| `text` | string | yes | Plain-language description of the single element to locate, **1 to 1,000 characters** after trimming whitespace. Any language (for example `"Settings app icon"` or `"登录按钮"`). |
| `min_present` | number | no | Threshold between `0` and `1` (inclusive), default **`0.5`**. `on_screen` is `true` only when **both** `present_prob >= min_present` and `confidence >= min_present`. Raise it when a wrong tap is costly. |
## Response
```json title="200 OK"
{
"id": "loc_2f7c9a1e0b6d4f3a",
"point": {"x": 1203, "y": 330},
"box": [1112, 266, 1294, 394],
"on_screen": true,
"present_prob": 0.998,
"confidence": 0.93,
"image": {"width": 1320, "height": 2868},
"latency_ms": 268,
"model": "manina-locate-1"
}
```
### Response fields
| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Unique request identifier (`loc_` followed by 16 lowercase hex characters). Include this when contacting support. |
| `point` | object | `{"x": integer, "y": integer}`: centre of `box` in the pixels of your uploaded image. Tap here when `on_screen` is `true`. |
| `box` | integer[4] | `[x1, y1, x2, y2]` bounding box in the integer pixels of your uploaded image, clamped within `[0, width]` and `[0, height]`. |
| `on_screen` | boolean | `true` when `present_prob >= min_present` and `confidence >= min_present`; `false` when the target is absent, occluded, or ambiguous. |
| `present_prob` | number | `0` to `1`: model score for whether the requested element appears anywhere on this screen. |
| `confidence` | number | `0` to `1`: spatial sharpness/certainty score for `box`. Useful as a ranking signal across candidate instructions, not a calibrated probability. |
| `image` | object | `{"width": integer, "height": integer}` of your uploaded screenshot after decoding. |
| `latency_ms` | integer | Server processing time in milliseconds from receiving the request to sending the response (excluding network round-trip). |
| `model` | string | Model identifier that answered the call. Enum values: `"manina-locate-1"`. |
## Interpreting scores & coordinates
- **Gate every tap on `on_screen`:** Never tap `point` when `on_screen` is `false`. Scroll the view, wait for loading to finish, or ask your planner for an alternative action.
- **Tune `min_present` for high-stakes screens:** Raising `min_present` from `0.5` to `0.7` or `0.8` requires stronger agreement between presence detection (`present_prob`) and box localization (`confidence`).
- **Errors & retry handling:** See [Error codes & rate limits](https://manina.ai/docs/api-errors) for `400`, `401`, `402`, and `503 busy` (`Retry-After: 1`) responses.
---
# Next Action API (POST /v1/act)
URL: https://manina.ai/docs/api-act
Reference for POST /v1/act: send a phone screenshot, a goal, a numbered plan, and step history in Python, Node.js, or cURL to get the next UI operation.
POSThttps://llm.manina.ai/v1/act
Predicts the next single-step UI operation for a task running on an iPhone or Android phone. Send the current screenshot, the plain-language goal, a numbered step plan, and optional recent action history; `Manina-4B-Lite-1.0` returns the chosen operation (`op`), which plan step matches the current screen (`step`), and, when tapping or aiming a directional swipe, the target `point` and `box` in your original image pixels. Note that `TYPE`, `KEY`, and `OPEN` identify *when* and *where* to type, press a key, or launch an app, while your caller or planner supplies the literal text or app name. Every HTTP `200` answer is billed at `$0.0003` per call ($0.30 per 1,000 calls), and errors are never billed.
AI Agent & CLI shortcut: Feed manina.ai/llms-full.txt to your AI coding agent to build a complete execution loop, or run manina run "Open Settings and go to Wi-Fi" directly with npm i -g manina.
## Request
```py title="act.py"
import base64
import json
import os
import urllib.request
with open("screenshot.png", "rb") as f:
image_b64 = base64.b64encode(f.read()).decode("ascii")
payload = {
"image": image_b64,
"goal": "Open Wi-Fi settings",
"plan": "1. Open Settings\n2. Tap Wi-Fi",
"history": '{"action": "open", "app": "Settings"} -> screen changed',
}
req = urllib.request.Request(
"https://llm.manina.ai/v1/act",
data=json.dumps(payload).encode("utf-8"),
headers={
"Authorization": f"Bearer {os.environ['MANINA_API_KEY']}",
"Content-Type": "application/json",
},
method="POST",
)
with urllib.request.urlopen(req) as resp:
step = json.loads(resp.read().decode("utf-8"))
print(step["op"], step["step"], step.get("point"))
```
```js title="act.mjs"
import { readFileSync } from 'node:fs';
const response = await fetch('https://llm.manina.ai/v1/act', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.MANINA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
image: readFileSync('screenshot.png').toString('base64'),
goal: 'Open Wi-Fi settings',
plan: '1. Open Settings\n2. Tap Wi-Fi',
history: '{"action": "open", "app": "Settings"} -> screen changed',
}),
});
const step = await response.json();
console.log(step.op, step.step, step.point);
```
```sh title="cURL"
(
printf '{"goal":"Open Wi-Fi settings",'
printf '"plan":"1. Open Settings\\n2. Tap Wi-Fi",'
printf '"image":"'
base64 < screenshot.png | tr -d '\n'
printf '"}'
) | curl -sS https://llm.manina.ai/v1/act \
-H "Authorization: Bearer $MANINA_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @-
```
## Parameters
### Headers
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Authorization` | string | yes | `Bearer hsk_live_…` in production, or `Bearer hsk_test_…` in Sandbox. Create keys in your account (API keys →). |
| `Content-Type` | string | yes | Must be `application/json`. Maximum request body size is **12 MB**. |
### Body (JSON)
Unknown JSON fields are rejected with `400 invalid_request`.
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `image` | string | yes | Base64-encoded `PNG`, `JPEG`, or `WebP` screenshot (`data:image/…;base64,` prefix and newlines accepted). Resized server-side to 540 px wide JPEG. |
| `goal` | string | yes | Plain-language task goal, **1 to 1,000 characters** after trimming whitespace. |
| `plan` | string \| null | no | Numbered step list (`1. …`, `2) …`, or `3、…`), one action per line, up to **4,000 characters**. If omitted or `null`, defaults to `1. ` (supplying explicit numbered steps improves step tracking). |
| `history` | string \| null | no | Up to the last ~5 executed actions, oldest first, one per line, up to **8,000 characters** (format below). Omit or pass `null` before the first step. |
### `history` line format
Each line records the executed JSON action (with tap coordinates normalized to `0` to `1000` of image width/height) and whether the screen changed afterward:
```text title="history"
{"action": "open", "app": "Settings"} -> screen changed
{"action": "tap", "x": 478, "y": 250} -> screen did NOT change
```
Supported `action` shapes in `history`:
- `{"action": "tap", "x": 0..1000, "y": 0..1000}`
- `{"action": "swipe", "direction": "up" | "down" | "left" | "right"}`
- `{"action": "type", "text": "..."}`
- `{"action": "open", "app": "..."}`
- `{"action": "set_time", "time": "07:00"}`
- `{"action": "back"}` · `{"action": "home"}` · `{"action": "wait"}` · `{"action": "key"}`
Supported outcome suffixes: `-> screen changed`, `-> screen did NOT change`, or `-> unknown`.
## Enum values
### `op` (12 values)
| Value | Meaning | Coordinates (`point` / `box`) |
| --- | --- | --- |
| `TAP` | Tap the target UI element | Present when `present_prob` and `box` are valid |
| `TYPE` | Enter text into the active or targeted field (caller supplies the text string) | Optional target input box |
| `KEY` | Press a keyboard key or shortcut such as Return or Backspace (caller supplies the key) | `null` or optional target |
| `SWIPE_UP` | Scroll content upward (finger moves bottom → top) | Optional start box; default full-screen swipe |
| `SWIPE_DOWN` | Scroll content downward (finger moves top → bottom) | Optional start box; default full-screen swipe |
| `SWIPE_LEFT` | Swipe left (for carousels, tabs, or pages) | Optional start box; default horizontal swipe |
| `SWIPE_RIGHT` | Swipe right (for carousels, tabs, or back gesture) | Optional start box; default horizontal swipe |
| `HOME` | Return to the phone's Home screen | `null` |
| `BACK` | Navigate back (Android Back key or iOS back action) | `null` |
| `WAIT` | Wait briefly for a loading screen or animation to settle | `null` |
| `DONE` | The goal is complete on the current screen | `null` |
| `OPEN` | Launch an app directly by name / Spotlight / `adb` intent (caller supplies app name) | `null` |
### `step` values
| Value | Meaning |
| --- | --- |
| `"step 1"` .. `"step 999"` | The 1-indexed line in `plan` that the model is currently executing |
| `"done"` | All planned steps for `goal` have been satisfied |
| `"other"` | An off-plan screen is blocking progress (for example a permission prompt, cookie sheet, or pop-up dialog) |
### `model` values
- `"manina-act-1"`
## Response
```json title="200 OK"
{
"id": "act_2f7c9a1e0b6d4f3a",
"op": "TAP",
"op_prob": 0.93,
"step": "step 2",
"step_prob": 0.88,
"step_text": "Tap Wi-Fi",
"box": [239, 478, 717, 956],
"point": {"x": 478, "y": 717},
"present_prob": 0.97,
"confidence": 0.91,
"plan": "1. Open Settings\n2. Tap Wi-Fi",
"image": {"width": 1290, "height": 2796},
"latency_ms": 284,
"model": "manina-act-1"
}
```
### Response fields
| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Unique request identifier (`act_` followed by 16 hex characters). |
| `op` | string | Predicted UI operation (one of the 12 `op` enum values above). |
| `op_prob` | number | `0` to `1`: model probability assigned to `op`. |
| `step` | string | `"step N"`, `"done"`, or `"other"`. |
| `step_prob` | number \| null | `0` to `1`: model probability assigned to `step`. |
| `step_text` | string | Text of the matched plan line (empty when `done` or `other`). |
| `box` | integer[4] \| null | `[x1, y1, x2, y2]` in original image pixels, or `null` when `step` is `"done"` or no spatial target applies. |
| `point` | object \| null | `{"x": integer, "y": integer}` centre of `box` in original image pixels, or `null`. |
| `present_prob` | number \| null | `0` to `1`: target visibility score when `box` is returned, else `null`. |
| `confidence` | number \| null | `0` to `1`: spatial certainty of `box`, else `null`. |
| `plan` | string | Normalized numbered plan evaluated by the server. |
| `image` | object | `{"width": integer, "height": integer}` of your decoded screenshot. |
| `latency_ms` | integer | Server processing duration in milliseconds. |
| `model` | string | `"manina-act-1"`. |
## Client execution loop recommendations
- **Confidence gating:** Execute `TAP`, directional swipes, and `BACK` automatically only when `op_prob >= 0.7` and (for `TAP`) `present_prob >= 0.5` and `confidence >= 0.5`. Hand lower-confidence steps back to your planner or user.
- **Pop-up recovery (`step: "other"`):** Allow the model to dismiss unexpected dialogs when confidence is high, but cap consecutive `"other"` steps (for example at 5 in a row) before replanning.
- **Sensitive actions:** Never auto-confirm payments, transfers, message sends, or deletions without explicit user approval.
- **Errors & rate limits:** See [Error codes & rate limits](https://manina.ai/docs/api-errors).
---
# Error codes & rate limits
URL: https://manina.ai/docs/api-errors
HTTP status codes, JSON error codes, concurrency queuing, Retry-After handling, request size limits, and Live vs Sandbox isolation for the Manina AI API.
All Manina AI API endpoints (`POST /v1/locate` and `POST /v1/act`) return errors in a uniform JSON envelope with `Cache-Control: no-store`. **No non-200 response is ever billed.**
```json
{
"error": {
"code": "busy",
"message": "The model is busy. Retry after 1 second."
}
}
```
## Error codes
| HTTP Status | `error.code` | Meaning | Recommended action |
| --- | --- | --- | --- |
| `400` | `invalid_request` | Malformed JSON, wrong `Content-Type`, unknown or missing field, `text` / `goal` empty or over limit, malformed `plan`, `min_present` outside `[0, 1]`, or request body over 12 MB. | Fix the request payload before retrying. |
| `400` | `invalid_image` | `image` is not valid base64, is not a `PNG`, `JPEG`, or `WebP` file, cannot be decoded, or exceeds the pixel safety ceiling (~89 MP). | Re-encode the screenshot as `PNG`, `JPEG`, or `WebP`. |
| `401` | `unauthorized` | Missing `Authorization: Bearer …` header or unrecognized token format. | Pass `Authorization: Bearer hsk_live_…` (or `hsk_test_…`). |
| `401` | `key_invalid` | API key was revoked, rotated, malformed, or belongs to the other environment (Live vs Sandbox). | Mint a fresh key in your account (API keys →). |
| `402` | `insufficient_balance` | Your prepaid balance cannot cover the call ($0.0003). | Add credit or enable Auto Top-up in your account (Billing →). |
| `402` | `key_limit` | This API key reached its configured per-key spending cap. | Raise the key's spend cap or switch to another key in your account (API keys →). |
| `404` | `not_found` | Wrong URL path, or the endpoint is disabled in this environment. | Verify `POST https://llm.manina.ai/v1/locate` or `/v1/act`. |
| `413` | `request_too_large` | Request body exceeded the 12 MB gateway ingress limit. | Downscale the screenshot (540 px wide JPEG is optimal). |
| `503` | `busy` | All inference GPU slots stayed occupied for the 2-second queue window, or too many concurrent requests arrived from one address. Includes header `Retry-After: 1`. | Wait `Retry-After` seconds (default 1 s) and retry with jitter. |
| `503` | `model_unavailable` | Model backend timed out or returned an unparseable upstream payload. | Retry with exponential backoff (1 s, 2 s, 4 s). |
| `503` | `billing_unavailable` | Billing service could not be reached to authorize the key. | Retry with exponential backoff. |
## Concurrency, queuing & `Retry-After`
- **Short server queue, fast fail:** Rather than holding HTTP connections open for tens of seconds during traffic spikes, the gateway queues each `/v1/locate` or `/v1/act` call for up to **2 seconds** waiting for a GPU slot. If a slot does not free up in time, it returns `503 busy` with `Retry-After: 1` and charges **$0**.
- **Recommended retry loop:** Retry `503 busy`, `503 model_unavailable`, `503 billing_unavailable`, and network `502`/`504` up to 3 times, honoring the `Retry-After` header (or `1 s`, `2 s`, `4 s` with small random jitter). Do **not** blindly retry `400`, `401`, or `402`.
## Payload & field limits
| Limit | Value |
| --- | --- |
| Maximum HTTP request body | **12 MB** |
| `text` (`/v1/locate`) | **1 to 1,000 characters** (trimmed) |
| `goal` (`/v1/act`) | **1 to 1,000 characters** (trimmed) |
| `plan` (`/v1/act`) | Up to **4,000 characters** (numbered lines) |
| `history` (`/v1/act`) | Up to **8,000 characters** |
| Maximum decoded image area | ~89 megapixels (540 px wide JPEG recommended) |
## Live vs Sandbox isolation
- **Live keys (`hsk_live_…`):** Authenticated against your production account balance on `manina.ai`.
- **Sandbox keys (`hsk_test_…`):** Isolated to the Sandbox test environment so automated integration tests never touch production credit. Mixing a Sandbox key against the Live billing environment (or vice versa) returns `401 key_invalid`.
---
# Manina-4B-HD-1.0 (open weights)
URL: https://manina.ai/docs/model-hd
Run Manina-4B-HD-1.0 locally with Python and Transformers for single-pass high-resolution GUI grounding on mobile, desktop, and web screenshots.
**Manina-4B-HD-1.0** (`manina-ai/Manina-4B-HD-1.0`) is our open-weight 4-billion-parameter visual grounding model built on `Qwen/Qwen3.5-4B` for localizing UI elements in a **single forward pass** at a 1,280-token visual budget.
Instead of generating coordinate digits token by token, a lightweight spatial readout head (`manina_locator`) predicts target presence, normalized bounding box `[x1, y1, x2, y2]`, tap point `(x, y)`, and localization confidence directly over the visual grid, with zero multi-turn zoom-in cropping.
- **Weights & code:** [huggingface.co/manina-ai/Manina-4B-HD-1.0](https://huggingface.co/manina-ai/Manina-4B-HD-1.0)
- **Live browser demo:** [Hugging Face Space](https://huggingface.co/spaces/henryht11111/Manina-4B-HD-1.0-Demo)
- **License:** Non-commercial **Manina Research License 1.0**. For production apps, internal business automation, or closed-loop action execution (`TAP`, swipes, `TYPE`, `BACK`, `HOME`, `DONE`), use the hosted **[Manina-4B-Lite-1.0 API](https://manina.ai/docs/api-locate)** or **[`manina` CLI](https://manina.ai/docs/manina-cli)**.
## Requirements & installation
- **Python:** 3.10+
- **GPU memory:** ~9 GB VRAM in `bfloat16` (CUDA), or Apple Silicon unified memory (`mps`) / CPU in `float32`
- **Dependencies:** standard `torch`, `transformers` (with `Qwen3_5ForConditionalGeneration`), `safetensors`, and `Pillow`; no custom CUDA kernels required
```sh
pip install torch transformers safetensors pillow huggingface_hub
```
Download [`manina_hd.py`](https://huggingface.co/manina-ai/Manina-4B-HD-1.0/blob/main/manina_hd.py) from the model repository into your working directory.
## Quickstart (Python)
```python
from PIL import Image
from manina_hd import ManinaHDLocator
locator = ManinaHDLocator.from_pretrained("manina-ai/Manina-4B-HD-1.0")
image = Image.open("screenshot.png")
pred = locator.locate(image, "Settings app icon")
w, h = image.size
px, py = round(pred.point[0] * w), round(pred.point[1] * h)
print(f"Tap pixel: ({px}, {py}) | box={pred.box} | present={pred.present_prob:.3f} | conf={pred.confidence:.3f}")
```
## Python API reference
### `ManinaHDLocator.from_pretrained(...)`
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `model_name_or_path` | `str` | `"manina-ai/Manina-4B-HD-1.0"` | Hugging Face Hub repo ID or local directory containing `config.json`, `model-*.safetensors`, and `locator.safetensors`. |
| `device` | `str \| None` | `None` | `"cuda"`, `"mps"`, or `"cpu"`. Auto-detected when `None`. |
| `dtype` | `torch.dtype \| None` | `None` | Defaults to `torch.bfloat16` on CUDA and `torch.float32` on MPS/CPU. |
| `device_map` | `str \| None` | `None` | Optional Hugging Face Accelerate `device_map` (for example `"auto"`). |
### `locator.locate(image, instruction, max_visual_tokens=1280, decode="support_kl")`
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `image` | `str \| PathLike \| PIL.Image` | required | Path to a `PNG` / `JPEG` / `WebP` screenshot or an open `PIL.Image`. |
| `instruction` | `str` | required | Natural-language description of the single UI element to locate. |
| `max_visual_tokens` | `int` | `1280` | Maximum merged visual token budget (`32×32` px per visual token). |
| `decode` | `str` | `"support_kl"` | Candidate selection mode. Enum values: `"support_kl"`, `"support_kl_iou"`, `"argmax"`, `"all"`. |
### `LocateResult` fields
Coordinates returned by `ManinaHDLocator` are **normalized floats in `[0.0, 1.0]`** relative to image width and height (multiply by `(width, height)` for pixel coordinates):
```json
{
"point": [0.8974, 0.0557],
"box": [0.8651, 0.0382, 0.9297, 0.0732],
"present_prob": 0.9961,
"iou_prob": 0.9449,
"confidence": 0.9412
}
```
| Field | Type | Description |
| --- | --- | --- |
| `point` | `(float, float)` | Normalized `(x, y)` centre of `box` in `[0.0, 1.0]`. |
| `box` | `(float, float, float, float)` | Normalized `[x1, y1, x2, y2]` bounding box clamped to `[0.0, 1.0]`. |
| `present_prob` | `float` | `0` to `1`: score indicating whether the target appears on screen. |
| `iou_prob` | `float` | `0` to `1`: predicted IoU quality of the selected candidate box. |
| `confidence` | `float` | `present_prob * iou_prob` (`0` to `1`). |
## Reproducing ScreenSpot-v2 evaluation
All reported numbers use deterministic, single-pass greedy inference (`max_visual_tokens=1280`, no zoom-in cropping, no test-time ensembles):
```sh
python eval_screenspot_v2.py \
--model manina-ai/Manina-4B-HD-1.0 \
--dataset /path/to/OS-Copilot-ScreenSpot-v2 \
--max-visual-tokens 1280 \
--decode support_kl \
--predictions-out screenspot_v2_predictions.jsonl
```
| Model | Params | Visual Tokens | Mobile Text (290) | Mobile Icon (211) | Mobile Total (501) | Desktop (334) | Web (437) | All (1,272) |
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| `Qwen/Qwen3.5-4B` (matched budget) | 4B | 1,280 | **99.31%** (`288`) | 89.57% (`189`) | 95.21% (`477`) | 93.41% (`312`) | 90.39% (`395`) | 93.08% (`1,184`) |
| `Qwen/Qwen3.5-4B` (high budget) | 4B | 4,000 | **99.31%** (`288`) | 88.15% (`186`) | 94.61% (`474`) | 94.01% (`314`) | **91.53%** (`400`) | 93.40% (`1,188`) |
| **Manina-4B-HD-1.0** (`support_kl`) | 4B | 1,280 | **99.31%** (`288`) | **93.36%** (`197`) | **96.81% (`485`)** | 94.91% (`317`) | 90.62% (`396`) | 94.18% (`1,198`) |
| **Manina-4B-HD-1.0** (`support_kl_iou`) | 4B | 1,280 | **99.31%** (`288`) | 92.89% (`196`) | 96.61% (`484`) | **95.21% (`318`)** | 91.08% (`398`) | **94.34% (`1,200`)** |
## HD (open weights) vs Lite (hosted API)
| Feature | Manina-4B-HD-1.0 | Manina-4B-Lite-1.0 |
| --- | --- | --- |
| **Primary role** | High-resolution offline grounding & academic benchmarking | Low-latency live phone control & hosted production API |
| **Capabilities** | **Locate only:** static bounding box + tap point + presence/IoU confidence | **Locate *and* Act:** bounding box + tap point **plus** full action prediction (`TAP`, swipes, `TYPE`, `KEY`, `BACK`, `HOME`, `OPEN`, `WAIT`, `DONE`), plan-step tracking, and calibrated `op_prob` handback |
| **Visual budget & speed** | 1,280 visual tokens (`~300 ms` warm on Hugging Face ZeroGPU) | 640 visual tokens (`~72-83 ms` P50 `/v1/locate` · `~113 ms` P50 `/v1/act` on our production stack) |
| **Coordinates** | Normalized `[0.0, 1.0]` floats | Integer pixels of your uploaded image |
| **License** | **Manina Research License 1.0** (non-commercial research only) | Commercial pay-as-you-go API ($0.30 / 1,000 calls, $1 free credit) (API keys →) |
---
# Set up the AI iPhone agent
URL: https://manina.ai/docs/getting-started
Install the free TestFlight app, prepare the board, and run a first task. An AI that uses your iPhone, with no jailbreak.
Tell Manina AI what you want to do, then watch it use your iPhone. This guide takes you from a small board to your first task in the iPhone app. [Install the AI iPhone agent firmware](https://manina.ai/install) on a computer first, or read [how the phone-use agent works](https://manina.ai/how-it-works).
Want to use an agent on your computer instead? See [CLI & AI agents](https://manina.ai/docs/cli).
## Watch it work
See how the phone, board, and app work together in this walkthrough.
### iPad: coming soon
iPad support is coming soon. Here's Manina AI finishing a Duolingo Japanese lesson on its own on a real iPad.
## Get the app
**The App Store app needs iOS 18 or later: iPhone XS / XR and newer.** The TestFlight app 1.0.9+ runs on iOS 16.4 or later, so iPhone 8 / 8 Plus / X work too. iPhone 7 and older can't run it.
The App Store release is in review. In the meantime, the public beta is on TestFlight:
1. On your iPhone, install Apple's **TestFlight** app from the App Store if you don't have it yet.
2. Open the [TestFlight invite](https://testflight.apple.com/join/1xQHgJcA) on your iPhone, tap **Accept**, then **Install**.
3. When installation finishes, tap **Open** to start the app.
The TestFlight app goes with the TestFlight board firmware: install it from the [installer's TestFlight view](https://manina.ai/install?build=testflight).
## What you need
Need to choose a board or cable? The [hardware & buying guide](https://manina.ai/docs/hardware) has the exact model, phone connections, and the same Amazon links as the homepage.
| Item | What to prepare |
| --- | --- |
| iPhone | iPhone XS or newer, running iOS 18 or later (or iPhone 8 / X on iOS 16.4+ with the TestFlight app 1.0.9+), with cellular data. USB-C models plug the board in or use Bluetooth; Lightning models use Bluetooth ([Lightning iPhone](https://manina.ai/docs/lightning-iphone-adapter)). |
| Board | [Seeed Studio XIAO ESP32S3](https://wiki.seeedstudio.com/xiao_esp32s3_getting_started/), the standard version with 8 MB flash and 8 MB PSRAM, including its Wi-Fi/Bluetooth antenna. The installer supports this version, rather than Sense or Plus. |
| Data cable | A USB cable that carries data, for the first firmware installation. A charge-only cable won't work. |
| Computer, for the first setup | Desktop Chrome or Edge to [prepare the board](https://manina.ai/install). The computer isn't needed while a task runs. |
| AI service | Start with a free AI service available in the app. If you prefer your own service, use an OpenAI-compatible API that accepts images. |
During a task, your iPhone joins the board's Wi-Fi hotspot for Screen Mirroring, and the app gets the picture over the same Wi-Fi. That hotspot has no internet, so model calls use your cellular data. When iOS asks to allow **Local Network** access, tap **Allow**; without it the picture falls back to Bluetooth and is slower ([details](https://manina.ai/docs/wifi-hotspot-vs-home-wifi#video-is-slow-local-network-permission)).
## 1. Prepare the board
Do this once before plugging the board into your iPhone. This video first shows turning on AssistiveTouch on the iPhone, then the browser installation:
1. Open the [firmware installer](https://manina.ai/install) in Chrome or Edge on a computer. An iPhone or Safari can't perform this step.
2. Check **Your iPhone**. The page starts on iPhone 15 or newer (USB-C) with **USB cable**, with **Bluetooth** as the other choice in the small **Connect by** toggle. iPhone 8 – 14 (Lightning) selects Bluetooth, since the board can't plug into a Lightning port. Not sure? Look at the charging port, or open **Settings › General › About**, or pick **Not sure** and choose yourself. Bluetooth needs Manina AI 1.0.8 or newer, on [TestFlight](https://testflight.apple.com/join/1xQHgJcA) for now.
3. Connect the board with the data cable. Both choices install over it. Click **Connect board**.
4. Select the board in the browser's USB list. If the page says it is restarting into install mode, click **Connect board** and select it again.
5. Keep the board connected and the page open while installation runs. For Bluetooth, the page then switches the board to Bluetooth by itself; if it asks, click **Switch to Bluetooth** and pick the board once more.
6. Wait until the page says **Installed.** (Bluetooth: **Installed, set to Bluetooth.**) Then unplug the board from the computer.
{/* Screenshots: the real USB device picker, installation progress, and Installed confirmation. */}
Can't see the board? Try a different data cable, connect directly to the computer, and close other apps using the serial port. If it still doesn't appear, hold **BOOT** while plugging it in, release **BOOT**, then try **Connect board** again.
If the firmware list doesn't load, click **Check again**. If installation fails, unplug the board, reconnect it, and try **Connect board** again. See the [FAQ](https://manina.ai/docs/faq) if you're still stuck.
Installation replaces the board's existing firmware. It doesn't change your iPhone or computer. To update a board installed with the USB / Bluetooth choice, install it again from the same page ([Firmware updates](https://manina.ai/docs/firmware-updates#usb-or-bluetooth-boards)).
## 2. Connect it to your iPhone
Plug the prepared board into your iPhone and open the app, currently named **ESP32 Agent**. On first launch the Welcome page asks once, **Do you have an ESP32 board?** **Not yet** opens [where to get one](https://manina.ai/where-to-buy-esp32) and setup goes on, so you can connect the board when it arrives. Then the app walks you through four steps:
Check that the antenna is attached and keep the board close to your phone during setup. If pairing fails or the signal is weak, move it right beside the phone and check the antenna connection.
1. **Plug Me In** — pair the board over Bluetooth.
2. **Let Me See the Screen** — join the board's Wi-Fi, then open **Control Center → Screen Mirroring → ESP32 Agent**.
3. **Let Me Use the Pointer** — turn on AssistiveTouch so iOS shows the board's pointer. The page lists the steps under **Do this once:** and ticks each one as the app sees it done:
1. Open **Settings › Accessibility › Touch › AssistiveTouch**.
2. Turn AssistiveTouch on.
3. Bluetooth board only: under **Devices › Bluetooth Devices**, pair the board.
4. Come back to the app and tap **Calibrate**. The pointer moves over a grid to learn where it lands; it takes a few seconds.
Below the steps, the page shows what it is waiting for: **AssistiveTouch on**, **Mouse connected**, **Screen Mirroring on**, **Pointer calibrated**. If one of them takes more than 20 seconds, it shows the likely cause and the fix, such as pairing the board or turning on Screen Mirroring.
4. **Give Me a Brain** — choose a free AI service available in the app to get started. To use your own service instead, enter its address and API key, then choose a vision model. Your key is stored in the iOS Keychain. With app 1.0.11 you can also [sign in with ChatGPT](https://manina.ai/docs/chatgpt-sign-in) and use your own Plus or Pro plan, with no API key.
A free AI service is available now. Read the [privacy policy](https://manina.ai/privacy) before choosing a service.
{/* Screenshots: the real four-step onboarding, ESP32 Agent in Screen Mirroring, and AssistiveTouch enabled. */}
Keep your phone unlocked, and in portrait while it calibrates. Over USB, the board is powered by the phone.
### Bluetooth instead of the cable
A board installed for Bluetooth isn't plugged into the iPhone:
1. Power the board from any USB charger or power bank and keep it near the phone.
2. In the app (1.0.8 or newer; 1.0.9+ on iPhone 8 / X), pick the board and confirm iOS's pairing request.
3. Turn on **Settings → Accessibility → Touch → AssistiveTouch**. Under **Devices → Bluetooth Devices**, tap the board. You do this once per phone.
Screen Mirroring and the picture work the same way as over USB. To switch an installed board, use **Settings › Board › Input** in the app. More, including Home and troubleshooting: [Bluetooth mode](https://manina.ai/docs/bluetooth-mode).
## 3. Try a simple goal
Enter **“Open Settings and go to Wi-Fi”**, then press **Start**.
Manina AI looks at the screen, takes a step, and checks what changed. Follow its progress in the Dynamic Island or return to the app. You can stop the task from either place. If the preview is stuck on an old screen or actions keep repeating, stop and check the [mirroring troubleshooting steps](https://manina.ai/docs/faq#mirroring-is-connected-but-the-picture-is-stuck) before retrying.
If it needs your help, press and hold the notification to respond. You may be asked to **Continue**, **Skip step**, **Stop**, or **Take Over**.
{/* Screenshots: the real goal entry and Start button, Dynamic Island progress, and a takeover prompt. */}
Start with a task you can watch. Screen Mirroring stops when the phone locks. Apps that turn the screen sideways, such as games, work from app 1.0.11 (TestFlight); the agent can also tap one spot twice in a row (`tap twice`) for a game's choose-then-confirm. For Chinese text, add the Pinyin keyboard; Manina AI switches between English and Pinyin by itself (ctrl+space). Check what appears on screen.
## 4. Keep what works
Save a useful task as an **intent** to run it again from **My intents**, Siri, Shortcuts, widgets, or Control Center.
### Intents & recording
Tap the record button at the top right of the Agent tab (**New intent**):
- **Record me doing it.** After a 5-second countdown, do the task yourself on the mirrored screen, then stop. The steps are worked out from how the screen changed; check the ones marked yellow before saving.
- **Save last run as intent.** Keep a run that went well.
Open an intent to edit its instruction, checklist, and steps. Recorded moves replay without the AI while the screen matches; add AI steps, reading from the screen, or a step for you to do by hand. Full guide: [Record a demonstration and turn it into an intent](https://manina.ai/docs/intents).
### Review runs
To review a run, open **Runs** and select it. If the run ended with an answer, it appears in a **Result** card: tap to expand it, and tap **Copy** to copy it. Replay the steps with taps and swipes drawn on the screenshots. To export the record, choose **⋯ → Export trace**.
### Ask me first
In **Settings → Runs → Ask me first**, choose when the agent stops and asks you in a notification: **Payments only** (default), **Payments, sending, deleting**, or **Never**.
{/* Screenshot: a real run replay and the Export trace menu, with personal content removed. */}
For connection or pointer problems, see the [FAQ](https://manina.ai/docs/faq). To update the board later, see [Firmware updates](https://manina.ai/docs/firmware-updates). Before sending screenshots to an AI service, read the [privacy policy](https://manina.ai/privacy).
---
# Can an AI agent use my iPhone without a computer?
URL: https://manina.ai/docs/iphone-ai-agent-without-computer
Yes. After a one-time firmware install from a browser, the free ESP32 Agent app and a XIAO ESP32S3 board run tasks on the iPhone by themselves, with a free AI service built in. No computer while it runs, no jailbreak.
**Yes. You need a computer once, for about a minute, to flash the board. After that the iPhone app does the work on its own.** The ESP32 Agent app plans each step, and a small XIAO ESP32S3 board is its eyes and hands: it receives the iPhone's Screen Mirroring and taps, swipes and types as a mouse and keyboard. iOS stays stock.
**No board yet?** [Buy a XIAO ESP32S3](https://manina.ai/where-to-buy-esp32). It is the only hardware you need besides a short data cable.
## What runs where
| Part | Where it runs |
| --- | --- |
| Deciding each step | The ESP32 Agent app on the iPhone, with the AI service you pick |
| Seeing the screen | The board, through Screen Mirroring over its own Wi-Fi hotspot |
| Tapping and typing | The board, as a USB or Bluetooth mouse and keyboard |
| The computer | Only once, to flash the board in Chrome or Edge |
The app includes a free AI service, so you can start without an API key. You can also connect your own image-capable, OpenAI-compatible service.
## Set it up
1. **Flash the board once.** On a computer, open the [installer](https://manina.ai/install) in Chrome or Edge, connect the board with a data cable, click **Connect board** and pick it. The install takes about half a minute.
2. **Install the app.** Open the [TestFlight invite](https://testflight.apple.com/join/1xQHgJcA) on your iPhone. The App Store release is in review.
3. **Follow the app's four screens.** Pair the board, join its Wi-Fi and start **Screen Mirroring → ESP32 Agent**, turn on **AssistiveTouch**, and pick the free AI service.
4. **Give it a goal.** Type "Open Settings and go to Wi-Fi" and press **Start**.
USB-C iPhones plug the board in; Lightning iPhones use [Bluetooth mode](https://manina.ai/docs/bluetooth-mode), with the board on a USB charger. Step by step with videos: [Set up the AI iPhone agent](https://manina.ai/docs/getting-started).
## Run it again without typing
Save a task that worked as an **intent** and run it from **My intents**, Siri, Shortcuts, widgets or Control Center. You can also record yourself doing it once ([intents](https://manina.ai/docs/intents)). In **Settings → Runs → Ask me first**, choose when it stops to ask you: payments only (default), payments, sending and deleting, or never.
## Good to know
- The phone stays unlocked while it works. Landscape apps such as games work from app 1.0.11 (TestFlight). Locking stops Screen Mirroring.
- The iPhone's Wi-Fi joins the board's hotspot, which has no internet, so the AI service uses cellular data.
- iOS does not mirror passcode entry, Apple Pay or DRM-protected video.
- A USB-C iPhone can't charge by wire while the board is plugged in; Bluetooth mode leaves the port free.
Prefer to drive the phone from an agent on your computer? See [CLI & AI agents](https://manina.ai/docs/cli). Use it only on your own devices and accounts, and watch what it does ([disclaimer](https://manina.ai/docs/disclaimer)).
---
# Manina CLI (npm i -g manina)
URL: https://manina.ai/docs/manina-cli
Run Manina-4B-Lite tasks, one-shot screen finds, saved intents, and background schedules on Android (over adb) and iPhone (via an ESP32 Agent board) from your terminal.
The **Manina CLI (`manina`)** brings the hosted Manina phone-use loop (`Manina-4B-Lite` + `Qwen 3.8 Flash` planner) to your terminal on **macOS** and **Linux**:
- Drive an **Android** phone over USB (`adb`) or a real **iPhone** through a paired ESP32 Agent board.
- Share saved **intents** and **schedules** with the Manina AI Web App (Open Web App →), and keep scheduled tasks running in the background via `launchd` or `systemd` even with your browser closed.
- Pay from the same account balance and **$1 free starter credit** as the Web App and Playground.
> **Which CLI do I need?**
> - Use **`manina`** (`npm i -g manina`, this page) when you want **Manina's own phone-use model** to plan and run tasks on Android or iPhone.
> - Use **[`esp32agent`](https://manina.ai/docs/cli)** (`npm i -g esp32agent`) when you want **your own coding agent** (Claude Code, Codex, DeepSeek Harness, or any MCP client) to see and control an iPhone with its own model.
## Install & sign in
Requires **Node.js 18+** on macOS (`arm64` / `x64`) or Linux (`x64` / `arm64`).
```sh
npm i -g manina
manina version
manina login
```
`manina login` opens `/cli/login` in your browser so you can authorize this computer with one click. Check your active account, prepaid balance, and remaining free credit anytime with `manina whoami`, or sign out with `manina logout`.
## Connect a phone
### Android (USB `adb`)
1. Install Android `platform-tools` (`brew install --cask android-platform-tools` on macOS, or `apt` / `dnf` / `pacman` on Linux) so `adb version` works.
2. On the phone, enable **Developer options** and **USB debugging** (on Xiaomi/Redmi/POCO, also enable **USB debugging (Security settings)**; on OPPO/OnePlus/realme, enable **Disable permission monitoring**).
3. Plug in with a USB data cable, tap **Allow USB debugging**, and verify `manina devices` lists your phone.
4. *(Optional, for typing Chinese or emoji)* Install and enable [ADBKeyBoard](https://github.com/senzhk/ADBKeyBoard):
```sh
adb install ADBKeyboard.apk
adb shell ime enable com.android.adbkeyboard/.AdbIME
```
Full brand-by-brand menu paths: [Android setup guide (`/android-setup.md`)](https://manina.ai/android-setup.md).
### iPhone (ESP32 Agent board)
1. Flash a XIAO ESP32S3 board once from [manina.ai/install](https://manina.ai/install) (see [Hardware & buying](https://manina.ai/docs/hardware)).
2. Plug the board into your iPhone (or power it in [Bluetooth mode](https://manina.ai/docs/bluetooth-mode)), join its Wi-Fi or your home Wi-Fi, enable **Screen Mirroring → ESP32 Agent** and **AssistiveTouch**, then pair from your computer:
```sh
manina iphone pair
manina devices --iphone
```
## Quick start
```sh
# Run a multi-step task
manina run "Open Settings and go to Wi-Fi"
# Locate one UI element on screen right now (add --tap to tap it)
manina find "Settings app icon" --tap
# Save a recurring intent and install the background scheduler
manina intents add "Morning Wi-Fi check" "Open Settings and verify Wi-Fi is connected" --daily 08:30
manina schedule install
# Inspect local run history
manina history
```
## Command reference
Pass `--json` to any command for machine-readable JSON output. Only one run can execute per phone at a time.
| Command | Description |
| --- | --- |
| `manina login [--env live\|sandbox] [--no-browser]` | Sign in on this computer (`--env sandbox` targets the preview Sandbox). |
| `manina whoami` / `manina logout` | Show the signed-in account, balance, and free credit, or remove the local session. |
| `manina devices [--iphone]` | List connected Android phones via `adb`; add `--iphone` to include paired ESP32 Agent boards. |
| `manina run "GOAL" [flags]` | Run a task. Flags: `--steps FILE\|-` (use your own step list), `--phone android[:SERIAL]\|iphone[:BOARD]`, `--yes` (non-interactive), `--max-steps N` (default `100`, `0` = unlimited), `--save NAME` (save as an intent). |
| `manina find "WHAT" [--tap] [--phone P]` | Make one `Manina-4B-Lite` Locate call on the live screen; `--tap` taps the returned point when `on_screen` is `true`. |
| `manina intents [list]` | List saved intents shared with `/app`. |
| `manina intents add NAME "GOAL" [flags]` | Create an intent (`--steps FILE`, `--every 30m`, `--daily 08:30`, `--weekly mon,wed@09:00`, `--off`). |
| `manina intents run NAME` / `rm NAME` | Run a saved intent now, or delete it. |
| `manina schedule [list\|install\|uninstall\|run]` | Inspect schedules or install/remove the background runner (`launchd` on macOS, `systemd` user service on Linux). |
| `manina history [list\|show ID\|latest\|export]` | Inspect or export run traces stored locally on this computer (`--output FILE`). |
| `manina iphone ` | Run any [`esp32agent`](https://manina.ai/docs/cli) board subcommand (`pair`, `screenshot`, `calibrate`, `io`, `net`, `device info`). |
| `manina telemetry [status\|on\|off]` | Inspect or toggle anonymous CLI telemetry. |
## Run exit statuses & environment variables
A `manina run` session finishes in one of five states (exiting `0` only on `done`):
| Status | Meaning |
| --- | --- |
| `done` | Goal completed. |
| `needs` | Manina handed a step back (ambiguous target, sensitive action, or step the device cannot finish alone; interactive terminals prompt you). |
| `max_steps` | Reached `--max-steps` (default `100`, ~10× a typical phone task) to stop runaway loops; pass `--max-steps 0` to remove the limit. |
| `stopped` | Interrupted by `Ctrl-C`. |
| `error` | Device disconnected, authentication expired, or balance ran out. |
Environment variables:
- `MANINA_CONFIG_DIR`: custom directory for `session.json`, local history, and device locks.
- `MANINA_DEBUG=DIR`: writes per-step history and the exact resized screenshot sent to the model into `DIR` for debugging.
---
# Bluetooth mode
URL: https://manina.ai/docs/bluetooth-mode
Use the board as your iPhone's Bluetooth mouse and keyboard, with no cable in the phone. For Lightning iPhones, or any iPhone you'd rather keep unplugged.
**One firmware, two ways to reach the iPhone.** The board is the iPhone's mouse and keyboard either over a **USB cable** or over **Bluetooth**. You pick one on the [installer](https://manina.ai/install) and can switch later in the app. Bluetooth mode needs board firmware v0.2.7 and Manina AI 1.0.8 or newer, on [TestFlight](https://testflight.apple.com/join/1xQHgJcA) for now.
## When to use it
- **Lightning iPhones (8 – 14).** No camera adapter needed: nothing plugs into the phone. iPhone 8 / X need the app 1.0.9+.
- **Any iPhone you'd rather keep free**, for charging, a case, or a stand.
Over USB the phone powers the board. **In Bluetooth mode the board needs its own power**: any USB charger or power bank on its USB-C port. Keep it near the phone, with the antenna attached.
## Choose it
- **When installing.** On [manina.ai/install](https://manina.ai/install?mode=ble), pick your iPhone. Lightning models select **Bluetooth**; USB-C models can pick it in **Connect by**. The page installs over the cable, then switches the board to Bluetooth. Details: [Using the app](https://manina.ai/docs/getting-started#1-prepare-the-board).
- **Later, in the app.** **Settings › Board › Input**: **USB** or **Bluetooth**. The board restarts and reconnects in a few seconds; start Screen Mirroring again afterwards.
## Pair it, once per iPhone
1. Power the board and keep it near the iPhone.
2. In Manina AI, pick the board and tap **Pair** when iOS asks. This is the app's own connection.
3. Turn on **Settings › Accessibility › Touch › AssistiveTouch**. Under **Devices › Bluetooth Devices**, tap the board. This makes it the iPhone's mouse and keyboard. AssistiveTouch is still needed, as over USB.
4. Start Screen Mirroring: swipe down from the top-right corner and tap **Screen Mirroring › ESP32 Agent**.
5. Calibrate when the app asks (**Settings › Calibration**).
After switching in the app, the app shows these steps and ticks each one off.
## What's different over Bluetooth
- **Home** is the swipe up from the home bar: iOS ignores a Home key from a Bluetooth keyboard.
- **The picture still comes over the board's Wi-Fi** (Screen Mirroring), as over USB. Bluetooth carries only the mouse, keyboard and the app's commands.
- **After a long session** the picture can get stuck. The app shows a tip; stop and start Screen Mirroring again.
## Troubleshooting
- **The install page says "not on Bluetooth yet".** The board is installed but still in USB mode. Unplug it, plug it back into the same computer, wait five seconds, and click **Switch to Bluetooth**; pick the board if the list opens. You can also switch later in the app: **Settings › Board › Input**.
- **The pointer doesn't move, or the app waits for the Bluetooth pointer.** Check that AssistiveTouch is on and the board is paired under **Devices › Bluetooth Devices**, has power, and is near the phone.
- **Pairing fails, or the board was paired with older firmware.** In **Settings › Bluetooth**, tap **(i)** next to the board, choose **Forget This Device**, then pair again as above. A fresh install from the website erases the board's pairings, so pair again after it too.
- **Taps land in the wrong place after switching.** Calibrate again in **Settings › Calibration**.
- **Updating the firmware.** A board installed with the USB / Bluetooth choice is updated by installing it again from the website: [Firmware updates](https://manina.ai/docs/firmware-updates#usb-or-bluetooth-boards).
More: [Hardware & buying](https://manina.ai/docs/hardware) and [Lightning iPhone](https://manina.ai/docs/lightning-iphone-adapter).
---
# Record a demonstration and turn it into a reusable iPhone intent
URL: https://manina.ai/docs/intents
Show ESP32 Agent a task once, or save a run, and get an intent you can run again from the app, Siri, Shortcuts, widgets, or Control Center. Edit its steps, read results, and choose when it asks first.
**An intent is a task you saved so you can run it again.** It has a name, an instruction, an optional checklist, and the steps that worked last time. Run it from **My intents** on the Agent tab, or with Siri, Shortcuts, widgets, and Control Center.
## Make an intent
Tap the **record button** at the top right of the Agent tab (**New intent**). You have two choices.
### Record me doing it
Do the task yourself while the board watches the mirrored screen.
1. Make sure the board is connected, Screen Mirroring is on, and a model is set up.
2. Choose **Record me doing it**. Go to the Home Screen. Recording starts when the 5-second countdown in the Dynamic Island ends.
3. Do the task at a normal pace.
4. Stop in the app or in the Dynamic Island.
The board can't see your fingers, so the steps are worked out from how the screen changed. Steps it is unsure of are marked yellow. Check them before you save. Turning a recording into steps uses your own AI service; the free AI service in the app only runs tasks.
If recording stops early, for example because the app ran too long in the background, return to the app. The unfinished recording waits on the Agent tab: create the draft again, or discard it.
### Save last run as intent
Ran a task that went well? Choose **Save last run as intent** to keep it. When a run finishes, the Agent tab also offers **Save as intent**.
## Edit the steps
Open an intent to see its **Instruction**, **Steps**, and **Checklist**. Tap **Edit** to change the name, instruction, or checklist. The checklist is given to the agent as hints every time the intent runs.
Recorded moves run **without the AI** while the screen matches what was recorded. If a step needs judgement, swipe it and choose **Let AI do it**. Use **Add step** for more:
| Step | What it does |
| --- | --- |
| **AI step** | Hand one part of the task to the AI, in your words. |
| **Read from the screen** | Copy information off the screen into the run's notebook. |
| **Copy the notebook** | Put what was read on the clipboard, ready to paste. |
| **Ask me to do a step** | Stop and ask you to do something by hand, then go on. |
**Repeat until** runs the steps again until a condition is true on screen, for at most a set number of rounds (5 by default).
Use **Review Demonstration** or **Review Last Run** to compare the steps with what happened, and **Run** to try it.
## See the result
When a run ends with an answer, such as a price or a list it looked up, **Runs** shows it in a **Result** card above the steps. The card is collapsed to one line; tap it to read the whole text, and tap **Copy** to copy it.
## Ask me first
Some steps should wait for you. In **Settings → Runs → Ask me first**, choose:
| Setting | The agent stops and asks before |
| --- | --- |
| **Payments only** (default) | Paying, buying, or transferring money. |
| **Payments, sending, deleting** | Also sending a message, posting, deleting, or changing account settings. |
| **Never** | Nothing. It doesn't stop to ask. |
It asks in a notification: press and hold it to answer.
## Run from Shortcuts
App 1.0.13 adds two actions to the Shortcuts app, so an intent can be one step of a bigger shortcut:
| Action | What it does |
| --- | --- |
| **Run Intent and Get Result** | Runs one of your saved intents and passes on its answer, its status and the run ID. Fill the intent's blanks with the input, one line per blank. |
| **Get Run Result** | Reads a run's answer by its run ID. Turn on **Wait Until It Ends** to wait for a run that is still going. |
The status is one of: done, failed, needs you, stopped, still running, not started. Shortcuts gives an action about 20 seconds, so a longer run comes back as **still running**: add **Get Run Result** with **Wait Until It Ends** after it. If the run stops to ask you something, the action returns **needs you** at once. Screen Mirroring must be on.
## Share intents
- **Export and import.** In **My intents**, use the menu for **Import…** and **Export All…**, or export one intent from its page. Intents travel as `.esp32intent` files through AirDrop or Files, and [Manina AI CLI](https://manina.ai/docs/cli) reads the same format.
- **Send one to us.** You can share a useful intent by mail. Screenshots are blurred first, and we use it only to improve intents.
Before saving or sharing intents that touch personal accounts, read the [privacy policy](https://manina.ai/privacy). New to the app? Start with [Using the app](https://manina.ai/docs/getting-started).
---
# Sign in with ChatGPT
URL: https://manina.ai/docs/chatgpt-sign-in
Run Manina AI on your own ChatGPT Plus or Pro plan. Sign in from Settings › Model, with no API key; runs count against your plan's usage limits.
**Use the ChatGPT plan you already have.** With **Sign in with ChatGPT**, Manina AI's runs use your own ChatGPT plan instead of an API key. Runs count against your plan's usage limits, the same allowance Codex uses. Plus or Pro works best. Needs app 1.0.11 or later (TestFlight).
## Sign in
1. Open **Settings › Model**, or the **Give Me a Brain** page during setup.
2. Tap **Provider**. In **Choose Provider**, pick **ChatGPT** under **Use Your Subscription**.
3. Tap **Sign in with ChatGPT**. The app shows a short code.
4. Tap **Copy and Open Sign-in Page**. Sign in to ChatGPT on OpenAI's page and enter the code. The app shows **Waiting for sign-in** until you are done.
5. Back in the app, the account shows **ChatGPT … · signed in**. Pick a **Model**; the list shows the models your plan offers, best first.
Only enter a code that you started in the app. If a website or another person gives you a code, tap **Cancel**.
No API key is needed. The sign-in is kept in the iOS Keychain on this iPhone and renewed by itself.
## Usage limits and reasoning effort
Under the account, **5-hour limit** and **Weekly limit** show how much of your plan's allowance is used and when it resets. When a limit is reached, the run stops and says when you can go on.
If the model offers a choice, **Reasoning effort** sets how long it thinks per step. It starts at **low**, which keeps steps quick.
## Sign out
In **Settings › Model**, tap **Sign Out** next to the account. The app forgets the sign-in on this iPhone. To use another service, pick it in **Choose Provider**.
---
# Listen to phone audio
URL: https://manina.ai/docs/listen
Let ESP32 Agent hear what the iPhone plays, such as a listening exercise, a video, or a call. The sound is turned into text on the iPhone, in English and one more language.
**The agent can hear the iPhone.** While the screen is mirrored, the board passes the phone's sound to the app, which turns speech into text on the iPhone. The agent reads what it heard next to the screenshot, so it can answer a "Tap what you hear" exercise or follow a video.
Needs **App 1.0.2** and **board firmware v0.2.4** ([TestFlight channel](https://manina.ai/install?build=testflight)).
## Turn it on
1. Open **Settings → Listen to phone audio** and switch it on. It is off by default.
2. When iOS asks, allow speech recognition. If you said no earlier, turn it on in the iPhone's **Settings → ESP32 Agent**.
3. Pick the **Second language**, or leave **Automatic (from the screen)**.
## Languages
The app listens for English plus one more language:
- **Automatic (from the screen)** (default): the app reads the screen and picks the language it shows, for example Japanese in a Japanese lesson. When the lesson changes language, it switches between two sounds, and a first phrase it heard too early is transcribed again.
- **A fixed language**: always listen for that one.
- **None**: English only.
Only languages with speech recognition on the iPhone itself can be picked; others are skipped.
## What the agent gets
- The **words**, with the language, from the last seconds of sound. Not the sound itself.
- The agent decides when to play a sound, for example by tapping the speaker in an exercise. Nothing is played for it.
- Words can be misheard, especially short ones and similar-sounding ones.
## Privacy
Speech is turned into text **on the iPhone only**; the sound never leaves the phone. The words go into the agent's prompt like the screenshot does, so they reach the AI service you use. See the [privacy policy](https://manina.ai/privacy).
## Test it
**Settings → Developer → Audio test** plays a short phrase through Screen Mirroring and shows what the app heard. Turn on Listen to phone audio first, and keep the board connected and mirroring on.
## Manina AI CLI
With **Share with the computer (CLI)** on, Manina AI CLI 0.1.3 or later reads the same words with `esp32agent listen` (MCP tool `phone_audio`). `esp32agent listen mode local` instead transcribes the raw audio on the computer with whisper.cpp; see [the CLI guide](https://manina.ai/docs/cli).
## If it hears nothing
- **Screen Mirroring must be on**: the sound reaches the board only through AirPlay.
- **Check the firmware**: v0.2.4 or later; older boards don't pass sound on.
- Run the **Audio test** and [send diagnostics](https://manina.ai/docs/debugging) if it still fails.
---
# Tools (Beta) — let the agent look things up
URL: https://manina.ai/docs/tools
Give ESP32 Agent a web search or your own HTTPS tool, so it can check a product, brand or place it does not recognise before it acts on your iPhone. Manina AI Search, your own Exa key, or a tool file you import.
**A tool lets the agent look something up off the screen.** If a task names a product, a brand or a place the agent does not recognise, or that may be misspelt, it can search first instead of scrolling through results. It uses a tool only when it cannot go on well without one, and at most 3 times per task.
Find them in **Settings › Model › Tools**, or on the **Give Me a Brain** page during setup.
## Built-in tools
| Tool | What it needs |
| --- | --- |
| **Manina AI Search** | A Manina AI key. On by default once the key is set; it uses your plan like any other run. App Store app only; the TestFlight app doesn't show it. |
| **Web Search (Exa)** | Your own [Exa](https://exa.ai) API key. Press and hold the row, choose **Set Key…**, paste the key. |
With no tool on, the agent works exactly as before.
## Import your own tool
Any HTTPS endpoint that takes a query and returns text or JSON can be a tool. Describe it in a small JSON file, put the file in Files (iCloud Drive, AirDrop, …), then tap **Import Tools…**. A file can hold one tool or a list of them; a list is added whole or not at all.
```json
{
"id": "docs",
"title": "Our Docs",
"about": "Search our product docs: names, prices and how-tos.",
"url": "https://example.com/api/search"
}
```
| Field | Required | Meaning |
| --- | --- | --- |
| `id` | yes | The name the agent uses: 2–24 lowercase letters, digits or `_`. Not `search` or `web`. |
| `title` | yes | Shown in the list. |
| `about` | yes | One line telling the agent what the tool is good for. Keep it specific. |
| `url` | yes | Must be `https`. |
| `method` | no | `POST` (default) sends `{"query": "…"}` as JSON. `GET` adds `?query=…`. |
| `query_field` | no | The name of the query field. Default `query`. |
| `body` | no | Extra fields sent with every POST, as strings, for example `{"limit": "5"}`. Numbers are sent as numbers. |
| `key_header` | no | The header for your API key. Default `Authorization`. Set to `null` for a tool without a key. |
| `key_prefix` | no | Put before the key. Default `Bearer `. Use `""` for a bare key. |
If the tool needs a key, set it after importing: press and hold the row, **Set Key…**. The key stays in the iPhone's Keychain and is sent only to the tool's own address.
### What the agent reads
The answer is cut to about 1,500 characters. Search-shaped JSON reads best:
```json
{
"answer": "optional one-line answer",
"results": [
{ "title": "…", "url": "https://…", "content": "a short snippet" }
]
}
```
`snippet`, `text` or `description` also work in place of `content`. Anything else is passed on as plain text. If a call fails, the agent is told so and goes on without it.
To remove an imported tool, swipe it left. Importing a file with the same `id` replaces the tool.
## Export
**Export Tools…** saves your imported tools as one `handsy-tools.json` (a list) to share or to import on another iPhone. Keys are not in it: set them again there.
---
# Phone calls
URL: https://manina.ai/docs/phone-calls
Manina AI can place a call and hold a short conversation. It speaks through iOS Live Speech and listens through Live Captions.
**Manina AI can place a call and hold a short conversation:** it speaks through iOS **Live Speech** and listens through **Live Captions**.
## Setup
1. **Turn on Live Speech:** Settings › Accessibility › Live Speech.
2. **Let Manina AI read call captions:** Settings › Accessibility › Live Captions › **Keep Call Captions › 1 Hour**. With the default 1 Minute, iOS keeps call captions out of screenshots, recordings and Screen Mirroring, so Manina AI cannot hear the other side. With 1 Hour, iOS announces "This call is being transcribed" to everyone on the call. Under **Language**, pick the language the call is in.
3. **Add Live Speech and Live Captions to Control Center:** touch and hold Control Center, tap **Add a Control**, and search for each one.
4. **Make both large and put them on the bottom row:** Live Speech on the left, Live Captions on the right, as in the video. Manina AI taps them at those spots, so they open within seconds after dialing.
## Notes
- **Works best in English.** Live Captions understands English best; other languages work but are less accurate.
- **Call audio never goes through Screen Mirroring.** Manina AI hears the call only through Live Captions.
- **Phone calls are in beta.** The app shows this setup before each call until you tap **Don't Show Again**. Reopen it from **Settings › Phone Calls**.
- **FaceTime calls are not supported:** iOS never lets their captions be captured.
## Example
> Call Alex and book a haircut for tomorrow at 3 PM.
---
# Update ESP32 Agent firmware: Official vs TestFlight, over Wi-Fi or USB
URL: https://manina.ai/docs/firmware-updates
How ESP32 Agent board firmware is updated: the Official and TestFlight channels, updating from the iPhone app over the board's Wi-Fi, automatic rollback, and a fresh install over USB from the web installer.
**Once the board is set up, update it from the iPhone app over Wi-Fi.** Use the [web installer](https://manina.ai/install) over USB only for the first install, for a board too old for Wi-Fi updates, or to start fresh.
## Two channels
Board firmware is released on two channels. Each one matches an app build.
| Channel | App | Installer |
| --- | --- | --- |
| **Official** | The App Store app reads `handsy.tech/firmware/firmware.json`. | [manina.ai/install](https://manina.ai/install) |
| **TestFlight** | The TestFlight app reads `handsy.tech/firmware/testflight/firmware.json`. | [manina.ai/install?build=testflight](https://manina.ai/install?build=testflight) |
Each app offers updates only from its own channel. Install the board firmware from the channel that matches your app. The current versions are in the [changelog](https://manina.ai/docs/changelog#board-firmware).
Every release is signed. The app checks the signature and the image before it sends anything to the board.
## Update from the app
Open **Settings → Board**. The **Firmware** section shows the version on the board, with **Check for Updates** and **Update Now**. When an update is available, the Agent tab also shows a banner.
An update can start when:
- **The board is connected** to the app.
- **The iPhone is on the board's Wi-Fi.** The image goes over that Wi-Fi; the internet keeps working over cellular data.
- **No task or recording is running.** Wait until it ends.
- **The board's firmware is new enough for Wi-Fi updates.** A very old board needs one install over USB from the [web installer](https://manina.ai/install) first.
Keep the app open and the board plugged in. It takes about a minute. The board restarts at the end; start Screen Mirroring again afterwards. Your intents and settings stay as they are.
If the app needs later board firmware, it shows **Board Update Required** as soon as the board connects.
## If an update fails
- A dropped connection is retried, up to three times.
- The board keeps its current firmware until the whole new image is written and checked. A failed send leaves it unchanged.
- If the new firmware doesn't start properly, the board goes back to the previous one by itself.
## Reinstall from the web installer
A fresh install over USB from [manina.ai/install](https://manina.ai/install) **erases the board**: its Bluetooth pairing, hotspot password, and settings such as station mode. Use it to start clean, or when the board can't take a Wi-Fi update.
1. Install the firmware from the channel that matches your app. If the board doesn't show up, hold **BOOT** while plugging it in. See [Failed to connect](https://manina.ai/docs/failed-to-connect).
2. On the iPhone, open **Settings → Bluetooth**, tap **(i)** next to the old **ESP32 Agent**, and choose **Forget This Device**.
3. Plug the board into the iPhone and pair again in the app. Join the board's hotspot with its new password.
If something goes wrong in the installer, click **Download log** and send it to [support@manina.ai](mailto:support@manina.ai).
## USB or Bluetooth boards
When the installer asks how the board reaches your iPhone (**USB cable** or **Bluetooth**), it installs firmware that can do both. This firmware doesn't take updates from the app yet. **To update it, install it again from [manina.ai/install](https://manina.ai/install)** and make the same choice. Like any reinstall, this erases the board, so pair it again afterwards.
Bluetooth mode needs Manina AI 1.0.8 or newer, on TestFlight for now.
---
# Manina AI for Android
URL: https://manina.ai/docs/android-app
Set up the Manina AI Android app with an ESP32-S3 board: pair it over Bluetooth, pick an AI, and run a first task. No Accessibility service, no root, no developer mode.
**Manina AI for Android runs on the phone it operates.** You type a task, the app looks at the screen and asks the model for the next step, and a small board taps and types it. It goes on step by step until the task is done or needs you. The app is coming to Google Play. Like the iPhone app, it is open source under the MIT license, in `android/` of [github.com/onehumanbeing/esp32-iphone-agent](https://github.com/onehumanbeing/esp32-iphone-agent).
## How it works
- **Eyes:** Android's own screen capture. The app asks for it at the start of every task and captures only while that task runs.
- **Brain:** Manina AI Free, the same plan and act loop as the [Manina CLI](https://manina.ai/docs/manina-cli), or your own model.
- **Hands:** an ESP32-S3 board paired with the phone over Bluetooth as a pen, mouse and keyboard. The app sends it each tap, swipe and key.
No Accessibility service, no root, no developer mode and no USB debugging. Android sees the board as an ordinary Bluetooth accessory, like a mouse or keyboard.
## What you need
| Item | What to prepare |
| --- | --- |
| Android phone | The Google Play build needs Android 7.0 or later. The open build runs on Android 6.0 or later (tested end to end on a Mi Note running Android 6). |
| Board | An ESP32-S3 board with 8 MB flash, such as the standard [Seeed Studio XIAO ESP32S3](https://manina.ai/docs/hardware), flashed with the Android firmware ([Android board](https://manina.ai/docs/android-board)). |
| Power for the board | Any USB charger or power bank. The board talks to the phone over Bluetooth, so nothing plugs into the phone. |
| AI | Manina AI Free, or your own image-capable model and key. |
The app is in English and Simplified Chinese and follows the phone's language.
## 1. Open the app
1. Install Manina AI and open it.
2. Read the first screen. It says what is captured, where it goes and how to stop. Tap **Agree and continue**.
3. Setup walks you through the board and the AI. You can skip a step with **Later** and come back in **Settings**.
## 2. Pair the board
**Settings › Board › Pair a board.** Power the board near the phone, pick it in Android's list and confirm the pairing. The app then checks that Android connected it as a pointer and a keyboard.
Most phones take the board as a pen: it taps exactly where it points, with no calibration. On older kernels (Android 6) Android takes it as a mouse instead: tap **Calibrate pointer** once. More, including firmware updates: [Android board](https://manina.ai/docs/android-board).
## 3. Choose the AI
- **Manina AI Free.** On the Google Play build it works without signing in on most phones. Otherwise, open **Settings › Account** and tap **Sign in with manina.ai** (a browser tab opens for Google sign-in, then returns to the app), or paste a Manina API key.
- **Your own model.** In **Settings › Model**, add an OpenAI-compatible provider that accepts images, with your key. Screenshots then go to that provider, and no Manina account is needed.
Keys and sign-in tokens are encrypted on the phone with an Android Keystore key.
## 4. Run a first task
1. Type a task, for example **"Open Settings and go to Wi-Fi"**, and tap **Run**.
2. Confirm the short notice, then allow Android's screen capture. Android asks every task; you can share one app or the whole screen.
3. Watch it work. A notification with **Stop** stays up for the whole task.
A task ends when it is done, when you tap **Stop** (in the app or the notification), when you lock the phone, or when the board disconnects. Screens an app protects from capture come through black: the task stops there and hands control back to you. Open **Runs** to review each step afterwards. The run history stays on the phone.
## Try it without a board
- **Demo mode.** In setup, tap **No board yet? Try the demo**, or turn on **Settings › Developer › Demo mode**. Start plays a sample task with its plan and screenshots, each tap drawn on them. Nothing is captured, tapped or sent. Demo runs are kept apart from yours and deleted when you tap **Leave demo**.
- **Try without a board.** Runs a real task, but shows each step ("Tap: Settings") in the app and the notification. You do it yourself and tap **Next**. Nothing is tapped for you.
## Not on Android
| iPhone feature | On Android |
| --- | --- |
| Screen Mirroring (AirPlay) to the board | Not needed: the app captures the screen with Android's own screen capture, so there is no board Wi-Fi to join during a task. |
| Shortcuts and Siri | Not available: they are iOS features. Save a task as an intent and run it from the app. |
| Live Activity and the Dynamic Island | Not available: the running task shows in a notification with **Stop** instead. |
## Privacy
The screen is captured only while a task you started runs. Screenshots and your task go to the AI you chose, to decide each step, and can show anything on the screen, so avoid sensitive tasks. Nothing runs in the background, at boot or on a schedule. Read the [privacy policy](https://manina.ai/privacy).
Drive the same phone from a coding agent on your computer: [Android from the computer (CLI)](https://manina.ai/docs/android-cli).
---
# Android board: firmware, pairing, pen or mouse, and updates
URL: https://manina.ai/docs/android-board
The ESP32-S3 board for Manina AI on Android: the Android firmware (Bluetooth pen, mouse and keyboard), pairing in the app, pen or mouse mode with calibration, and firmware updates over Wi-Fi.
**On Android the board is the phone's Bluetooth pen, mouse and keyboard.** It runs its own Android firmware, pairs with the phone in the Manina AI app, and performs each tap, swipe and key the app sends. Nothing plugs into the phone, so the board takes power from any USB charger or power bank. Set up the app first: [Manina AI for Android](https://manina.ai/docs/android-app).
## The Android firmware
The Android firmware is a Bluetooth HID build of the board firmware for an ESP32-S3 board with 8 MB flash. It shows up on the phone as a pen digitizer, a mouse and a keyboard. The Android app needs this build: a board installed for the iPhone doesn't drive it.
To install the first Android firmware, open [manina.ai/install](https://manina.ai/install?build=android), choose **Android** and install it in Chrome or Edge on a computer, with the board plugged in by USB. After that, updates come from the app over Wi-Fi (below).
## Pair the board
1. Power the board from a USB charger or power bank and keep it near the phone, with the antenna attached.
2. In the app, open **Settings › Board › Pair a board**.
3. Pick the board in Android's list and confirm the pairing request.
4. The app checks that Android connected the board as a pointer and a keyboard, and says which mode it uses.
## Pen or mouse
- **Pen (most phones).** Android treats the board as a pen and taps exactly where it points. No cursor and no calibration: Settings shows **Touch pointer: no calibration needed**.
- **Mouse (older kernels, such as Android 6).** Android treats the board as a mouse. Tap **Calibrate pointer** once in **Settings › Board** and don't touch the screen: the board moves the pointer and clicks twice. Calibrate again if you change the phone's pointer speed.
Back is the Esc key and Home is Meta+Enter, both sent from the board's keyboard.
## Firmware updates
**Settings › Board › Check for Updates.** Once the board runs the Android firmware, the app updates it over Wi-Fi. When an update is listed:
1. Tap **Update to** the new version.
2. The update goes over the board's Wi-Fi. Join the board's network in the phone's Wi-Fi settings with the password the app shows, come back and tap **Send to Board**. (If the board is on your own Wi-Fi network, put the phone on that network instead.)
3. Keep the app open until it says the board is updated.
4. The board's Wi-Fi has no internet: switch the phone back to your usual Wi-Fi afterwards.
What the app may say instead:
- **No update published yet:** the board keeps working as it is.
- **This board can't update over the air:** install the Android firmware once from [manina.ai/install](https://manina.ai/install?build=android) (choose Android); later updates come from the app.
- **The newest firmware needs a newer app:** update the app first.
## Troubleshooting
- **Nothing happens on the screen.** Check that the board has power, is near the phone and shows as connected in Android's Bluetooth settings.
- **Taps land in the wrong place (mouse mode).** Tap **Calibrate pointer** again.
- **Pairing fails.** In Android's Bluetooth settings, forget the board, then pair again from **Settings › Board › Pair a board**.
Need logs? **Settings › Board › Share Board Log** sends the board's log from the app.
---
# CLI & AI agents
URL: https://manina.ai/docs/cli
Let an agent on your computer see and use your real iPhone through Manina AI CLI.
**Your agent already works on your computer. Give it a way to use your iPhone, too.** Manina AI CLI (`esp32agent`) connects over Bluetooth, or over your Wi-Fi, to the small board plugged into your phone. Your agent can request a screenshot, tap, swipe, and type, then look again to check the result.
Use Claude Code or Codex through MCP, or connect another agent that can run local commands or use a local stdio MCP server. The agent runs on your computer; the board receives the iPhone's Screen Mirroring and acts as its mouse and keyboard.
Manina AI CLI is open source under the MIT license: [github.com/onehumanbeing/esp32-iphone-agent](https://github.com/onehumanbeing/esp32-iphone-agent), in `cli/` on the `release-1.0` branch.
> **Looking for the hosted Manina model CLI (`npm i -g manina`)?** To run tasks, saved intents, and background schedules on Android (`adb`) or iPhone using `Manina-4B-Lite` and your Manina AI account balance, see [Manina CLI (`manina`)](https://manina.ai/docs/manina-cli). This page covers `esp32agent`, the local hardware and MCP bridge for external coding agents.
The same commands also drive an Android phone running the Manina AI app: [Android from the computer](https://manina.ai/docs/android-cli).
## Watch a real task
In this example, Claude Code uses an iPhone to open Chrome's incognito mode, visit Google Maps, and search for coffee near East Broadway station in New York. It reads the actual screen and works through the task, rather than calling a Maps API.
The same plugin works in [DeepSeek Harness](https://manina.ai/docs/deepseek-harness). Here it opens Settings, reads which Wi-Fi the phone is on and goes back Home, with the phone (left) and dsh (right) time-aligned:
Try the same task with your agent once connected:
> Use esp32agent to open Chrome in incognito mode on my iPhone, visit the Google Maps website, and find coffee near East Broadway station in New York. Check a fresh screenshot after each action and stop when the map and café results are visible.
## Setup walkthrough
Flash the board first ([Prepare the board](https://manina.ai/docs/getting-started#1-prepare-the-board)), then follow this video to install the CLI and connect your agent.
## Install once, then hand it to your agent
Manina AI CLI is available for macOS, Linux, and Windows; the installers below always fetch the latest release ([release list](https://manina.ai/cli/versions.json)). Flash the latest board firmware from the [installer](https://manina.ai/install): both channels support the CLI, Bluetooth and Wi-Fi.
### macOS or Linux
```sh
curl -fsSL https://manina.ai/install.sh | sh
```
### Windows PowerShell
```powershell
irm https://manina.ai/install.ps1 | iex
```
### npm
```sh
npm install -g esp32agent
```
The npm package needs Node.js 18 or later and downloads the same release for your system.
### Installer options
| Variable | What it does |
| --- | --- |
| `ESP32AGENT_VERSION` | Install a specific version, for example `0.1.0`. Default: the latest. |
| `ESP32AGENT_BIN_DIR` | Where to put `esp32agent`. Default: `~/.local/bin` (Windows: `~\.local\bin`). |
```sh
curl -fsSL https://manina.ai/install.sh | ESP32AGENT_VERSION=0.1.0 ESP32AGENT_BIN_DIR=/usr/local/bin sh
```
The installers check each download's SHA-256 before installing it.
### Upgrade
```sh
esp32agent upgrade --check # current and latest version
esp32agent upgrade # install the latest release
```
The CLI needs Bluetooth on the computer. Screenshots also need **ffmpeg**; the installer can offer a package-manager command for your system. Follow its prompts and reopen your terminal if `esp32agent` is not found. The shell installer uses `~/.local/bin`; make sure that directory is on your `PATH`.
{/* Screenshots: the published installer, ffmpeg prompt, and actual successful version output. */}
## 1. Find and pair your board
Choose the supported board and attach its antenna using the [hardware guide](https://manina.ai/docs/hardware). Flash the **latest firmware** from the [installer](https://manina.ai/install); Manina AI CLI cannot find a board running firmware older than v0.2.2.
**Pairing does not need the iPhone app.** Plug the board into your iPhone, enable Bluetooth on your computer, and keep them nearby. Your computer can stay on its normal internet connection.
An agent with local terminal access can handle discovery and pairing. Give it this request:
> Use your local terminal to set up esp32agent for my iPhone. My board runs the latest firmware from manina.ai/install. Discover my board and pair if needed. Help me find the board's hotspot password (https://manina.ai/docs/faq#how-do-i-find-the-boards-wi-fi-password), then guide me to join the board's Wi-Fi and enable Screen Mirroring and AssistiveTouch on the phone. Verify a fresh screenshot and calibrate the pointer. Ask which board is mine if several are found.
For manual setup, run:
```sh
esp32agent devices
esp32agent pair
```
`pair` discovers and pairs with a single nearby board itself; you do not need to pair it in the computer's Bluetooth settings first. If more than one board is found, use the identifier returned by `devices`: `esp32agent pair --device `.
Run the first `pair` within three minutes of powering the board. If that window has closed, unplug and reconnect it, then retry.
## 2. Connect Wi-Fi and mirror your screen
Find the board's hotspot name (`ESP32Agent-…`) and password in the ESP32 Agent app, or read them over USB serial: see [how to find the hotspot password](https://manina.ai/docs/faq#how-do-i-find-the-boards-wi-fi-password). With firmware v0.2.3 or later, `esp32agent net` shows them too.
Then, on your iPhone:
1. Open **Settings → Wi-Fi** and join the board's hotspot with its name and password.
2. Turn on **Control Center → Screen Mirroring → ESP32 Agent**.
3. Enable **Settings → Accessibility → Touch → AssistiveTouch**. Keep the pointer visible, and the phone unlocked and in portrait.
The phone uses the board's Wi-Fi for mirroring; the computer reaches the board over Bluetooth. If you restart the board, reconnect the phone's Wi-Fi and start Screen Mirroring again.
### Optional: put the board on your home Wi-Fi
With the board and the computer on the same Wi-Fi, the CLI sends commands and video over Wi-Fi: screenshots are close to live and taps don't queue behind video. Bluetooth stays connected as the way back.
```sh
esp32agent net join
```
It asks for your Wi-Fi's name and password (the password is not shown), sends them to the board over the paired Bluetooth session, and tells you each step: join the same Wi-Fi on the iPhone, then start Screen Mirroring to ESP32 Agent again. `esp32agent net` shows which link is in use (`via: wifi` or `ble`); `esp32agent net hotspot` puts the board back on its own hotspot. A computer that joins the board's hotspot also gets the Wi-Fi link.
This needs board firmware v0.2.3 or later, which both [installer](https://manina.ai/install) channels provide. With v0.2.2 the CLI keeps working over Bluetooth.
Check the current screen and calibrate:
```sh
esp32agent device info
esp32agent screenshot
esp32agent calibrate
```
The screenshot command saves a PNG on your computer and reports its `filePath`. Open that file and check that it shows the phone's current screen. The CLI measures the pointer itself; the first pointer action also calibrates automatically if needed.
If the picture is stale, disconnect and restart Screen Mirroring. If pairing fails, check the antenna and move the computer closer.
{/* Screenshots: the actual pairing prompt, hotspot details with the password obscured, and a fresh phone screenshot. */}
## 3. Connect your agent
Complete the initial pairing in a terminal first, or ask an agent with local terminal access to do it using the request above. The MCP server provides phone controls; its tools do not perform the initial device discovery and pairing.
### Claude Code
Install the Manina AI plugin. It adds the MCP server and the skill in one step. Run these inside Claude Code:
```text
/plugin marketplace add onehumanbeing/esp32-iphone-agent
/plugin install esp32agent@manina
```
Or set it up by hand: register the local MCP server, then install the CLI's Claude skill.
```sh
claude mcp add esp32agent -- esp32agent mcp
esp32agent skill install
```
The skill goes under `~/.claude/skills/esp32agent/`. It gives Claude the phone workflow and command guidance; MCP provides the tools.
### Codex
Register the same MCP server with Codex:
```sh
codex mcp add esp32agent -- esp32agent mcp
```
### DeepSeek Harness
Install the plugin; it adds the same MCP server and the `handsy` skill:
```sh
dsh plugin --profile web add dsh-esp32agent
```
Restart `dsh web`, then ask for a small task. Full steps: [DeepSeek Harness](https://manina.ai/docs/deepseek-harness). Plugin source: [integrations/dsh](https://github.com/onehumanbeing/esp32-iphone-agent/tree/main/integrations/dsh) for details.
### Another agent
Use `esp32agent mcp` as a local stdio MCP server, or let your agent call the CLI directly. It needs access to the computer's Bluetooth and the saved screenshots. A remote agent without access to this computer cannot reach the board by itself.
The skill is also on [ClawHub](https://clawhub.ai/onehumanbeing/handsy) as `handsy`, and the MCP server is in the [MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=esp32agent) as `io.github.onehumanbeing/esp32agent` (npm package `esp32agent`). The skill files are MIT-0; the rest of the repository keeps its own license.
For a setup request you can paste into an agent, use the [homepage's CLI entry](https://manina.ai/?setup=cli#start). The [agent setup guide](https://manina.ai/cli-guide.md) contains the installation and verification steps in plain Markdown.
## 4. Give it a small first task
Try this request in your agent:
> Use esp32agent to take a screenshot of my iPhone. Open Settings and go to Wi-Fi. Take a fresh screenshot after each action to check the result. Stop when the Wi-Fi page is visible.
The agent should **look → take one action → look again**. Watch the first task and interrupt your agent if it goes off track. For a longer task, describe the destination and what counts as finished.
The CLI provides the controls; your agent supplies the reasoning and AI service. The free AI service in the phone app is a separate way to use Manina AI.
## Useful commands
These are examples of individual actions. Choose coordinates from a fresh screenshot before running a tap or swipe; coordinates are **pixels in the original screenshot**, not percentages.
```sh
esp32agent screenshot
esp32agent io tap 200,400
esp32agent io swipe 200,800,200,300
esp32agent io text 'hello'
esp32agent io keys enter
esp32agent io button HOME
```
Chinese typing uses the phone's Pinyin keyboard and requires selecting the intended candidate. Enable that keyboard first and have the agent check the text on screen.
## All commands
Every command prints JSON: `{"status":"ok","data":...}`, or `{"status":"error","error":"..."}` with exit code 1.
| Command | What it does |
| --- | --- |
| `devices` | Boards nearby. |
| `pair`, `unpair` | Pair this computer (within 3 minutes of plugging the board in), or forget the board here. |
| `screenshot [--format png\|jpeg] [--quality N] [--scale F] [--max-size N] [--output PATH\|-]` | The screen after the last action settled. Saves a file in the current folder by default. |
| `io tap X,Y [--aim] [--count N]` | Tap at screenshot pixels. `--aim` finds the pointer first for a precise tap; `--count 2` double-taps. |
| `io longpress X,Y [--duration MS]` | Press and hold. |
| `io swipe X1,Y1,X2,Y2` | Swipe. |
| `io text 'TEXT'` | Type ASCII text. Chinese is typed as Pinyin. |
| `io keys COMBO` | `enter`, `esc`, `tab`, `backspace`, `space`, arrows, `cmd+a`, `shift+tab`, … |
| `io button HOME` | Go to the Home Screen. HOME is the only button. |
| `screencapture --format h264\|mjpeg` | Live video to stdout, for example `\| ffplay -`. |
| `device info` | Board status: mirroring, frozen video, whether the app is using the phone, USB, Bluetooth. |
| `calibrate` | Measure the pointer. Runs by itself on the first tap. |
| `net` | The CLI's link (`via`: `ble` or `wifi`) and the board's Wi-Fi. |
| `net join [SSID [PASSWORD]]` | Put the board on your Wi-Fi; asks for the name and password if not given. |
| `net hotspot` | Put the board back on its own hotspot. |
| `net via auto\|ble` | `ble` keeps the CLI on Bluetooth (also `ESP32AGENT_TRANSPORT=ble`). |
| `history list`, `history show RUN\|latest`, `history new` | What was done on the phone: recent runs, one run's steps, or start a new run. |
| `intent list`, `intent show NAME` | Saved intents. |
| `intent save --name N --prompt P [--hint H ...] [--from-run RUN [--steps 1,3,4]]` | Save an intent, optionally with a run's replayable steps. |
| `intent delete NAME` | Delete an intent. |
| `intent export NAME... [--screenshots] [--output FILE]` | Write an `.esp32intent` file the iPhone app can import. |
| `intent import FILE` | Import an `.esp32intent` file from the app or `export`. |
| `report --intent NAME [--screenshots]` | Prepare a mail with one redacted intent for the developer. Interactive; you send it yourself. |
| `logs [--board] [--save] [--output F]` | The CLI's log; `--board` the board's own log; `--save` one file for support. See below. |
| `upgrade [--check] [--force]` | Install the latest release. |
| `mcp` | MCP server on stdio. |
| `skill install` | Install the agent skill to `~/.claude/skills/esp32agent/`. |
| `daemon [stop]`, `version` | The background process (started automatically), and the CLI version. |
With several boards nearby, pass `--device ` or set `ESP32AGENT_DEVICE`.
### MCP tools
`esp32agent mcp` offers these tools: `screenshot`, `tap`, `longpress`, `swipe`, `type_text`, `press_key`, `press_button`, `device_info`, `history`, `intent_list`, `intent_show`, and `intent_save`. Pairing and `report` are terminal-only.
### Logs
The first command starts a background `esp32agent daemon` that holds the Bluetooth link; it writes `daemon.log` in the CLI's settings folder and rotates it as it grows.
```sh
esp32agent logs # last lines of the CLI's log
esp32agent logs --board # the board's own log (firmware 0.2.3 and later)
esp32agent logs --save # CLI log, board log and board state in one file
esp32agent logs --save --output manina-logs.txt
```
`--save` writes a text file and prints its path; send it to [support@manina.ai](mailto:support@manina.ai). Nothing is sent by the CLI. For more detail in `daemon.log`, set `ESP32AGENT_DEBUG=1`: it records each command's name, result, and timing, but no typed text, screenshots, or keys.
## Limits
- **The app has priority.** While the iPhone app drives the phone, and for about 20 seconds after, pointer and keyboard commands fail with `busy: the app is using the phone`. Wait and retry.
- **Over Bluetooth, video is slow.** Screenshots can be about a second behind, and animations are choppy. Use [the Wi-Fi link](#optional-put-the-board-on-your-home-wi-fi) when you can.
- **No app launching or installing.** The CLI can't open apps directly; have the agent go through the Home Screen or search.
- **No volume or power keys.** HOME is the only hardware button.
- **Typing is ASCII**, one key per character. There is no clipboard access.
## Switch between the app and CLI
Use them in turns. An active app operation has priority and can interrupt the CLI connection. Stop the app task before starting a CLI task; if the CLI reports that the board is busy, wait before retrying. If the picture stops updating after a switch, restart Screen Mirroring and check a fresh screenshot.
CLI history is stored on your computer. Inspect the latest run with `esp32agent history show latest`. Intent files (`.esp32intent`) can be exported and moved between the computer and app with Files or AirDrop; this is a file handoff, rather than automatic history synchronization.
Screenshots may be sent to the model used by your computer agent. Check that agent's permissions and provider's data policy, as well as Manina AI's [privacy policy](https://manina.ai/privacy), before using personal accounts or screens.
Need help with mirroring, the antenna, or the pointer? See the [FAQ](https://manina.ai/docs/faq). Use only devices and accounts you own or are authorized to control; see the [disclaimer](https://manina.ai/docs/disclaimer).
---
# How do I let Codex operate my iPhone?
URL: https://manina.ai/docs/codex-iphone
Give Codex a real iPhone in one command. Register the Manina AI MCP server (esp32agent mcp), plug a XIAO ESP32S3 board into the phone, and Codex can take screenshots, tap, swipe and type. No jailbreak, no Xcode.
**Register one local MCP server and Codex can see and use a real iPhone.** The server is Manina AI CLI (`esp32agent`). It talks over Bluetooth, or your Wi-Fi, to a small XIAO ESP32S3 board on the phone. The board receives the iPhone's Screen Mirroring and acts as its mouse and keyboard, so iOS stays stock: no jailbreak, no Xcode, no developer account.
**No board yet?** [Buy a XIAO ESP32S3](https://manina.ai/where-to-buy-esp32), then [flash it in your browser](https://manina.ai/install).
## What you need
- A standard **Seeed Studio XIAO ESP32S3** (8 MB flash, 8 MB PSRAM), with its antenna attached: [where to buy](https://manina.ai/where-to-buy-esp32).
- Board firmware v0.2.2 or later, from the [installer](https://manina.ai/install) in Chrome or Edge.
- An iPhone XS or newer on iOS 18 (or iPhone 8 / X on iOS 16.4+), with cellular data.
- A computer with Bluetooth where Codex runs. Screenshots also need **ffmpeg**.
## 1. Install the CLI
```sh
curl -fsSL https://manina.ai/install.sh | sh
```
On Windows PowerShell: `irm https://manina.ai/install.ps1 | iex`. With Node.js 18+: `npm install -g esp32agent`.
## 2. Pair the board and mirror the screen
Plug the board into the iPhone, then within three minutes of powering it:
```sh
esp32agent devices
esp32agent pair
```
On the iPhone, join the board's hotspot (`ESP32Agent-…`; [find the password](https://manina.ai/docs/faq#how-do-i-find-the-boards-wi-fi-password)), turn on **Control Center → Screen Mirroring → ESP32 Agent**, and turn on **Settings → Accessibility → Touch → AssistiveTouch**. Check it:
```sh
esp32agent screenshot
esp32agent calibrate
```
## 3. Add the MCP server to Codex
```sh
codex mcp add esp32agent -- esp32agent mcp
```
Codex now has these tools: `screenshot`, `tap`, `longpress`, `swipe`, `type_text`, `press_key`, `press_button`, `device_info`, `history`, `intent_list`, `intent_show` and `intent_save`. Pairing stays in the terminal.
## 4. Give it a small first task
> Use esp32agent to take a screenshot of my iPhone. Open Settings and go to Wi-Fi. Take a fresh screenshot after each action to check the result. Stop when the Wi-Fi page is visible.
The agent should **look → take one action → look again**. Watch the first run and stop Codex if it goes off track. Codex supplies the reasoning and the model; the CLI only provides the phone controls.
## Limits
- Over Bluetooth, screenshots can be about a second behind. Put the board on your Wi-Fi with `esp32agent net join` for near-live screenshots.
- The CLI can't open or install apps directly: the agent goes through the Home Screen or search. HOME is the only hardware button.
- Typing is ASCII, one key per character; Chinese goes through the Pinyin keyboard.
- While the iPhone app is running a task, CLI commands answer `busy`. Use one at a time.
Screenshots go to the model Codex uses. Check its data policy before working on personal accounts, and use only devices and accounts you own or may control ([disclaimer](https://manina.ai/docs/disclaimer)).
Full command list, Wi-Fi link and logs: [CLI & AI agents](https://manina.ai/docs/cli). The same server works in [Claude Code](https://manina.ai/claude-code-iphone) and other [MCP clients](https://manina.ai/iphone-mcp).
---
# DeepSeek Harness
URL: https://manina.ai/docs/deepseek-harness
Let DeepSeek Harness (dsh) see and drive your real iPhone with the dsh-esp32agent plugin. No Mac, no Xcode, no jailbreak.
**[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`) can use your real iPhone.** The `dsh-esp32agent` plugin adds the Manina AI MCP server and the `handsy` skill, so the agent takes a screenshot, taps, swipes and types, then looks again to check the result.
It is a plain hardware add-on: no Mac, no Xcode, no Apple Developer account and no jailbreak. Manina AI is not affiliated with DeepSeek.
## Quick start
1. **Get a board:** Seeed Studio XIAO ESP32S3 and a short USB-C data cable. See the [hardware guide](https://manina.ai/docs/hardware).
2. **Flash firmware v0.2.3 or later** from the [installer's TestFlight channel](https://manina.ai/install?build=testflight) (Chrome or Edge). v0.2.2 works over Bluetooth only.
3. **Pair your computer** within 3 minutes of plugging the board into the iPhone (Node.js 18+ and `ffmpeg`):
```sh
npx -y esp32agent pair
```
4. **Set up the iPhone:** join the board's Wi-Fi hotspot (`npx -y esp32agent net` shows its name and password), turn on **Control Center → Screen Mirroring → ESP32 Agent**, and enable **Settings → Accessibility → Touch → AssistiveTouch**. To use your home Wi-Fi instead, see [hotspot vs home Wi-Fi](https://manina.ai/docs/wifi-hotspot-vs-home-wifi).
5. **Install the plugin** and restart `dsh web`:
```sh
dsh plugin --profile web add dsh-esp32agent
```
6. **Try a small task** in dsh:
> Use the esp32agent tools to control my iPhone. Take a screenshot first, then open Settings, go into Wi-Fi, and tell me which network the phone is connected to. Finally press Home.
## Check and troubleshoot
Check that the plugin is loaded (use your own profile name):
```sh
dsh --profile web --dump-config | grep esp32agent
```
With several boards, set `ESP32AGENT_DEVICE` to the board id before starting dsh. Connection problems: see [Failed to connect](https://manina.ai/docs/failed-to-connect) and the [CLI guide](https://manina.ai/docs/cli).
## Safety
dsh does not ask before each MCP action, and these actions happen on a real phone. The `handsy` skill tells the agent to ask you before anything that spends money, sends a message, calls someone, deletes data or changes security settings, and to hand passwords and one-time codes to you. Watch the first tasks.
Plugin source: [integrations/dsh](https://github.com/onehumanbeing/esp32-iphone-agent/tree/main/integrations/dsh) (MIT).
---
# Can an AI agent test my iOS app on a real iPhone?
URL: https://manina.ai/docs/test-ios-app-real-iphone
Yes. With Manina AI CLI and a XIAO ESP32S3 board, Claude Code, Codex or any MCP client can look at a real iPhone's screen and tap, swipe and type through your app like a tester. No jailbreak, no WebDriverAgent, no simulator.
**Yes: an agent on your computer can walk through your app on a real iPhone, the way a person would.** A small XIAO ESP32S3 board on the phone receives Screen Mirroring and acts as a USB or Bluetooth mouse and keyboard. Manina AI CLI (`esp32agent`) gives your agent the controls. It sees the real screen, so it works with any app on the phone: your build, a TestFlight build, or an App Store app. Nothing is installed in your app and iOS stays stock.
**No board yet?** [Buy a XIAO ESP32S3](https://manina.ai/where-to-buy-esp32), then [flash it in your browser](https://manina.ai/install).
## Why a real phone
A simulator doesn't show what a user sees on a device: real Screen Mirroring, real keyboards, system sheets and permission prompts. The board taps the actual screen, so the agent meets the same screens your users do.
## Set it up
1. Get the board and attach its antenna ([where to buy](https://manina.ai/where-to-buy-esp32)), then flash it from the [installer](https://manina.ai/install) in Chrome or Edge.
2. Install the CLI: `curl -fsSL https://manina.ai/install.sh | sh` (Windows: `irm https://manina.ai/install.ps1 | iex`, or `npm install -g esp32agent`).
3. Pair it: `esp32agent pair`, within three minutes of powering the board.
4. On the iPhone, join the board's hotspot, start **Screen Mirroring → ESP32 Agent**, and turn on **AssistiveTouch**. Check with `esp32agent screenshot`.
5. Connect your agent:
```sh
claude mcp add esp32agent -- esp32agent mcp # Claude Code
codex mcp add esp32agent -- esp32agent mcp # Codex
```
Any client that runs a local stdio MCP server can use `esp32agent mcp`. Full steps: [CLI & AI agents](https://manina.ai/docs/cli).
## Write the test as a task
Install your build on the phone the way you normally do. The CLI can't install or launch apps, so tell the agent how to reach it from the Home Screen, what to do, and what counts as passing:
> Use esp32agent. From the Home Screen, search for "MyApp" and open it. Sign in with the test account in the note on screen, add one item to the cart and open the cart. Take a fresh screenshot after each action. Pass if the cart shows one item; otherwise stop and tell me which screen differed and why.
The agent works in a **look → one action → look again** loop. Every command returns JSON, and `esp32agent screenshot` saves a PNG, so results are easy to keep with your test notes.
## Repeat a flow
- `esp32agent history show latest` lists what was done in the last run.
- Save a good run as an intent: `esp32agent intent save --name checkout --prompt "…" --from-run `, with RUN from `esp32agent history list`. Move it to the iPhone app with `esp32agent intent export`; there, recorded moves replay without the AI while the screen matches what was recorded ([intents](https://manina.ai/docs/intents)).
- `esp32agent screencapture --format h264 | ffplay -` shows live video while the agent works.
- With the board on your Wi-Fi (`esp32agent net join`), screenshots are close to live and taps don't queue behind video.
## Limits
- The phone stays unlocked and in portrait. iOS doesn't mirror passcode entry, Apple Pay or DRM-protected video.
- HOME is the only hardware button; there are no volume or power keys.
- Typing is ASCII, one key per character; no clipboard access.
- Over Bluetooth only, screenshots can be about a second behind.
- It drives the UI. It doesn't read your app's view tree or logs; pull those with your usual tools. Board and CLI logs: [Debugging & logs](https://manina.ai/docs/debugging).
Screenshots go to the model your agent uses. Use test accounts, and only devices and accounts you own or may control ([disclaimer](https://manina.ai/docs/disclaimer)). Working on Manina AI itself? The [developer harness](https://manina.ai/docs/harness) adds app and firmware installs over Wi-Fi.
---
# Drive an Android phone from your computer (esp32agent)
URL: https://manina.ai/docs/android-cli
Let Claude Code, Codex or any agent on your computer see and use an Android phone through the Manina AI app and its board, with the same esp32agent commands as on an iPhone.
**The same `esp32agent` commands that drive an iPhone also drive an Android phone.** The phone runs the [Manina AI app](https://manina.ai/docs/android-app) with a board flashed for Android. An Android phone doesn't mirror its screen to the board, so the app shares the screen with your computer itself, over your Wi-Fi. Taps and keys still go through the board. Install the CLI and connect your agent first: [CLI & AI agents](https://manina.ai/docs/cli).
:::note
Android support ships in the next esp32agent release. The current npm version (0.1.6) drives an iPhone only.
:::
## Connect
1. Pair the board with the phone in the app ([Android board](https://manina.ai/docs/android-board#pair-the-board)).
2. On the computer, run `esp32agent pair` within three minutes of powering the board.
3. In the app, open **Settings › Board › Computer (CLI)**, turn on **Share screen with the computer** and tap **Start sharing**. Accept Android's screen capture dialog: it asks every time. A notification with **Stop** shows while the phone shares.
4. Put the computer on the same Wi-Fi as the phone, then run `esp32agent screenshot`. It connects to the phone and writes its screen to a file.
```sh
esp32agent pair # within 3 minutes of powering the board
esp32agent screenshot # the phone's screen, shared by the app
esp32agent io tap 540,1200 --aim # tap at pixels of a full-size screenshot
esp32agent io button HOME # Home (sent as Meta+Enter)
esp32agent io keys esc # Back
```
Agents that use `esp32agent mcp` get the same screen and board through their MCP tools.
## How it differs from an iPhone
- **Taps.** On most phones the board's pen lands where it points: no calibration and no aiming (`calibrate` says so). On older kernels such as Android 6, where the app uses mouse mode, the mouse is calibrated and aimed on the shared frames, as on an iPhone.
- **Only your computer can connect.** For each sharing session the app makes a new key and leaves it, with the phone's address on your Wi-Fi, on the board over its paired Bluetooth link. The CLI reads it back over its own paired, encrypted session, and the frames are encrypted with keys from that handshake. Nothing goes through a server.
- **The app comes first.** Starting a task or a recording in the app ends the sharing, and the CLI gets `busy: the Manina app is running a task on the phone`. Start sharing again afterwards.
- **Screen recording** (`screencapture`) streams `--format mjpeg` only.
## Troubleshooting
- **`screenshot` can't reach the phone.** Check that sharing is on in the app and that the computer and phone are on the same Wi-Fi. The app warns if the phone has no Wi-Fi address.
- **The app can't tell the computer where to connect.** The board is off or out of range: power it and keep it near the phone, then tap **Start sharing** again.
---
# AI iPhone agent FAQ
URL: https://manina.ai/docs/faq
Answers about the AI that uses your iPhone: TestFlight, no jailbreak, charging, calibration, and logs.
## Do I need to leave a computer running?
**With the app:** no. Use a computer once to install the board firmware in your browser. Then the app and board handle the task together.
**With the CLI:** yes. Your agent runs on the computer and uses Bluetooth to reach the board. See [CLI & AI agents](https://manina.ai/docs/cli) for the demo, setup, and release availability.
## How do I get the app?
The App Store release is in review; the public beta is on TestFlight now. [Getting started](https://manina.ai/docs/getting-started#get-the-app) walks through joining the beta and setting up the app.
## Can I try it without my own AI service?
Yes. A free AI service is available in the app, so you can start there. You can also connect your own image-capable, OpenAI-compatible service, or, from app 1.0.11, [sign in with ChatGPT](https://manina.ai/docs/chatgpt-sign-in) to use your own Plus or Pro plan. An API key is only needed when configuring your own service.
See the [privacy policy](https://manina.ai/privacy) for how each service handles screenshots and tasks.
## My own AI service (API key) is slow
A step should take about 2-3 seconds of model time. When it takes much longer, check these first:
1. **Thinking mode.** Many models think before every answer, which makes each step 5-7x slower and adds nothing for tapping. Turn it off with your provider's switch, usually one line in **Settings › Model › Advanced › Extra body JSON**, for example `{"thinking":{"type":"disabled"}}`. Check your provider's docs for the exact field.
2. **The model.** Pick a fast, image-capable model without reasoning (a "flash", "mini" or "lite" one), not a reasoning model.
3. **Manina AI clicks.** From app 1.0.13.1, Manina AI takes the routine taps on your own key too, in under a second, and hands the harder steps to your model. Check that it is on under **Settings › Model**. The free line works the same way.
Still slow? Run **Settings › Check Up › Send Report** after a slow task: the report has each step's timing, so we can see where the time went.
## Can I stop or take over?
Yes. Pause or stop from the app or the Dynamic Island. If a task needs your help, the app can send a notification: press and hold it to continue, skip a step, stop, or take over.
To review sensitive steps before they happen, open **Settings → Runs → Ask me first** and choose **Payments only** (default), **Payments, sending, deleting**, or **Never**. See [Intents & recording](https://manina.ai/docs/intents#ask-me-first).
## Why does the app use cellular data?
Your iPhone joins the board's Wi-Fi so it can mirror the screen. That Wi-Fi connection has no internet; the app reaches your AI service over cellular data. Screen Mirroring stays on the local connection; model requests use cellular data. Keep cellular data enabled while running a task.
## My iPhone stays on home Wi-Fi and the board's hotspot is missing
The board is probably in station mode, where it joins an existing network instead of opening its hotspot. It remembers that mode across restarts and updates. Switch it back: [iPhone joins home Wi-Fi instead of the ESP32 Agent hotspot](https://manina.ai/docs/wifi-hotspot-vs-home-wifi).
## Bluetooth will not pair, or only works very close to the phone
Check that the included Wi-Fi/Bluetooth antenna is connected to the board. Without an antenna, Bluetooth may fail or work only with the board right beside the phone. Attach it, keep the board close to the iPhone, and try **Plug Me In** again.
For the connector location, see [Attach the antenna](https://manina.ai/docs/hardware#attach-the-antenna).
In Bluetooth mode, also pair the board as the iPhone's mouse under **AssistiveTouch › Devices › Bluetooth Devices**; if it was paired before, forget it in **Settings › Bluetooth** and pair again. See [Bluetooth mode](https://manina.ai/docs/bluetooth-mode#troubleshooting).
## How do I find the board's Wi-Fi password?
View it in **ESP32 Agent**, or read it over the board's USB serial connection:
1. Connect the prepared board to a computer by USB. Open its normal running serial port at **115200 baud**. If no serial port shows up, read the password in the app instead.
2. Send one line: `0 netinfo`.
3. For the board hotspot, confirm `mode` is `ap`, then use `ssid` and `pass` in the iPhone's Wi-Fi settings.
4. Move the board back to the iPhone and start Screen Mirroring again. Simply reconnecting power does not change the saved hotspot password.
Keep the full serial response private: it also contains an access token. If `mode` is `sta`, the credentials describe the network the board joined, rather than its own hotspot.
With Manina AI CLI 0.1.2 and board firmware v0.2.3, `esp32agent net` shows the hotspot name and password over the paired Bluetooth link. With firmware v0.2.2, use the app or USB serial as above.
## The board is missing from Screen Mirroring
1. Plug in the board. For the app, finish its Bluetooth pairing; for the CLI, use `esp32agent pair` on your computer.
2. Keep the board close to the phone and join its Wi-Fi. CLI users can do this directly in **Settings → Wi-Fi**; [find the hotspot password](#how-do-i-find-the-boards-wi-fi-password) first. App users can follow the join prompt or the manual password shown there.
3. Open **Control Center → Screen Mirroring → ESP32 Agent**.
4. Keep your iPhone unlocked.
**ESP32 Agent** is the receiver name to look for in Screen Mirroring.
If joining the board's Wi-Fi fails, move the board right beside the phone and try again. The board's hotspot uses reduced transmit power; this is separate from Bluetooth pairing. See the [connection discussion](https://github.com/onehumanbeing/esp32-iphone-agent/issues/10#issuecomment-6210288350).
## Mirroring is connected, but the picture is stuck
A frozen preview, `err no video` at the start of a task, or runs that repeat actions and look very slow were reported in [issues #25](https://github.com/onehumanbeing/esp32-iphone-agent/issues/25), [#29](https://github.com/onehumanbeing/esp32-iphone-agent/issues/29), and [#44](https://github.com/onehumanbeing/esp32-iphone-agent/issues/44). App 1.0 and board firmware 0.2.2 fix the known causes: the video resumes on its own after a reconnect, also after a long still screen.
1. **Check the versions.** The app version is in **Settings → About**; the board firmware is in **Settings → Board**. Update the board if offered: [Firmware updates](https://manina.ai/docs/firmware-updates).
2. **Reconnect mirroring.** Stop the task, turn Screen Mirroring off, and pick **ESP32 Agent** again. Keep the iPhone unlocked and on the board's Wi-Fi.
3. **Change screens** and check that the preview follows.
4. **Retry the task.**
If it persists, open the run in **Runs** and choose **⋯ → Export trace**, and check **Settings → Diagnostics → Video** while mirroring is on. Send both, with your versions, to [support@manina.ai](mailto:support@manina.ai).
If the picture moves but is very slow, the app may lack **Local Network** permission and be using Bluetooth for video: see [Video is slow](https://manina.ai/docs/wifi-hotspot-vs-home-wifi#video-is-slow-local-network-permission).
## Can I mirror from a Mac instead of the iPhone?
No. Screen Mirroring from macOS is not supported. The handshake can look fine while the board never receives video. Mirror from the iPhone the board is plugged into. See [No video from Screen Mirroring](https://manina.ai/troubleshooting).
## The pointer is landing in the wrong place
Turn on **Settings → Accessibility → Touch → AssistiveTouch**, keep the pointer visible, and keep your iPhone in portrait. In the app, complete **Let Me Use the Pointer**. With the CLI, run `esp32agent calibrate`; you do not need the app for calibration.
## Calibration finishes, but the accuracy stays at ±5% or more
**Settings → Calibration** shows how far the last check tap landed from its target, as a share of the screen. Under ±2% is normal. If it stays at ±5% or more after you calibrate again, the cause is usually an AssistiveTouch setting:
1. **Set Tracking Speed to the middle.** Go to **Settings → Accessibility → Touch → AssistiveTouch → Tracking Speed**. Near the slow end, iOS speeds up fast pointer moves much more than slow ones, so the app's measurements no longer fit together and taps land off target.
2. **Turn off Pointer Animations** in **Settings → Accessibility → Pointer Control**.
3. **Keep these settings after you calibrate.** Tracking Speed changes how far the pointer moves. If you change it, calibrate again.
4. **Calibrate again**: **Settings → Calibration → Calibrate**. Keep the iPhone in portrait, keep Screen Mirroring on, and don't touch the screen until it finishes.
If the number is still high, [send diagnostics](https://manina.ai/docs/debugging) and include your iPhone model, iOS version, app version and board firmware version.
## How can I give it a better task?
Start with one clear destination, such as **“Open Settings and go to Wi-Fi.”** Once that works, try a longer task. A model that understands images and follows instructions well helps; each step also depends on your model's response time and network connection.
Watch the first run. If it goes off track, stop and make the goal more specific. You can replay the run on your phone to see where it went wrong.
## What are the current limits?
Keep the phone unlocked. Locking stops Screen Mirroring. Apps that turn the screen sideways, such as games, work from app 1.0.11 (TestFlight); before that, keep the phone in portrait. Calibrate in portrait. iOS does not mirror passcode entry, Apple Pay, or DRM-protected video. For Chinese, add the phone's Pinyin keyboard: the app switches between English and Pinyin by itself (ctrl+space). Start with a short phrase and check the result. Through the [CLI](https://manina.ai/docs/cli#useful-commands), your agent selects the intended candidate. The CLI's own limits are listed in [CLI & AI agents](https://manina.ai/docs/cli#limits).
## Can I charge the phone while the board is connected?
On a USB-C iPhone, the board occupies the USB port and draws power from the phone, so there is no simultaneous wired charging. If your phone cannot charge wirelessly, take that into account before planning a long run. See the [charging discussion](https://github.com/onehumanbeing/esp32-iphone-agent/issues/35#issuecomment-6309271985).
On a Lightning iPhone, a Lightning to USB 3 Camera Adapter with a charger in its Lightning port powers both the board and the phone. See [Lightning iPhone](https://manina.ai/docs/lightning-iphone-adapter).
## How do I update the board firmware?
From the app, over the board's Wi-Fi: **Settings → Board**. The App Store and TestFlight apps each use their own firmware channel. See [Update ESP32 Agent firmware](https://manina.ai/docs/firmware-updates).
## How do I send logs?
In the app, open **Settings → About → Logs** and use **Send diagnostics to the developer** or **Export all logs**. With the CLI, run `esp32agent logs --save`. In the web installer, click **Download log**. Send the result to [support@manina.ai](mailto:support@manina.ai). Details: [Debugging & logs](https://manina.ai/docs/debugging).
## Where do screenshots and tasks go?
Manina AI sends screenshots to the AI service you choose so it can decide the next action. Read the [privacy policy](https://manina.ai/privacy) for what is sent, how it is stored, and your choices. You can replay and export run history on the phone. If you use your own API key, it is stored in the iOS Keychain.
With the CLI, screenshots and history are saved on your computer. Your computer agent may send screenshots to its chosen model provider. Check that agent's permissions and data policy; the phone app's free AI service does not supply the computer agent's model.
## Is there an official Manina device I can buy?
Not yet. The open-source project uses a Seeed Studio XIAO ESP32S3 that you buy and flash. The Manina device is a different, plug-and-play unit. It is not for sale, it has no final price, and it has no ship date. [Join the Manina device waitlist](https://manina.ai/hardware). Early birds may get a unique invite code. Joining is not an order and does not reserve one.
---
# "Failed to connect with the device" when installing firmware
URL: https://manina.ai/docs/failed-to-connect
Why the browser installer can't reach an ESP32-S3 that already runs firmware, and how to fix it with the BOOT button in under a minute.
**Hold BOOT while you plug the board in, then click Connect board again.** That fixes this error in almost every case.
## Why it happens
The [installer](https://manina.ai/install) talks to the board over a USB serial port. A blank XIAO ESP32S3 offers one, so the first install just works. Once Manina AI firmware is running, the board's USB port acts as the iPhone's keyboard and mouse, and it may not offer a serial port the installer can use. The installer then fails with:
```
Couldn't install.
Details: Failed to connect with the device
```
You may also see `Timed out waiting for packet header` or a board that never shows up in the picker. Same cause, same fix.
## Fix: put the board in install mode
1. Unplug the board from the computer.
2. Press and hold the **BOOT** button. It is the small button next to the USB-C port.
3. Keep holding it and plug the board back in. Release the button after a second.
4. On the [install page](https://manina.ai/install), click **Connect board** and pick the port that just appeared. It is usually called **USB JTAG/serial debug unit**.
5. When it says **Installed**, unplug the board and plug it in again so it starts the new firmware.
Your board isn't harmed by a failed attempt. Trying again is safe.
## Still failing?
- **Use a data cable.** Many USB-C cables only charge. Try the cable you use for file transfer.
- **Plug in directly.** Skip hubs and docks, or try another port on the computer.
- **Close other apps using the board.** A serial monitor, Arduino IDE, PlatformIO, or another installer tab holds the port.
- **Use Chrome or Edge on a computer.** Safari, Firefox, and phones can't open USB serial ports.
- **Check the board.** The installer is made for the standard XIAO ESP32S3 (8 MB flash, 8 MB PSRAM). See [Hardware](https://manina.ai/docs/hardware).
## Updating a board that already works
You don't need the computer for this. When the board is plugged into your iPhone, the ESP32 Agent app offers firmware updates over Wi-Fi. See [Update ESP32 Agent firmware](https://manina.ai/docs/firmware-updates).
Still stuck? Click **Download log** under the error and send the file to [support@manina.ai](mailto:support@manina.ai). The log stays in your browser until you send it. More answers: [FAQ](https://manina.ai/docs/faq) and [Debugging & logs](https://manina.ai/docs/debugging).
---
# iPhone joins home Wi-Fi instead of the ESP32 Agent hotspot
URL: https://manina.ai/docs/wifi-hotspot-vs-home-wifi
Why the iPhone stays on your home Wi-Fi and the ESP32 Agent hotspot is missing, how to switch the board back from station mode to its hotspot, and how to fix slow video when Local Network access is off.
**By default the board opens its own Wi-Fi hotspot, and the iPhone joins it.** If the hotspot is missing and the iPhone stays on your home Wi-Fi, the board is probably in station mode. Switch it back with one of the steps below.
## Two Wi-Fi modes
| Mode | What the board does | What the iPhone joins |
| --- | --- | --- |
| **Hotspot** (default) | Opens its own network, named `ESP32Agent-…`, with its own password. It has no internet. | The board's hotspot. The internet keeps working over cellular data. |
| **Station** | Joins an existing Wi-Fi network instead, such as your home or office Wi-Fi. | That same network. There is no `ESP32Agent-…` hotspot. |
Station mode is for development, for example with the [developer harness](https://manina.ai/docs/harness). Normal use needs hotspot mode.
**The board remembers its mode.** Station mode stays on after the board restarts and after in-app firmware updates, until you switch it back.
## How to tell which mode it is in
- **Hotspot:** `ESP32Agent-…` shows up in **Settings → Wi-Fi** on the iPhone, and `0 netinfo` over USB serial answers with `"mode":"ap"`.
- **Station:** no `ESP32Agent-…` network appears. Over USB serial, `0 netinfo` answers with `"mode":"sta"` (see [the FAQ](https://manina.ai/docs/faq#how-do-i-find-the-boards-wi-fi-password)).
## Switch back to the hotspot
Use any one of these.
**From a clone of the repository, over Bluetooth.** Quit the app on the iPhone so the computer can reach the board, then run:
```sh
uv run harness/board.py net ap
```
A computer that hasn't paired with the board before can pair only in the 3 minutes after the board powers on, so replug it first.
**Over USB serial.** Unplug the board from the iPhone and plug it into a computer. Open its serial port at **115200 baud** and send one line:
```text
0 net {"mode":"ap"}
```
The board answers `0 ok` and opens its hotspot again. If no serial port shows up, use the next option.
**Fresh install from the web installer.** Install the firmware again from [manina.ai/install](https://manina.ai/install). If the board doesn't appear, hold **BOOT** while plugging it in. This erases all board settings: Wi-Fi mode, hotspot password, and Bluetooth pairing. Afterwards, forget the old **ESP32 Agent** device in the iPhone's **Settings → Bluetooth** and pair again in the app. See [Update ESP32 Agent firmware](https://manina.ai/docs/firmware-updates#reinstall-from-the-web-installer).
Then plug the board back into the iPhone, join `ESP32Agent-…`, and start Screen Mirroring again.
## The iPhone keeps going back to home Wi-Fi
In hotspot mode, iOS may still switch back to a network it knows. Before joining the board's hotspot:
- Turn off **Personal Hotspot** on the iPhone.
- Join `ESP32Agent-…` in **Settings → Wi-Fi**, or use **Settings → Board → Join the Board's Wi-Fi** in the app.
- If the phone keeps hopping back, turn off **Auto-Join** for your home network while you run tasks.
- Keep the board close to the phone. Its hotspot uses low transmit power.
## Video is slow: Local Network permission
The app gets the picture from the board over Wi-Fi. For that, iOS needs to allow **Local Network** access for ESP32 Agent. iOS asks once, the first time it's needed.
If you tapped **Don't Allow**, video falls back to Bluetooth. Tasks still run, but slower: the picture lags and animations are choppy. To turn it back on:
1. Open the iPhone's **Settings → Privacy & Security → Local Network**.
2. Turn on **ESP32 Agent**.
3. Quit and reopen the app, then start Screen Mirroring again.
Still stuck? See the [FAQ](https://manina.ai/docs/faq) or write to [support@manina.ai](mailto:support@manina.ai).
---
# Lightning iPhone: camera adapter, power, and the 'Accessory update' loop
URL: https://manina.ai/docs/lightning-iphone-adapter
How to connect the ESP32 Agent board to a Lightning iPhone with a Lightning to USB 3 Camera Adapter and a charger, what it looks like when the board gets no power, and what to do when iOS keeps asking for an accessory update.
**On a Lightning iPhone (iPhone 14 and older), install the board for Bluetooth.** On [manina.ai/install](https://manina.ai/install?mode=ble), pick **iPhone 8 – 14 (Lightning)** (it selects **Bluetooth**) before you connect the board. The board then works without a cable to the phone: power it from any USB charger and pair it in the app. Bluetooth needs Manina AI 1.0.8 or newer (1.0.9+ on iPhone 8 / X), on [TestFlight](https://testflight.apple.com/join/1xQHgJcA) for now. The [setup guide](https://manina.ai/docs/getting-started#bluetooth-instead-of-the-cable) has the pairing steps; [Bluetooth mode](https://manina.ai/docs/bluetooth-mode) has the rest.
The rest of this page is the wired way: a Lightning to USB 3 Camera Adapter with a charger plugged into the adapter's Lightning port. The charger powers the board and the iPhone.
## Which iPhones work
The App Store app needs **iOS 18 or later**: iPhone XS, XR, or newer. The TestFlight app 1.0.9+ needs **iOS 16.4 or later**, so it also runs on iPhone 8, 8 Plus and X. iPhone 7 and older can't install the app.
USB-C iPhones plug the board in directly with a short USB-C data cable and don't need this page. Lightning iPhones need the adapter, because the board needs a USB port that acts as a host.
## Connect it
1. Plug the **Lightning to USB 3 Camera Adapter** into the iPhone.
2. Connect a **USB-A to USB-C data cable** from the adapter's USB port to the board. A charge-only cable won't work.
3. Plug a **charger** into the adapter's Lightning port.
4. Attach the antenna to the board and keep it near the phone.
With the charger in place, the iPhone charges while the board runs.
## When the board gets no power
Without enough power through the adapter, the board doesn't start:
- The board's LED stays off.
- The app can't find the board in **Plug Me In**, and no pointer appears on the iPhone.
- `ESP32Agent-…` doesn't show up in **Settings → Wi-Fi**.
Check that the charger is plugged into the adapter's Lightning port and switched on, then reseat the adapter and the cable.
## iOS keeps asking for an accessory update
Some adapters, on newer iOS versions, keep showing that the accessory needs an update and never power the board. Waiting or reconnecting doesn't help.
- Try another Lightning to USB 3 Camera Adapter.
- Make sure the charger is in the adapter's Lightning port, so the board is powered from it directly.
- Use a known-good data cable between the adapter and the board.
If the board still stays dark, write to [support@manina.ai](mailto:support@manina.ai) with your iPhone model and iOS version.
More: [Hardware & buying](https://manina.ai/docs/hardware) and the [FAQ](https://manina.ai/docs/faq).
---
# Debugging & logs
URL: https://manina.ai/docs/debugging
Pull logs from the board, the iPhone app, and Manina AI CLI over USB, Wi-Fi, or Bluetooth, and hand them to your AI coding agent.
**Both halves of Manina AI keep logs you can reach from a computer.** The board prints to its USB serial port, and from firmware 0.2.3 also keeps a recent log the app and the CLI can read. The iPhone app writes a rolling `debug.log` you can copy over USB, export or send from the app, or stream live to a Mac over Bluetooth.
**Not a developer?** Open **Settings → About → Logs** in the app and use **Send diagnostics to the developer** or **Export all logs** (see [From the app](#from-the-app)). For the CLI, run `esp32agent logs --save`. For the web installer, click **Download log**. Send what you get to [support@manina.ai](mailto:support@manina.ai).
The board and app paths come from the open-source code in [esp32-iphone-agent](https://github.com/onehumanbeing/esp32-iphone-agent); the CLI commands are the ones in [CLI & AI agents](https://manina.ai/docs/cli). At the end there is a [standard prompt](#standard-prompt-for-your-ai-agent) to paste into Claude Code, Codex, Cursor, or another coding agent.
## Check Up and Pointer Check
Before you pull logs, let the app look first (App 1.0.13 and later):
- **Settings → Check Up** checks the board, firmware, power, Bluetooth mouse, Screen Mirroring, the pointer on screen and the AI model one by one. Problems are listed first, each with one sentence and a fix button; what is fine folds into one line. **Send Report** sends the results with the app log. Check Up also runs by itself after a failed start or calibration.
- **Settings → Board → Can You See the Pointer?** has the board circle its pointer around Manina. Answer **Yes, I see it** or **No dot**; with no dot the app names the most likely cause (a USB board on a power bank or charger, iOS not connected to the board's Bluetooth mouse, the board paired with another device) and how to fix it.
## What you need
| Path | You need |
| --- | --- |
| Board over USB | A data USB-C cable and any serial monitor. The repo uses `arduino-cli monitor`. |
| iPhone over USB | A Mac with Finder. For development builds, Xcode's `xcrun devicectl`. |
| In the app | Nothing extra: **Settings → About → Logs** and **Settings → Diagnostics**. |
| Web installer | Nothing extra: **Download log** on [manina.ai/install](https://manina.ai/install). |
| Bluetooth | A Mac with Bluetooth, [`uv`](https://docs.astral.sh/uv/), and a clone of the repo for `hardware/tools/board_test.py`. |
| Manina AI CLI | `esp32agent` installed and paired with the board; see [CLI & AI agents](https://manina.ai/docs/cli). |
Logs can hold screenshots, task text, and the board's Wi-Fi details. Treat them as private.
## USB: board to computer
The board has one USB-C port, and the iPhone uses it while Manina AI runs. To read the serial log, **unplug the board from the phone and plug it into your computer.** It shows up as a USB serial port: `/dev/cu.usbmodem*` on macOS, `/dev/ttyACM*` on Linux, a `COM` port on Windows.
```sh
arduino-cli monitor -p /dev/cu.usbmodem* -c baudrate=115200
```
Any serial terminal at **115200 baud** works too.
A board running Manina AI firmware may not offer a serial port. If none shows up, try another data cable, then hold **BOOT** while plugging the board in. That starts install mode, which the [web installer](https://manina.ai/install) can use; the firmware doesn't run in install mode, so replug normally to read its log.
**What the firmware from [manina.ai/install](https://manina.ai/install) prints:** a short boot line with available heap, PSRAM, and the last reset reason, a `ble:` line with the Bluetooth stack's buffers, and a few fatal messages such as `airplay: start failed` or `video: no PSRAM for the GOP buffer`. The boot line is printed right after power-up, so open the monitor quickly, or replug and reopen.
**For a detailed log, build with `--debug`** (needs `arduino-cli` with the esp32 core 3.3.x and `NimBLE-Arduino`; see `hardware/tools/README.md`):
```sh
hardware/flash.sh --debug # every command and reply with timing, the AirPlay handshake, BLE link events
hardware/flash.sh --sta --debug # also joins the Wi-Fi in hid_bridge/secrets.h instead of opening a hotspot
```
A debug build waits up to 3 seconds at boot for a serial monitor, so the boot lines are easier to catch. Reflash with plain `hardware/flash.sh` (or from [manina.ai/install](https://manina.ai/install)) before going back to the phone.
The serial port also accepts the board's command lines, ``, the same ones the app sends over Bluetooth (see `docs/ble-protocol.md`). `1 ping` should answer `1 ok`. Send `0 status` to print the full status JSON: the same heartbeat the app reads over Bluetooth, with the firmware version in `fw`, the reset reason in `rst`, and the `usb`, `ap`, `kbps`, `fps` and `ble` fields described in `docs/ble-protocol.md` and under [Common issues](#common-issues-to-look-for). It holds no passwords, but mask anything that looks like a secret before sharing. On a computer the board is that computer's mouse and keyboard, so `move`, `click`, and `type` act on the computer. Avoid `unpair`, `res`, `fps`, and `0 net …` unless you mean to change the board.
## USB: iPhone to computer
The app keeps its logs in its Documents folder:
| File | Contents |
| --- | --- |
| `debug.log`, `debug.1.log` | One timestamped line per event: board commands and replies with timing, board status, BLE disconnects, model request timing. Rolls over at 2 MB. API keys are replaced by `‹redacted›`. |
| `diagnostics/*.json` | Crash, hang, CPU, and disk reports that iOS hands to the app, usually at the next launch. |
| `traces//` | One folder per run: `steps.jsonl`, screenshots, model calls. |
**Finder:** connect the iPhone, open **Finder → iPhone → Files → ESP32 Agent**, and drag the files to your Mac.
**Development builds:** copy the container with Xcode's command-line tool. Use your device identifier and the bundle ID from your build configuration.
```sh
xcrun devicectl device copy from \
--device '' \
--domain-type appDataContainer \
--domain-identifier '' \
--source Documents \
--destination ./manina-logs
```
### From the app
No cable needed. Open **Settings → About → Logs**:
- **Recent lines** of `debug.log` are shown on the page.
- **Send diagnostics to the developer** (where shown) sends the debug log, the board's state, and crash reports in one tap, so a problem can be looked into. It never includes runs, screenshots, or API keys. With firmware 0.2.3 and later it also includes the board's recent log.
- **Export all logs** makes `esp32-agent-logs.zip`: debug logs, iOS crash reports, and every run (steps, model replies, screenshots, video). With firmware 0.2.3 and later it also holds `board.log`, the board's recent log. Your API key is never in it.
- **Share debug log** sends only `debug.log`.
AirDrop the zip to your computer, or attach it to a mail to [support@manina.ai](mailto:support@manina.ai). **Settings → Diagnostics** shows the live board, Bluetooth, and video numbers, and **Export traces** exports all runs. To export a single run, open it in **Runs** and choose **⋯ → Export trace**.
## Wi-Fi
The firmware has **no network log stream**: there is no HTTP, Telnet, or UDP log endpoint. The board's Wi-Fi carries Screen Mirroring from the iPhone, the picture from the board to the app (TCP), and in-app firmware updates. Commands and status go over Bluetooth. If the app has no **Local Network** permission, the picture falls back to Bluetooth and is slower: see [Hotspot vs home Wi-Fi](https://manina.ai/docs/wifi-hotspot-vs-home-wifi#video-is-slow-local-network-permission).
**Check the board's network settings** when the phone cannot join the hotspot or the board is missing from Screen Mirroring:
- **Over USB serial:** with the board on your computer, open its normal running serial port at **115200 baud** and send one line, `0 netinfo`. For the board's own hotspot, `mode` is `ap` and `ssid` and `pass` are the hotspot name and password. If `mode` is `sta`, they describe the network the board joined instead. The reply also contains an access token, so keep it private.
- **In the app:** the ESP32 Agent app shows the hotspot name and password.
Over Wi-Fi you can also:
- **Copy the phone's files without a cable.** If you turned on **Show this iPhone when on Wi-Fi** in Finder (or **Connect via network** in Xcode), the Finder and `devicectl` steps above also work wirelessly, as long as the iPhone and Mac share a network. While a task runs, the phone is on the board's hotspot, which your Mac is not on, so copy logs afterwards.
- **Debug mirroring from a Mac.** `hardware/flash.sh --sta --debug` makes the board join your Wi-Fi. Mirror the Mac to **ESP32 Agent** and watch the AirPlay handshake on the serial log: `GET /info`, `pair-setup`, `pair-verify 1/2`, `fp-setup 1/2`, `setup: mirror stream`, `mirror: data connection accepted`, `mirror: SPS ... PPS`.
## Bluetooth
The board accepts **two Bluetooth connections at once**: the iPhone app and a Mac. While the app is connected, it copies every `debug.log` line to the board, and the board passes them to the Mac. That gives you the app's log live, with the board still plugged into the phone.
From a clone of the repo, with the app open and connected to the board:
```sh
uv run hardware/tools/board_test.py info # first run: pairs (macOS asks), prints the board's status JSON
uv run hardware/tools/board_test.py app "log 200" --seconds 120 # last 200 debug.log lines, then live lines for 120 s
uv run hardware/tools/board_test.py app status # one line: board, mirroring, calibration, model, run
```
Relayed lines print as `HH:MM:SS [log] …`; lines from the history start with `hist`. The relay sends at most 10 lines a second and drops lines while the link is busy, so take the full file over USB when you need every line. Wi-Fi passwords are masked in the script's output.
The status JSON is the same heartbeat the app reads every second. Its fields are listed in `docs/ble-protocol.md`.
## Manina AI CLI
If you drive the phone from a computer agent with [Manina AI CLI](https://manina.ai/docs/cli), the CLI is your view of the board. It talks to the board over Bluetooth while the board stays in the phone.
```sh
esp32agent devices # boards the computer can see
esp32agent device info # the paired board
esp32agent screenshot # saves a PNG and reports its filePath; check it shows the current screen
esp32agent history show latest # the latest CLI run, stored on this computer
esp32agent logs # the CLI's own log (daemon.log)
esp32agent logs --board # the board's recent log, without unplugging it (firmware 0.2.3 and later)
esp32agent logs --save # CLI log, board log and board state in one file for support
```
If the screenshot is stale, restart Screen Mirroring and take a fresh one. The app has priority over the CLI: if the CLI reports that the board is busy, stop the app task and retry. `logs --save` prints the path of a text file; send it to [support@manina.ai](mailto:support@manina.ai). Set `ESP32AGENT_DEBUG=1` to record each command and its result in `daemon.log` (no typed text, screenshots, or keys). The `logs` command comes with a later CLI release than 0.1.0; see [CLI & AI agents](https://manina.ai/docs/cli#logs).
## Board log (firmware 0.2.3 and later)
From firmware 0.2.3, the board keeps its recent log lines in memory, in addition to printing them on USB serial. You can read it without unplugging the board:
- **In the app:** **Export all logs** and **Send diagnostics to the developer** include it.
- **With Manina AI CLI:** `esp32agent logs --board`, or `esp32agent logs --save` for one file.
The log holds no Wi-Fi passwords or keys. It is cleared when the board restarts, apart from the reason for the last reset.
## Common issues to look for
| In the log | What it means | Try |
| --- | --- | --- |
| `"rst":"power-on"` or `"brownout"` mid-session, `up` back near 0 | The board lost power and restarted. Often the phone briefly dropped USB power. | Use a short data cable, check the adapter on Lightning phones. |
| `"rst":"watchdog"` or `"crash"` | The firmware hung for 8 s or crashed and rebooted. | Reproduce with a `--debug` build and keep the serial log. |
| `"usb":"asleep"`, or a reply `err phone usb asleep (unlock the phone)` | The phone is locked or asleep, so mouse and keyboard reports cannot go through. | Unlock the phone. |
| `"usb":"off"` | The phone has not set the board up as a mouse and keyboard. | Swap to a cable that carries data, reseat the adapter. |
| `"ap":"idle"`, `"kbps":0` | Screen Mirroring is not running. | Join the board's Wi-Fi and pick **ESP32 Agent** in Screen Mirroring. |
| `"ap":"connected"` but not `streaming`, or a frozen picture | Mirroring started but no video is arriving. | Stop the task, reconnect mirroring, keep the phone unlocked. |
| `snap` reply `err no video …` | The board has no video frames buffered yet. | Start mirroring first. |
| `"ble":{"drop":…,"rdrop":…}` rising | Video or replies are being lost on the Bluetooth link. `rdrop` should stay 0. | Attach the antenna, move the board closer. |
| `video: no PSRAM for the GOP buffer` at boot | The board has no usable PSRAM. | Use the standard XIAO ESP32S3 with 8 MB PSRAM. |
| `cmd #N … → err …` in `debug.log` | A board command failed; the line shows the reply and the time it took. | Match it to the step in the run's `steps.jsonl`. |
| `ble: disconnect conn N, reason 0x…` (debug build) | The Bluetooth link dropped. | Check the antenna and distance; compare with the app's log at the same time. |
## Standard prompt for your AI agent
Paste this into your coding agent, fill in the first two lines, and attach or point it at the logs you collected.
```text
You are helping me debug Manina AI (ESP32 Agent): a Seeed XIAO ESP32S3 board plugged into an iPhone as a
USB mouse and keyboard, receiving the screen over AirPlay Screen Mirroring, sending the picture to the iOS app
over its Wi-Fi (TCP), and taking commands over Bluetooth LE. Source: https://github.com/onehumanbeing/esp32-iphone-agent
Log guide: https://manina.ai/docs/debugging
My connection:
The problem:
1. Collect logs for my connection. Show me each command before running it.
- Board over USB: find the port (/dev/cu.usbmodem* on macOS, /dev/ttyACM* on Linux, COM on Windows), then
`arduino-cli monitor -p -c baudrate=115200`. For more detail, offer to reflash with
`hardware/flash.sh --debug` and remind me to reflash a normal build afterwards.
Send `0 status` for the full status JSON (fields in docs/ble-protocol.md; `fw` is the firmware version).
To check the board's Wi-Fi settings, send the line `0 netinfo`; mask `pass` and the token in the reply.
- iPhone over USB: copy Documents/debug.log, debug.1.log, diagnostics/ and traces/ via Finder
(iPhone → Files → ESP32 Agent), or `xcrun devicectl device copy from --domain-type appDataContainer`
for a development build.
- Bluetooth: from a clone of the repo, with the app open and connected:
`uv run hardware/tools/board_test.py info`, then
`uv run hardware/tools/board_test.py app "log 200" --seconds 120`.
- Manina AI CLI: `esp32agent device info`, `esp32agent screenshot` (open the PNG at the reported filePath),
`esp32agent history show latest`, `esp32agent logs --save` (board log needs firmware 0.2.3+).
If the CLI says the board is busy, wait for the app task to finish.
- App only: the zip from Settings › About › Logs › Export all logs.
- Wi-Fi: the firmware has no network log endpoint. Use the iPhone file copy over Wi-Fi sync, or a
`hardware/flash.sh --sta --debug` build with the serial log to debug AirPlay from a Mac.
2. Read the logs together with the source: hardware/hid_bridge/*.ino/*.cpp for the board,
docs/ble-protocol.md for status JSON fields and commands, ios/IPhoneAgent for the app.
3. Check in order: the status fields rst / up / usb / ap / kbps / ble.drop / ble.rdrop / ble.n;
failed `cmd #N … → err` lines and their timing; Bluetooth disconnects; AirPlay handshake steps; iOS reports
in diagnostics/.
4. Report: a timeline of the relevant lines (with timestamps), the most likely cause, the file and function in
the source that explains it, and the next test to confirm it.
Rules: read-only by default. Do not flash, erase, `unpair`, write `0 net …`, or change `res`/`fps` without
asking me. On a computer the board acts as its mouse and keyboard, so do not send move/click/type over serial.
Never print or paste Wi-Fi passwords, API keys, or tokens; mask them. Screenshots and run traces are private.
```
---
# Developer harness
URL: https://manina.ai/docs/harness
An open-source developer loop that installs the app and updates the board over Wi-Fi, starts tasks on a real iPhone, and brings back logs and run traces, with no cables.
**The harness is a developer loop for working on Manina AI itself.** From a Mac, it installs the iPhone app and updates the board's firmware over Wi-Fi, starts a task on the phone, and brings back the run's log and the steps it took. You don't plug in the phone or the board along the way.
The harness is open source. It lives in [`harness/`](https://github.com/onehumanbeing/esp32-iphone-agent/tree/release-1.0/harness) on the `release-1.0` branch; `harness/README.md` has the full setup. This page gives the overview. Questions: [support@manina.ai](mailto:support@manina.ai).
## What it solves
- **Slow reinstall cycles.** Without it, each change means plugging the phone in to reinstall the app, unplugging the board to flash it, and plugging things back in to collect logs. The harness does all of this over Wi-Fi.
- **Testing on a real phone.** Manina AI works by looking at a real iPhone screen and acting on it. Simulators can't show that. The harness runs real tasks on a real phone with the board attached, the way a user would.
- **Seeing what happened.** Each run leaves a log and a step-by-step trace: what the app saw, what it decided, and what it did. The harness copies both back to the Mac so you can read them, or hand them to your coding agent.
## How it fits together
The Mac talks only to the iPhone, over Wi-Fi, using Xcode's `devicectl`. The board stays plugged into the phone. Firmware goes **Mac → app → board**, the same way the app's own board update works.
For this, the board joins the Mac's Wi-Fi network instead of opening its own hotspot (**station mode**). The iPhone stays on the Mac's network and reaches the board there too.
## The scripts
| Script | What it does |
| --- | --- |
| `harness/app.sh` | Build the Debug app, install it on the test iPhone, and start it. |
| `harness/fw.sh` | Build the firmware, copy it into the app, and let the app install it on the board. |
| `harness/run.sh ""` | Start a task in the app and print how it ended. |
| `harness/logs.sh [--runs]` | Copy the app's `debug.log` to the Mac, and with `--runs` the latest run's trace. |
| `harness/hid.sh "…"` | Send raw board commands through the app (keys, typing, pointer moves), plus a screenshot. |
| `harness/board.py` | One-time setup: put the board on the Mac's Wi-Fi (`net sta`), or back on its hotspot (`net ap`). |
`fw.sh` also has checks for the update path: `--corrupt` sends a damaged image (the app refuses it and the board keeps running), and `--crash-test` sends an image that fails to start (the board goes back to the previous firmware by itself).
## One-time setup
1. **iPhone.** Turn on Developer Mode, pair the phone with the Mac in Xcode with **Connect via network**, and join the Mac's Wi-Fi. Set `HARNESS_IPHONE` to the phone's name or ID.
2. **Lightning iPhones.** Use a Lightning to USB 3 Camera Adapter with a charger in its Lightning port. See [Lightning iPhone: camera adapter and power](https://manina.ai/docs/lightning-iphone-adapter).
3. **Board on the Mac's Wi-Fi.** Quit the app on the iPhone, replug the board, and within 3 minutes run:
```sh
uv run harness/board.py net sta
```
macOS asks to pair, then asks for the Wi-Fi name and password in a dialog. They go to the board over the encrypted link only. Open the app again.
4. **Mirror again.** On the iPhone, open **Control Center → Screen Mirroring → ESP32 Agent**.
## Daily loop
```sh
harness/app.sh # build, install, start the Debug app
harness/fw.sh # build and update the board through the app
harness/run.sh "Open Settings" # run a task, print how it ended
harness/logs.sh --runs # copy the log and the latest run to the Mac
```
After each firmware update the board restarts, so choose **ESP32 Agent** in Screen Mirroring again.
## Go back to the hotspot
When you are done developing, put the board back on its own hotspot:
```sh
uv run harness/board.py net ap
```
The board remembers station mode across restarts and updates until you switch it back. More: [iPhone joins home Wi-Fi instead of the ESP32 Agent hotspot](https://manina.ai/docs/wifi-hotspot-vs-home-wifi).
## Safety
- **Debug builds only.** The harness commands exist only in Debug builds of the app. The App Store and TestFlight apps ignore them and install signed firmware only.
- **Updates are checked.** Even in Debug builds, the app checks the image's size and checksums before sending it. A damaged image is refused and the board keeps what it has.
- **Pairing window.** A new Bluetooth peer can pair only in the 3 minutes after the board powers on.
- **Secrets stay out of logs.** Wi-Fi passwords are typed into a macOS dialog, sent only over the encrypted link, and never logged.
- **Trusted networks.** In station mode the board relies on your network. Use it only on a trusted network, and switch back with `net ap` outside development.
Logs and traces can include screenshots and task text. Treat them as private. For collecting logs without the harness, see [Debugging & logs](https://manina.ai/docs/debugging).
---
# Git branches
URL: https://manina.ai/docs/branches
The phone-first Manina AI experience and the original computer-based project.
**Start with the current Manina AI app experience.** The app runs on your iPhone, with a small ESP32 board to see the screen and carry out taps, swipes, and typing. Once the board is set up, you can put the computer away.
The open-source project also keeps its original computer-based setup on `legacy`. This page is for people exploring that earlier version or working with the source code.
## What changed?
| | Current · `main` | Earlier · `legacy` |
| --- | --- | --- |
| Where the agent runs | App on your iPhone, connected to your chosen model | Python service and web interface on a computer |
| How it sees the screen | AirPlay receiver on the ESP32 board | UxPlay on the computer |
| How it acts | Board connected to the phone as a USB mouse and keyboard | Board controlled by the computer over Wi-Fi |
| Computer during a task | Not needed | Stays running |
| Screen Mirroring name | **ESP32 Agent** | **iPhone Agent** |
| On the phone | Manina AI app | No app installed |
For the current experience, follow [Getting started](https://manina.ai/docs/getting-started). The browser [installer](https://manina.ai/install) prepares the board for this version. Legacy uses different firmware; the two are not interchangeable.
## Where does the new CLI fit?
[Manina AI CLI](https://manina.ai/docs/cli) connects a computer agent directly to the board over Bluetooth. Screen Mirroring is received by the board, as in the current app architecture. It is a separate tool from the Python CLI / MCP bridge on `legacy`; the legacy tags do not identify Manina AI CLI releases.
## Watch the original version
This is the original Linux-computer demo. It shows the roots of the project: an AI looking at a real iPhone and using a physical pointer to act.
## Exploring legacy
Legacy runs UxPlay and a Python server on a computer. The phone and computer share a network; the ESP32 connects to the server over Wi-Fi. The branch also documents Bluetooth HID board variants and an optional CLI / stdio MCP bridge.
To try it:
1. Check out the `legacy` branch and flash its board firmware with `hardware/flash.sh`.
2. Install UxPlay on the computer. On macOS, use `brew install uxplay`; Linux and Windows instructions are in the branch README.
3. From `server/`, install the Python package, configure your model endpoint and key, and run `python -m hidagent`.
4. On the phone, turn on AssistiveTouch and mirror to **iPhone Agent**. Open `http://127.0.0.1:8890` on the computer and use **Manual controls → Calibrate**.
The [legacy README](https://github.com/onehumanbeing/esp32-iphone-agent/blob/legacy/README.md) contains the platform-specific commands and hardware variants. The CLI bridge belongs to this computer-based setup.
## Version history
Legacy has the **[v0.1.0](https://github.com/onehumanbeing/esp32-iphone-agent/releases/tag/v0.1.0)** and **[v0.1.1](https://github.com/onehumanbeing/esp32-iphone-agent/tree/v0.1.1)** tags. `v0.1.0` is the first formal GitHub Release; `v0.1.1` is a later tag. The legacy branch has continued beyond both.
The current `main` app architecture has no corresponding public version tag or formal Release yet. Board firmware uses its own version numbers. See [Changelog](https://manina.ai/docs/changelog) for these separate histories.
---
# Changelog
URL: https://manina.ai/docs/changelog
Follow Manina AI and explore the project's earlier releases.
## Manina AI · App 1.0.13 (build 29) · TestFlight · 2026-11-30
Build 29, in TestFlight. Use board firmware v0.2.13 ([TestFlight channel](https://manina.ai/install?build=testflight)): the app offers it over Wi-Fi under **Update Board**.
- **Your own AI key, still fast.** With your own model, Manina AI takes the plain steps (open, tap, type) and your model plans and checks, so runs on your own key are faster. A Manina AI key that is refused or out of credit is said once, and your model then takes every step.
- **Absolute pointer over USB (optional).** Turn it on under **Settings › Board › Pointer** (**Absolute**): taps land where they aim, with no calibration (AssistiveTouch on). The board starts with the relative pointer (firmware 0.2.12). Bluetooth keeps the relative pointer for now.
- **Faster app opening over Bluetooth.** About 11 s instead of 15 s at the median.
- **Faster with DeepSeek.** Fewer off-format replies, and Calculator is typed as one expression.
- **Known.** With the USB absolute pointer, swipes can go the wrong way after a landscape app; fixed in the next build.
## Manina AI · App 1.0.13 · TestFlight · 2026-11-30
Build 28, in TestFlight. Use board firmware v0.2.10 ([TestFlight channel](https://manina.ai/install?build=testflight)): the app offers it over Wi-Fi under **Update Board**.
- **Run intents from Shortcuts.** **Run Intent and Get Result** runs a saved intent and passes its answer and status to the next action; **Get Run Result** waits for a longer run. See [Run from Shortcuts](https://manina.ai/docs/intents#run-from-shortcuts).
- **Can you see the pointer?** In setup and **Settings › Board**, the board circles its pointer around Manina and you say whether you see it; a no gets the likely cause and the fix.
- **Check Up.** **Settings › Check Up** checks the board, firmware, power, Bluetooth mouse, Screen Mirroring, the pointer and the AI model, problems first with a fix button each. It also runs after a failed start or calibration. See [Check Up and Pointer Check](https://manina.ai/docs/debugging#check-up-and-pointer-check).
- **Notifications and reminders.** Run-finished notifications can be turned off (sound off by default). A run waiting for your answer reminds you again after 2, 10 and 30 minutes, and the app explains when iOS hides notifications (Screen Mirroring, Sleep or another Focus).
- **Free line: 60 minutes per task**, shown under the Start button, with a reminder before a waiting run ends.
- **Faster steps.** The check before a tap takes about 0.3 s (was 1 s), and opening apps is faster.
- **Fixes.** iOS 16 (iPhone 8) home screen crash; Home on Home-button iPhones over Bluetooth; opening apps and typing on Chinese iPhones, including Chinese typed while the input source is English; a frozen picture asks for a mirroring restart at once.
## Manina AI · App 1.0.12 · TestFlight · 2026-11-28
Build 27, in TestFlight. Use board firmware v0.2.9 ([TestFlight channel](https://manina.ai/install?build=testflight)): the app offers it over Wi-Fi under **Update Board**.
- **Opening apps by name works.** 10 apps and a mini-program out of 10 on an iPhone 13 Pro, about 8 s each. An App Store page no longer counts as installed, and a name that fails twice stops instead of looping.
- **Video feeds.** Each swipe in a feed reaches the next video (it could stay on the first one before), and a video is paused when the task didn't ask to play it.
- **Fewer wasted steps.** A `wait` waits for the screen to change, waits in a row count as one, and the agent no longer works out a next step it would throw away.
- **Faster start.** The free line's slot is claimed while the first picture comes in, and the connection is warmed at the start.
- **Calls and dead ends.** An incoming call banner is waited out; a full-screen call is handed to you. A task the AI says can't be done ends as failed, not done, and a screen stuck loading stops the run.
- **Manina AI CLI.** `connect` no longer crashes on macOS after a failed connect, and a board whose Bluetooth slots are taken is still listed; pointer calibration is kept per phone; stale video shows in the status.
## Manina AI · App 1.0.11.1 · TestFlight · 2026-11-26
Build 25 (a new build of 1.0.11), waiting for Beta App Review. Use board firmware v0.2.7 ([TestFlight channel](https://manina.ai/install?build=testflight)).
This build was made with an automated test harness: it found, fixed and checked these changes on a real iPhone itself.
- **Long press.** The agent can press and hold: a chat message's menu (Forward, Copy), an icon's quick actions, selecting a word.
- **Opening apps.** No more hang on iOS's "Open in …?" prompt. An English iPhone searches a known app by its English name (Maps, rednote) instead of pinyin.
- **Faster Chinese typing.** The pinyin for a text is worked out once, with no stall on the first character.
- **Faster pointer search.** Each screen is decoded once.
## Manina AI · App 1.0.11 · TestFlight · 2026-11-26
Waiting for Beta App Review. Use board firmware v0.2.7 ([TestFlight channel](https://manina.ai/install?build=testflight)).
- **Use your ChatGPT plan.** **Settings › Model › Sign in with ChatGPT**: runs use your own ChatGPT Plus or Pro plan (the same usage limits Codex uses), with no API key. See [Sign in with ChatGPT](https://manina.ai/docs/chatgpt-sign-in).
**Games and landscape apps**
- **Landscape apps work.** When an app turns the screen sideways, as many games do, taps land where they are aimed. The pointer learns its landscape landings on their own, and the AI sees a landscape screen in as much detail as a portrait one, so small buttons stay readable.
- **`tap twice`.** The agent can tap one spot twice in a row, the second tap exactly where the first landed: a game's choose-then-confirm, or a button that needs two taps.
**Faster**
- **Shorter waits on moving screens.** On a game or video that never stands still, waits drop to about a second. The longest wait for a still screen is 3 s (was 4).
- **A wait ends when the screen changes.** A plain `wait` goes on as soon as something changes (a spinner or a playing video doesn't count), up to 15 s, so a loading page no longer costs a step per look.
- **Opening apps is faster.** When the app is Spotlight's Top Hit, the agent presses Return instead of finding and tapping the row: about 5 s less per open.
- **Look ahead is on by default** (**Settings › Look ahead**): the next step is worked out while the screen settles, and thrown away if it moves.
**Smarter**
- **Better Chinese typing.** Chinese goes in as the pinyin of each word, so Spotlight finds the app you named. Extra words the keyboard's first candidate adds are deleted. Zhuyin, Wubi, 9-key or a third-party keyboard is switched to Pinyin once; if Pinyin isn't added, typing stops and the app tells you how to add it.
- **The right app.** A task that names an app no longer opens a built-in app whose short name (Music, Maps, Weather…) is part of the longer name. An app that isn't installed, shown only as a web suggestion in Spotlight, is reported as not on this iPhone instead of opening a web search.
- **Steadier pointer.** A tap that lands far from its target calibrates the pointer straight away, and a failed calibration keeps trying during the run.
- **Less repeating.** When the same action changes nothing twice, the agent gets a hint; a third time, it looks longer, then asks you.
**Setup**
- **Clearer pointer setup.** **Let Me Use the Pointer** lists the AssistiveTouch steps one by one, including pairing a Bluetooth board, ticks each as it is done and says what it is waiting for. After 20 s on one step it shows the likely cause and fix. See [Set up the AI iPhone agent](https://manina.ai/docs/getting-started#2-connect-it-to-your-iphone).
- **No board yet?** On first launch the Welcome page asks once whether you have an ESP32 board. **Not yet** opens [where to get one](https://manina.ai/where-to-buy-esp32), and setup goes on.
- **A stuck start stops sooner.** When Screen Mirroring is connected but no picture reaches the board for 30 s, the app says to restart Screen Mirroring instead of waiting up to 5 minutes.
- **Fixes:** a board on this iPhone's own Personal Hotspot is reached there and no longer re-joined after a restart; a second task in a row saves its files in its own folder; a pull to refresh on Home no longer runs the intent it started on; the app warns on Home when the iPhone itself is slow, for example in the hours after an iOS update.
## Manina AI · App 1.0.10.1 · TestFlight · 2026-11-23
Build 23 (a new build of 1.0.10), waiting for Beta App Review. Use board firmware v0.2.7 ([TestFlight channel](https://manina.ai/install?build=testflight)).
- **Significantly faster Chinese input.** Pinyin goes in one go and is checked once. A correct text is no longer deleted and typed again, even a long one that shows only its end in the field or a message that is already in the chat.
- **Runs end faster.** The keyboard check after a run takes a fraction of a second instead of up to 30 s, and the extra "is it really done?" check is gone.
- **Faster on older phones.** No wait for a late screen reading on an iPhone X, and no stall at the start.
- **Fixes:** a finished intent keeps its plan; the agent no longer types part of a text twice; nothing is put on the clipboard.
## Manina AI · App 1.0.10 · TestFlight · 2026-11-22
Build 22, in Beta App Review. Use board firmware v0.2.7 ([TestFlight channel](https://manina.ai/install?build=testflight)).
- **"Collect the first N" saves the result.** When the list reaches the goal's count, the app writes the result file and the task finishes. Before, a list stopped at its count saved nothing.
- **A second look once the work is done.** When the count is reached and the result written but the agent keeps going, the stronger model checks once whether anything is missing.
- **A check before Send.** Before a Send / Reply / Post button is tapped, the app checks that the typed text went in fully and was not already sent; if not, it holds the tap once. Tapping again sends as before.
- **Fixes.**
## Manina AI · App 1.0.9 · TestFlight · 2026-11-22
Build 21, in Beta App Review. Use board firmware v0.2.7 ([TestFlight channel](https://manina.ai/install?build=testflight)).
- **iOS 16.4 and later.** iPhone 8 / iPhone X can now use the TestFlight app. On iOS 16 the agent leaves apps through AssistiveTouch.
- **M5Stack StopWatch (experimental), over Bluetooth.** The watch shows a run's progress: the face, steps, time and the current step. The yellow key pauses and resumes; two quick presses stop. Help requests and confirms buzz until you answer, and a finished task's answer shows on the watch. Start one of your 5 newest intents from the watch, or hold yellow to talk. Flash it from the [install page](https://manina.ai/install?build=testflight) (pick **M5Stack StopWatch**).
- **Faster start.** Apps open by their link, and an intent with a saved plan skips the first planning round. On an iPhone X, the time from start to the agent working went from 9.4 s to 3.5 s.
- **"Collect the first N"** stops once N items are read. A screen visited a third time with no progress goes to the stronger model.
- **Fixes:** learned steps name the right button text; deleting a run also removes it from the intent's history; the tab bar check holds back fewer taps by mistake.
## Manina AI · App 1.0.8 · TestFlight · 2026-11-20
Build 20, in Beta App Review. Use board firmware v0.2.7 ([TestFlight channel](https://manina.ai/install?build=testflight)): one firmware for USB or Bluetooth, chosen on the [install page](https://manina.ai/install) or in the app.
- **Bluetooth mode.** The board is the iPhone's mouse and keyboard over USB or over Bluetooth, switched in **Settings › Board › Input**. Lightning iPhones can use Bluetooth without a camera adapter; the board then needs its own power (a USB charger or power bank). Over Bluetooth, Home is the swipe up from the home bar, and on iPad it no longer opens Notification Center. The app walks you through pairing and calibration again after a switch, and shows a tip you can dismiss to restart Screen Mirroring after a long Bluetooth session. See [Bluetooth mode](https://manina.ai/docs/bluetooth-mode). Thanks to [@cy41](https://github.com/cy41) for the Bluetooth mouse and keyboard work ([#94](https://github.com/onehumanbeing/esp32-iphone-agent/pull/94)).
- **Chinese (Pinyin) typing** is faster and more reliable: words are committed and read back in groups, an apostrophe separates syllables like xi'an, and wrong words are repaired. When the text field has no focus, the agent stops and says so instead of typing into nothing.
- **Opening apps** taps the listed Spotlight result.
- **Asks before every step that can't be undone**, in every mode. An on-screen **Clear** button is no longer mistaken for clearing the field.
- **Free line** no longer stays busy after the app is closed in the middle of a run.
- **Plans are reused per intent.** After each run the AI judges whether its plan is worth keeping; the next run of that intent reuses it. Turn it off with the intent's **Reuse Plan** switch.
- **Runs:** **Delete All Runs** and **Delete Failed Runs**; swipe to delete the **Last run** card; runs open reliably after a run that ended in the background.
- **Exported traces** include the log and the app version.
## Manina AI · App 1.0.7 · TestFlight · 2026-11-19
Use board firmware v0.2.6 ([TestFlight channel](https://manina.ai/install?build=testflight)). Handsy is now Manina AI, at [manina.ai](https://manina.ai); handsy.tech redirects here.
- **iPad support.** The app runs on iPad with the same agent as on iPhone. With firmware v0.2.6, rotating the iPad no longer replays old frames.
- **Home Wi-Fi (LAN).** The board can join your home Wi-Fi. There only your own phone can mirror to it, and the video is encrypted (firmware v0.2.6).
- **Files tab.** The agent can save its results: a screenshot or part of the screen, and a Markdown write-up with its images, in a folder under **Results**. The tab shows **Memory**, **Results**, logs and your own files, and searches names and the text of notes. Markdown opens with its images. The ⋯ menu adds a folder or a note, imports a file or exports a folder as a .zip; swipe to delete, touch and hold to rename.
- **Runs, intents and files are linked.** A run's review lists the files it saved, an intent's page lists its last runs, and a result folder opens the run it came from.
- **Saved plans.** An intent keeps the plan of a run that worked, and its next runs start from it. Plans are Markdown files in **Files › Plans** that you can open and edit; **Forget Saved Plan** drops one. A plan also goes when the instruction changes, a run with it fails, or after 7 days.
- **Faster list tasks.** When a list already shows everything the task asks for, the agent reads it from the top instead of opening each item, and stops at items older than the dates you asked about. Once it has what it needs, it hands the phone back (the Dynamic Island says **Writing up…**) while it writes the result.
- **Unattended** (**Settings › Unattended**, off by default; also an option on the **Run a Task** shortcut). Questions wait two minutes, then skip or stop; a risky step is never approved on its own and a passcode is never typed. A dropped connection or a busy AI service is waited out instead of ending the run, and a locked phone, low battery or Low Power Mode is shown.
- **Look ahead** (**Settings › Look ahead**, off by default) starts thinking about the next step once the screen is nearly still, and checks the screen again before acting.
- **Long text** is typed in short chunks. With firmware v0.2.6, typing a long field can no longer restart the board.
- **Step timing.** Each step in a run's review shows where its time went.
- **Intent files** are now `.intent` (`.esp32intent` still opens). Opening one shows a preview where you pick which intents to add, then **Add to Intents**.
- **App updates.** When the App Store has a newer version, Home shows a banner.
- **Free line:** a request that never reached the server is retried, and says the connection failed instead of "busy".
## Manina AI · App 1.0.6 · TestFlight · 2026-11-14
Use board firmware v0.2.5 ([TestFlight channel](https://manina.ai/install?build=testflight)).
- **Standby in Dynamic Island** (Settings, off by default). Between runs the island shows your three most used intents and **New Task**. New Task (also a Control Center control) opens a quick sheet to type a task or pick an intent, and it runs on the app you are in.
- **Add to a running task.** Words you add while a run goes (on Home, in the quick sheet, or from Siri and Shortcuts) join its next step, and the plan follows.
- **Tasks over many items.** Up to 1000 steps (other tasks stay at 300), and listed items are saved every 10 steps so **Continue** picks them up. Taps repeated the same way for each item are done by the app itself, with fewer AI calls. Before deleting or working through many items, the agent lists them and asks you once, showing how many and which.
- **Recordings save what you meant.** Opening an app becomes one step, a tap is named by the text at its spot, keyboard taps are folded into the typed text, and a detour back to the same screen is left out. The review opens at step 1 with **Next Unsure**; screens stay blurred until tapped (**Settings › Blur screens in reviews**).
- **Intents.** Editing an instruction proposes matching changes to the steps, name and checklist, applied only when you tap **Apply**. A failed run adds one hint to the checklist; swipe rows away. Recorded steps that missed are removed or become AI steps, and **Undo** on the intent page puts them back.
- **One memory on the phone and the computer.** **Settings › Memory › ⋯** exports `MEMORY.md` and imports another copy; passwords, codes and long numbers never come in. Manina AI CLI uses the same file: `esp32agent memory list | add | rm | search | export | import`, and the MCP tools `memory_recall` and `memory_add`.
- **Absolute mouse (optional firmware build).** Flashed with `hardware/flash.sh --abs` and with AssistiveTouch on, taps land where they aim, with no calibration. The default firmware is unchanged. Thanks to [@chenshaorong0118](https://github.com/chenshaorong0118) ([#99](https://github.com/onehumanbeing/esp32-iphone-agent/pull/99)).
- **Calls:** Live Captions no longer fold away mid-call, and hanging up closes Live Speech first and checks that the call ended.
- **Dynamic Island:** the step counter, timer and buttons fit without being cut off.
- **Taps:** never on the Dynamic Island; the Home Screen Search pill is not pressed twice; Home works when an animated sheet is on screen.
- **Look and find tasks** end with a short answer once the screen shows a match.
**Build 17 (2026-11-16), a hotfix:**
- **Fixed:** with usage stats on, the app could crash after the board restarted (for example after a firmware update).
- When Home gestures do nothing because the board is not plugged into this iPhone, the app says so and goes on by itself once the board shows up.
- Chinese app names open through their Pinyin in Spotlight, and Chinese words that are not the first candidate are typed more reliably.
- Taps that keep landing off the same way recalibrate after 3 taps instead of 15.
- With no fresh picture at startup, the app reopens the board's video once before asking you to restart Screen Mirroring.
## Manina AI · App 1.0.5 · TestFlight · 2026-11-13
Use board firmware v0.2.5 ([TestFlight channel](https://manina.ai/install?build=testflight)).
- **Web search (Beta).** When a task needs something the screen doesn't show, the agent looks it up on the web first. Tools can be exported and imported as JSON.
- **Phone calls and text messages (Beta, experimental).** New Call and Text templates. A call dials, speaks through iOS **Live Speech** and listens through **Live Captions**; set them up once as in [Phone calls](https://manina.ai/docs/phone-calls) (including **Keep Call Captions › 1 Hour**). Calls are not stable yet: replies are slow and captions can mishear.
- **Intents improve themselves.** When an intent's saved steps stop matching the screen and the AI finishes the task, that run's steps become the intent's new steps; a new intent's first run that works becomes its reference. Lessons from finished runs go on the intent's checklist (up to 8). Tap **Wrong** in the Dynamic Island within 90 s, or **Undo** on the intent, to take it back; turn it off with **Settings → Intents learn from runs**.
- **Recordings are runs.** A recorded demonstration keeps every step like a run, can be reviewed, continued and saved as an intent.
- **Opening apps** is done by the app and checked on screen, also when Spotlight doesn't open by keyboard.
- **Typing** in Chinese, accented and other languages is more reliable.
- **Taps** outside the screen are never sent, and a button that already worked is never pressed twice.
## Manina AI · App 1.0.2 · TestFlight · 2026-11-07
Tested end to end on Duolingo lessons on a real iPhone. Listening needs board firmware v0.2.4; everything else also works with v0.2.3.
- **Listen to phone audio** (off by default, **Settings → Listen to phone audio**). The board passes the iPhone's sound to the app, which turns it into text on the phone, in English and one more language, and the agent reads what it heard. Second language **Automatic (from the screen)** picks it from the screen, for example Japanese in a Japanese lesson. **Share with the computer (CLI)** (on by default) lets Manina AI CLI read the words too. See [Listen to phone audio](https://manina.ai/docs/listen).
- **Longer tasks.** No 40-step limit any more: a 300-step safety cap, and a pause to ask you when the screen hasn't changed for 12 steps in a row. Tap **Keep Going** to let it go on.
- **A simpler agent.** One AI call per step: the AI keeps its own plan and alone decides when the task is done, and each step it sees whether the last action changed the screen. On the free AI service the screen listing is built on the server (about 1 s → 70 ms a step).
- **Who decides each step** (**Settings → Model**). Turn the AI model and Jev, an on-screen helper, on or off and drag them into order, or let both race. With your own model, Jev stays off until you agree to it; you can take that back in **Settings → Privacy**.
- **Continue from here.** Any stopped or failed run can go on from the current screen, also after the app was closed.
- **More accurate taps.** Every pointer move runs at one speed, short moves are calibrated, and a far-off pointer reading is checked twice before it counts. Going back to the corner no longer opens Control Center. When the agent taps several times in one step, each later tap first checks its target hasn't moved. A tap that missed is found and corrects the calibration.
- **Steadier picture.** Network checks and image work moved off the app's main thread (stream drops in a Duolingo lesson: 41 → 0). After a gap the picture resumes from where it stopped, also after a long still screen, and the AI never sees a screen from before its last action. Switching between Wi-Fi and Bluetooth no longer replays old frames. Right after power-on the app keeps checking for the board's address instead of needing a restart.
- **Review.** One main button (**Continue** or **Retry**); mark steps **Correct** or **Wrong**, and Wrong opens the fix; Insert, re-run and delete sit in each step's menu. Clearer model and provider pages.
- **Board update banner.** Dismissing it hides it for a day, not for good.
- **Diagnostics** include the board's own log and its last reset or crash (firmware v0.2.3 or later).
- **Settings → Developer:** demo data and an audio test.
- **Fixed:** calibration and the debug log could crash the app; the Live Activity could crash; a lost Bluetooth reply could repeat an input; small calibration moves could read the wrong frame; a custom output budget in advanced model settings was lost; token counts showed 0 when the AI service didn't report them.
## Manina AI · App 1.0.1 · TestFlight · 2026-11-02
The first public TestFlight build. Use board firmware v0.2.2 or later ([TestFlight channel](https://manina.ai/install?build=testflight)).
- **Picture over Wi-Fi.** The board sends the screen to the app over its own Wi-Fi; Bluetooth carries commands and is the fallback. Video starts faster and resumes on its own after a reconnect.
- **Intents.** [Record a demonstration](https://manina.ai/docs/intents) or save a run. Recorded moves replay without the AI while the screen matches; add AI steps, read from the screen, copy the notebook, ask me to do a step, and Repeat until. Import and export `.esp32intent` files, or share one with us.
- **Notebook and memory.** The agent copies lists off the screen into the run's notebook, across scrolls, and keeps your own words and lessons from finished runs, never secrets.
- **Ask me first.** Payments only (default), payments, sending and deleting, or never. Questions arrive as notifications.
- **Pause and Stop** from the Dynamic Island; a notification when a task needs your help.
- **AI services.** A free AI service is available in the app, with consent; or connect your own OpenAI-compatible service that accepts images.
- **Chinese typing** as Pinyin through the board.
- **Board updates over Wi-Fi** from signed releases, with automatic rollback. See [Firmware updates](https://manina.ai/docs/firmware-updates).
- **Logs.** **Settings → About → Logs** to send diagnostics or export all logs. See [Debugging & logs](https://manina.ai/docs/debugging).
- **Shares the board with Manina AI CLI:** the app has priority; the CLI can use the board while the app is idle.
- **Result card.** A run's answer shows in a collapsible card with **Copy**.
- **Typing and apps.** The keyboard switches between English and Pinyin by itself; apps open by name through Spotlight.
## Manina AI · App 1.0 · App Store (in review) · 2026-10-19
The agent runs on your iPhone, no computer needed. Connect the board, give Manina AI a goal, and watch it work.
- **The board is the AirPlay receiver** for Screen Mirroring and talks to the app over encrypted Bluetooth.
- **The agent on the phone:** it plans, looks at the screen, and taps, swipes, and types through the board, with pointer calibration.
- **Review.** Each run keeps its steps, screenshots, and a low-frame-rate video; replay and export them on the phone.
- **Live Activity, widgets, Siri, and Shortcuts.** Saved tasks can be started from Siri, Shortcuts, widgets, and Control Center.
- **Self-healing** when the board, the hotspot, or mirroring drops.
- **Demo data** to try the app without hardware.
[Set up Manina AI](https://manina.ai/docs/getting-started)
## Manina AI CLI · 0.1.5 · 2026-11-28
On npm (`npx esp32agent@latest`, package 0.1.6; `dsh-esp32agent` 0.1.4), the install script and [GitHub](https://github.com/onehumanbeing/esp32-iphone-agent/releases/tag/cli-v0.1.5).
- **Fixed:** `connect` no longer crashes on macOS after a failed connect, and a board whose Bluetooth slots are taken is still listed.
- **Pointer calibration per phone.** The app's origin, gain and pace are kept for each phone; a tap the CLI could not verify says so (`--strict` refuses it).
- **Stale video** shows in the compact status (`vage`), and `calibrate` says when the picture is old.
## Manina AI CLI · 0.1.4 · 2026-11-09
- **Fixed:** a deadlock where the CLI daemon could hang while the ESP32 Agent app was connected.
## Manina AI CLI · 0.1.3 · 2026-11-07
- **`listen`.** What the iPhone played in the last 30 seconds, as words. By default it reads what the ESP32 Agent app heard (App 1.0.2 and firmware v0.2.4, with **Share with the computer (CLI)** on); `listen mode local` turns the raw audio into text on the computer with whisper.cpp. MCP tool `phone_audio`. See [Listen to phone audio](https://manina.ai/docs/listen).
## Manina AI CLI · 0.1.2
- **Wi-Fi link.** With the board and the computer on the same Wi-Fi (or the computer on the board's hotspot), commands and video go over Wi-Fi; Bluetooth stays as the way back. `esp32agent net join` asks for your Wi-Fi and walks you through the iPhone side. Needs board firmware v0.2.3; with v0.2.2 the CLI stays on Bluetooth. See [the CLI guide](https://manina.ai/docs/cli#optional-put-the-board-on-your-home-wi-fi).
- **Faster over Bluetooth.** Short commands no longer wait behind the video (with the newer firmware).
- **More accurate taps.** The pointer moves one axis at a time, so calibrations from 0.1.1 are redone once; calibration copes with a ticking clock on the Home Screen.
- **DeepSeek Harness plugin** `dsh-esp32agent` ([demo](https://www.youtube.com/watch?v=DzYv0QVk_No)).
## Manina AI CLI · 0.1.1
- **Board log.** `esp32agent logs --board` reads the board's recent log without unplugging it (firmware v0.2.3 or later).
- **MCP fix.** Tools with no arguments send an empty `required` list, so stricter MCP clients accept them. The npm package carries its MCP Registry name.
## Manina AI CLI · 0.1.0
The `esp32agent` CLI connects computer agents to the board over Bluetooth, with local commands and a stdio MCP server: screenshots, taps, swipes, typing, history, and intents. Install it on macOS, Linux, or Windows from the [CLI guide](https://manina.ai/docs/cli). It needs board firmware v0.2.2 (TestFlight channel). Reading the board hotspot details from the CLI is coming in a later CLI release.
## Earlier releases · legacy
| Version | What it introduced |
| --- | --- |
| [v0.1.0](https://github.com/onehumanbeing/esp32-iphone-agent/releases/tag/v0.1.0) | The first formal GitHub Release: a computer-based agent controlling a real iPhone through an ESP32 board. |
| [v0.1.1](https://github.com/onehumanbeing/esp32-iphone-agent/tree/v0.1.1) | A later legacy tag with CLI and stdio MCP support. No separate GitHub Release entry. |
The legacy branch has continued beyond these tags. [See how the two versions differ](https://manina.ai/docs/branches).
## Board firmware
Board firmware is versioned separately from the app, on two channels. See [Firmware updates](https://manina.ai/docs/firmware-updates).
| Channel | Version | Installer |
| --- | --- | --- |
| Official | **0.2.6** | [manina.ai/install](https://manina.ai/install) |
| TestFlight | **0.2.14** (updates over Wi-Fi, and the USB and Bluetooth image), **m5stopwatch-v0.2.8** (M5Stack StopWatch, experimental) | [manina.ai/install?build=testflight](https://manina.ai/install?build=testflight) |
### 0.2.14 · TestFlight channel
Updates over Wi-Fi (**Update Board**, App 1.0.13 or newer) and on the [install page](https://manina.ai/install?build=testflight).
- **Web Playground over USB.** Plug the board into your computer's USB port and click **Connect by USB** in the [Playground](https://manina.ai/llm#playground). The iPhone's screen shows within a second or two, joining late catches up in seconds instead of minutes, and a moving screen stays live. Bluetooth stays as the fallback.
- **No mouse or keyboard on your computer.** In Bluetooth mode the board's USB is a plain serial port. A board in USB mode never moves your computer's pointer: the Playground switches it to Bluetooth mode for you.
### 0.2.13 · TestFlight channel
Updates over Wi-Fi (**Update Board**, App 1.0.13 or newer) and on the [install page](https://manina.ai/install?build=testflight).
- **Web Playground over Bluetooth.** The Playground on a computer connects to a board in Bluetooth mode. A Mac no longer asks to pair with the board as a keyboard.
- **One entry per board.** The board keeps the same Bluetooth address for computers across restarts, so a Mac or Chrome lists it once.
- **Take over from a closed app.** The Playground and the CLI can connect even when the app was closed while linked to the board.
### 0.2.12 · TestFlight channel
Updates over Wi-Fi (**Update Board**, App 1.0.13 or newer) and on the [install page](https://manina.ai/install?build=testflight).
- **Relative pointer by default.** A USB board starts with the relative pointer, as before 0.2.11. The absolute one is on only when you pick it (**Settings › Board › Pointer**). A board that already chose keeps its choice.
### 0.2.11 · TestFlight channel
Updates over Wi-Fi (**Update Board**, App 1.0.13 or newer) and on the [install page](https://manina.ai/install?build=testflight).
- **USB and Bluetooth in one image.** Choose under **Settings › Board › Input**.
- **Absolute pointer over USB.** Taps land where they aim, with no calibration; **Settings › Board › Pointer** switches it, and the board restarts. (On by default in 0.2.11 only.)
- **Keeps its name.** The name given when flashing stays after updates and shows in **Settings › Board**.
### 0.2.10 · TestFlight channel
Updates over Wi-Fi (**Update Board**) and on the [install page](https://manina.ai/install?build=testflight), USB-only and USB-or-Bluetooth images.
- **No restart on long moves.** A long pointer move no longer restarts the board.
- **New name.** The board shows up over USB and Bluetooth as **Manina AI board** by Manina AI (USB ID 303A:841F), so the installer tells a running board from one in download mode.
- **Bluetooth keyboard.** Only the iPhone running the app can be the board's Bluetooth keyboard target, so a Mac paired before no longer locks the app out.
### 0.2.9 · TestFlight channel
Updates over Wi-Fi (**Update Board**) and on the [install page](https://manina.ai/install?build=testflight), USB-only and USB-or-Bluetooth images. It brings everything since 0.2.6 to every board:
- **Bluetooth slots.** An idle link that holds one of the board's Bluetooth slots is dropped, so a new connection gets in.
- **Steadier video.** The Wi-Fi video session survives a Bluetooth radio stall; when the video buffer is full, frames nothing refers to are dropped before the picture freezes; more room for video in the buffer.
- **From 0.2.7 and 0.2.8:** USB or Bluetooth in one firmware; on iPad over Bluetooth, Home no longer opens Notification Center.
### m5stopwatch-v0.2.8 · TestFlight channel
- **Fix:** StopWatch voice is encoded in the right order (on 0.2.7, hold-yellow-to-talk could come out garbled).
- **M5Stack StopWatch (experimental).** Firmware for the watch, used with App 1.0.9 over Bluetooth. Install it from the [install page](https://manina.ai/install?build=testflight) by picking **M5Stack StopWatch**. The XIAO firmware stays at 0.2.7.
### 0.2.7 · TestFlight channel
- **USB or Bluetooth in one firmware.** The board is the iPhone's mouse and keyboard over USB or over Bluetooth, from the same firmware. Install it from the [install page](https://manina.ai/install?build=testflight); App 1.0.8 needs it for [Bluetooth mode](https://manina.ai/docs/bluetooth-mode).
### 0.2.6 · Official and TestFlight channels
- **Long text** no longer resets the board.
- **Home Wi-Fi (LAN) mode.** The board can join your home Wi-Fi, with the LAN lock: only your own phone can mirror to it.
### 0.2.5 · Official and TestFlight channels
- **Steadier picture.** A damaged video packet no longer freezes the screen until the next full frame (decryption now runs in the board's internal memory), and a packet lost for good is reported so the app can restart mirroring at once.
- **Faster gestures.** The Home swipe is one quick press-move-release, and long presses come up by themselves.
- **More reliable commands.** A reply that never arrived can be asked for again, and Manina AI CLI can always put the board back on a network.
- **Crash reports** say whether they came from this build.
### 0.2.4 · TestFlight channel
- **Phone audio.** Passes the iPhone's sound to the app while something is playing, for **Listen to phone audio** (App 1.0.2).
- **Even pointer speed.** Every move report goes at one speed, so taps land in the same place whatever the direction; the app recalibrates once after the update. Going back to the corner moves left first, then up, so it never pulls down Control Center.
- **Steadier video.** A full video buffer keeps the newest picture instead of freezing, and switching between Wi-Fi and Bluetooth no longer resends old frames.
- **Logs.** The board's own log lines also go to the app's debug log.
### 0.2.3 · TestFlight channel
- **Manina AI CLI over Wi-Fi.** With the board and the computer on the same Wi-Fi, or the computer on the board's hotspot, the CLI's commands and video go over Wi-Fi; Bluetooth stays as the fallback. Set it up with `esp32agent net join` ([CLI guide](https://manina.ai/docs/cli#optional-put-the-board-on-your-home-wi-fi)).
- **Faster CLI commands over Bluetooth.** Short commands no longer wait behind the video.
- **`esp32agent net`** shows the board's Wi-Fi, including the hotspot name and password, to the paired CLI.
### 0.2.2 · TestFlight channel
- **Manina AI CLI connection.** A second Bluetooth link for [Manina AI CLI](https://manina.ai/docs/cli), next to the app. The app has priority; the CLI can use the board while the app is idle.
- **Steadier Wi-Fi video.** Video resumes after a reconnect, also after the phone has shown a still screen for a long time, instead of freezing until Screen Mirroring is restarted.
- **Video buffer.** A full buffer is kept and reported in the board status instead of being dropped.
- **Diagnostics.** The serial port never blocks the board, and a `crash` command reports the last crash.
- **Memory.** More free memory on the board.
### 0.2.1 · Official channel
The first release: Wi-Fi video, encrypted Bluetooth with a 3-minute pairing window, and firmware updates over Wi-Fi.
---
# Disclaimer
URL: https://manina.ai/docs/disclaimer
For learning only. Operate only devices and accounts you own or have explicit permission to control.
**Manina AI is for learning and educational use only.**
Only operate devices and accounts you own or have explicit authorization to control. You are responsible for any unauthorized use of another person's devices or accounts and the resulting consequences. To the extent permitted by law, the authors and contributors are not liable for such use.
Manina AI and the ESP32 Agent app are not affiliated with, endorsed by, or sponsored by Apple. iPhone, iOS, AirPlay, AssistiveTouch, Control Center, Dynamic Island, Siri, Shortcuts, and App Store are trademarks of Apple Inc.
The project uses the [MIT license](https://github.com/onehumanbeing/esp32-iphone-agent/blob/main/LICENSE), except the firmware's AirPlay receiver, ported from UxPlay, which uses [GPL-3.0](https://github.com/onehumanbeing/esp32-iphone-agent/blob/main/hardware/hid_bridge/src/airplay/LICENSE-GPL.md). Firmware binaries linking that code are distributed under GPL-3.0. The legacy branch states its license as MIT; the license files in the version you use apply.
See the [privacy policy](https://manina.ai/privacy) for data handling and [support](https://manina.ai/support) for help.