All ESP32 iPhone Agent notes
Project-specific notes

These instructions concern ESP32 iPhone Agent by Henry Yuan. Other projects in this index use different firmware, apps and protocols.

View the project profile

Connect a vision model

Choose a vision API or check the separate ChatGPT sign-in route.

ESP32 Agent sends screenshots to the selected model. Your own key or server needs image input through an OpenAI-compatible chat API. App 1.0.11 also adds a separate ChatGPT sign-in route with different credentials and transport. A provider preset or readable model list does not prove an arbitrary endpoint supports images.

On November 18, upstream renamed Handsy to Manina AI. The official website is now manina.ai; handsy.tech redirects there. This is a name and website change in main, after 1.0.6 build 17. The app and mirroring receiver may still appear as ESP32 Agent. The model gateway remains llm.handsy.tech; do not rewrite an API host to match the website name.

ChatGPT sign-in in 1.0.11

According to the Manina AI guide, select ChatGPT in Settings › Model and start Sign in with ChatGPT, then enter the code generated by that app sign-in on OpenAI’s page. Upstream describes using a Plus / Pro subscription with the same usage windows as Codex and no API key. This is not API credit, unlimited usage or a compatibility guarantee from this site. 1.0.13 build 29 is now listed in TestFlight; check the build offered on your phone.

The pinned implementation obtains and refreshes login tokens through OpenAI and stores them in the iPhone Keychain. Model requests use the ChatGPT Codex endpoint; screenshots and tasks still go to OpenAI. Models come from the account’s list, reasoning effort is selectable when offered, and usage windows come from service responses. Exhausted limits require waiting; invalid authentication requires signing in again. Sign Out clears the app’s local login copy. Separately enabled hosted Jev has its own data route. This site has not signed in, sent requests or verified subscription access.

Configure the endpoint

In the app’s model setup, choose a matching provider preset or Others for a custom base URL. Enter your own API key and the exact model identifier available to that account.

The base URL is the API root, not the complete chat-completions URL. For a service documented at https://your-model.example/v1/chat/completions, the base is typically https://your-model.example/v1. Use your service’s actual documented address; this example is not a working endpoint.

Do not paste a key for one provider into another provider’s endpoint. Credentials are stored in the phone’s Keychain; you should still verify the destination before sending screenshots.

If a cleared key comes back after switching away from an endpoint and back, older builds can retain a saved copy. #137, included in the 1.0.5 tag, removes the endpoint’s Keychain entry when an empty key is saved. To invalidate a credential, revoke it with the provider; deleting the app’s copy does not revoke it.

Model selection keeps loading

The repeated loading in #172 was fixed in later source; on November 22 the maintainer confirmed it shipped in App 1.0.8. The picker automatically requests a list once per endpoint/key, with Refresh for another attempt. Failure stops the spinner, explains the error and offers Custom model → Model ID. Use the exact ID from Model Studio. Discovery fixes do not establish image support: test an image request separately, and check build availability.

Choose a model that can see

Confirm all three conditions:

  1. The model accepts images in chat requests.
  2. Your account has access to the exact model ID.
  3. The endpoint supports the image request format the app uses.

For your own chat API, explicitly choose a vision model or enter its exact model ID; fetching its list does not select one. The 1.0.11 ChatGPT route instead selects the first model in the account’s returned list when none is selected; check that choice before running. You can set separate planner and actor models. Begin with one known image-capable model for both roles, then change one thing at a time when comparing behavior.

Test from the app

Use the connection test after editing the configuration. The current app tests with a generated color image. A passing result verifies that request, not overall reliability on every app or task.

  • Authentication failure: check the host, key, account permissions, and billing status with your provider.
  • Unknown model: check the exact model ID and access rights.
  • Image rejected: confirm vision support and API compatibility.
  • Timeout: check the phone’s actual cellular or Wi-Fi route and whether the endpoint is reachable.

Self-hosted models

The project supports compatible endpoints served by tools such as vLLM, SGLang, llama.cpp, and Ollama, provided the selected model and server accept the required image requests.

With the default firmware setup, the board’s hotspot occupies Wi-Fi and provides no internet, so a LAN-only model address is unreachable over that route. The optional home Wi-Fi / LAN mode instead lets the board and phone join the same router and reach a model over Wi-Fi, subject to routing and firewall rules. In either mode, localhost on the phone refers to the phone itself. Use a secured endpoint reachable from the phone’s actual network.

Temperature rejection in the iPhone app

If HTTP 400 names temperature, check the app version and provider response. #45 landed on main after the v0.2.4 tag. The updated client retries without temperature when it is rejected, remembers that choice for the client session, and can also negotiate the token-limit field if both are rejected. #93, already in the v0.2.4 tag, preserves the user’s configured output budget during token-parameter negotiation.

In the later 1.0.4 source, #121 disables thinking by default for requests to api.deepseek.com; an explicit thinking value in Extra body JSON overrides that default. The host check does not cover third-party gateways, and this setting does not establish image support. See release and source versions.

Model errors in the legacy server

These fixes are for the computer-hosted legacy server, not the current iPhone app. Merged on October 21, #38 retries a rejected temperature parameter without it. #40 narrows this to a 400 response that identifies temperature as deprecated or unsupported; other errors remain errors. Once rejected, that client stops adding the parameter for subsequent calls.

The reviewed server implementation also retries a temporary 429 up to three times: it uses a numeric Retry-After capped at 60 seconds, or waits 5, 15, then 30 seconds when no numeric value is available. A response containing PerDay or insufficient_quota fails immediately; persistent 429s still fail after the retry budget. Check the provider’s quota or billing rather than expecting retries to fix exhausted allowances. These are the code’s specific checks, not a complete classifier for every provider’s quota errors. The contributor reports focused mocked-request tests; this site has not measured provider reliability or run hardware tasks.

Understand data and cost

Screenshots and task text leave the phone for your selected endpoint. That provider’s privacy and retention policies apply. Choosing a self-hosted model does not by itself make the entire network path offline.

API usage is separate from the hardware cost. No universal speed, success rate, or “best model” is promised here. Evaluate a small, repeatable task and compare its saved run data.

The reviewed post-1.0 branch loop attaches images to planner/actor requests. Re-planning, steps and retries increase requests; one task is not one call. No fixed per-task cost has been verified here.

#72 and #74, merged into release-1.0 on November 4, add run-level accounting. These changes are absent from the original v1.0.0 tag. ModelUsage counts planner/actor calls, failures and image_requests (image-bearing attempts, including failures/retries, rather than distinct screenshots). It aggregates reported tokens, including total-only usage. Missing usage or one missing side on a successful call marks the total partial; when no call reports usage, token fields are omitted rather than presented as zero. Input/output subtotals can also be incomplete in mixed reporting.

The run-end path writes a summary to the debug log and emits run_ended only when optional usage statistics are enabled. It does not turn metrics.json into a billing total or make raw exports reproduce every request. Use provider records to check charges; an open Issue #53 does not mean this merged accounting is still only a proposal.

Optional free line and usage-statistics privacy

In issue #187, the maintainer confirms that 1.0.10 still has a free line: choose Manina AI and leave its optional Manina AI key empty. Capacity is limited; keep the exact error when it fails. 1.0.11 hides the paid-key field, plan card and key-only search tool in TestFlight and ordinary source builds and ignores a saved key there. This does not remove the free line. App Store builds have separate configuration; this site has not verified store distribution or actual quotas.

The November 30 Manina AI policy and free-line notice retain screenshots, tasks, model replies and diagnostics, including device model identifiers. The updated stated purposes explicitly include developing and improving its AI models, alongside running tasks, troubleshooting and service improvement. Simple-step screenshots with task context, or extracted elements and targets, may go to an unnamed service provider. Screenshots are not automatically redacted and no automatic deletion schedule is given. Withdrawal stops future uploads; deletion of existing records needs a separate request with the installation ID. Capacity and region restrictions remain. This site has not audited the running service.

The November 30 policy still describes Jev as off by default with your own AI service. In contrast, build 29’s updated decider defaults put Manina AI / Jev first even with your own key, reset the previous default, and still require separate Jev consent before it receives requests. An older default is not preserved as an explicit choice. Once allowed, step screenshots, task, plan and recent actions go to Holomix and TypeSafe and are kept to run and improve Jev; an own TypeSafe key routes directly there. Turn Jev off for a model-only route and review Settings › Privacy. An API key or ChatGPT sign-in alone does not make the run single-provider. This source/policy discrepancy is unresolved; this site has not audited the service.

Source checks AI-data consent per destination host in distribution builds; self-built development configurations do not apply the same gate. A separate optional PostHog statistics switch is off by default. Configured, opted-in builds send device/run/model timing and token events, excluding tasks, screenshots, replies, keys and service addresses. This is a different choice from sending content to a model or free line.

The 1.0.5 release also records the free-line installation ID under Settings → Privacy, with a link to request deletion. With a new install and no other provider configured, accepting the first-launch data screen also allows Handsy Free; a different service or Jev still prompts separately. Optional usage statistics remain a separate setting.

Search tools use separate endpoints

Tools (Beta) in App 1.0.5 can send a lookup query to Handsy Search with a Handsy key, Exa with a separate key, or an imported HTTPS tool. Check the destination before enabling a tool, and keep private terms out of lookup queries. Imports are enabled when added; an ID match replaces the previous custom tool. The JSON export does not include keys saved separately in Keychain, but inspect exported URLs and fixed fields before sharing.

The Manina/Handsy key-based search described for 1.0.5 is version-specific. Ordinary 1.0.11 source and TestFlight builds no longer expose that key-only option. Exa and custom tools still have their own configuration and consent.

Change the prompts

Planner and actor prompts live in the repository’s prompts/ directory and are bundled into the app. Edit them and rebuild to change the agent’s instructions. Keep a record of your model and prompt configuration when comparing results.

Free-line duration and startup accounting

1.0.13 displays a 60-minute task limit for the free line. Own-model and keyed source paths have separate limits; do not apply a free lease to every provider. Since 1.0.12 the free slot is claimed alongside startup: a later board, mirroring or first-frame failure can still consume a daily run. Fewer waits and discarded Look ahead calls do not establish a measured cost reduction. Check the build and the service’s current allowance.

Manina grounding models are separate from a chat endpoint

The new Manina-4B-HD-1.0 model card describes a Qwen3.5-4B-based locator returning target presence, a box, point and confidence through custom inference code. It is not a drop-in OpenAI chat planner. Its Manina Research License permits non-commercial research and restricts commercial use; the app repository’s MIT license does not cover these weights. Published screenshot-grounding scores do not measure complete phone tasks.

The separate hosted Lite /v1/act API sends a screenshot, goal, plan and optional history to llm.manina.ai and returns one operation; the caller still supplies text/app names and executes actions. Do not replace the app’s chat base URL with this route. manina and esp32agent are separate CLI packages. This site has not downloaded weights, run benchmarks or called the API.

Project sources

CHANGELOG.mdREADME.mdios/IPhoneAgent/Services/LLMClient.swiftios/IPhoneAgent/Services/Settings.swiftios/IPhoneAgent/Services/ChatGPTAuth.swiftios/IPhoneAgent/Services/ModelProvider.swiftios/IPhoneAgent/Agent/Deciders.swiftios/IPhoneAgent/Agent/JevTypeSafe.swiftios/IPhoneAgent/Trial/Trial.swiftios/IPhoneAgent/Agent/ModelCall.swiftios/IPhoneAgent/App/RunSession.swiftios/IPhoneAgent/Services/AIConsent.swiftios/IPhoneAgent/Services/Analytics.swiftios/IPhoneAgent/Agent/Tools.swift