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

Replay, review & export a run

Understand what happened at each step and export the right evidence.

Every run is stored on the iPhone. Replay is useful for checking what the model saw, where it tried to tap, and whether the visible result matched your goal.

Files and exports in 1.0.7–1.0.10

1.0.7 adds Files: Results holds Markdown, screenshots and cropped images, linked to runs and intents. Search names or text, import a file or export a folder ZIP. Swiping deletes files immediately, so check the target. Logs move to Documents/logs, developer files to Documents/developer.

An intent can keep a successful run’s plan. 1.0.8 adds a per-intent Reuse Plan switch and a model judgment after each run. These are local files, not automatic device synchronization or a guarantee the plan still fits.

In 1.0.8, raw trace sharing includes available debug.log, debug.1.log and about.txt (app/OS version and phone model) beside the run folder. The archive can therefore contain more than one run’s steps. Key filtering does not remove the need to inspect screenshots, input and transcription. The upstream export guide still bears its October audit date; verify the generic paths and file table below against your build.

1.0.10 fixes collect WHAT max N finishing at its count without saving the result. Run-level events add input transport and unchanged_max; some stuck exits become stall. These are diagnostic outcomes, not independent success evidence.

Review a run

Finish or stop a run, then open it in Runs. Step through the screenshots and actions. Where supported by the review screen, add Correct / Wrong verdicts, corrected tap locations, and notes.

Those annotations are stored separately from the original trace. A final done action is the model’s completion claim; your review is separate evidence about whether it actually succeeded.

Demonstrations, intent changes and memory

In App 1.0.5, a recorded demonstration becomes a run you can review and save as an intent. A successful recovery can replace saved steps. Use Wrong in the Dynamic Island within 90 seconds or Undo on the intent to reverse a learned change, or turn off Intents learn from runs. In 1.0.6, additional instructions entered while running appear in the review. Review screenshots may be blurred in the app; check the actual export before sharing.

App 1.0.6 can import and export a separate MEMORY.md in Settings → Memory. Transfers use the file you share; this is not automatic device sync. CLI 0.1.5 now includes memory export and memory import; the older 0.1.4 downloads did not. The app filters recognized sensitive patterns on import, but manually review a file before sharing it.

Export one raw trace

  1. Open a run in Runs.
  2. Save any review annotations.
  3. Choose ⋯ → Export trace.
  4. Use the share sheet to save the ZIP to Files or transfer it to your computer.

This exports the run folder, including original screenshots and typed text. You do not need to enable Keep run data for sharing for the raw export.

Export a batch

Use Settings → Diagnostics → Export traces to export trace folders, including older runs beyond those shown in the list. Settings → About → Logs → Export all logs is broader and may include other Documents data; use it only when needed.

Finder file sharing is also enabled: connect a paired iPhone to your Mac, open Finder → iPhone → Files → ESP32 Agent, and copy the traces folder.

What is in the archive?

FileContents
steps.jsonlTask, model-call, and action events, one JSON object per line
Root JPG imagesScreenshots referenced by the events
review.jsonSaved verdicts, corrections, and notes, when present
video/*.jpgLow-frame-rate screen history, when recorded
metrics.jsonA diagnostic snapshot, when written

ZIP wrapper folders vary. Find the run by locating steps.jsonl. Review edits can insert or remove steps; do not join edited and original records by array position alone.

Raw export or sharing export?

The separate Settings → Privacy → Keep run data for sharing → Prepare Export flow processes the content to reduce exposure of selected text and image areas. It is not a guarantee that all personal information is removed.

Choose a raw trace when analysis requires original images and text. Choose a processed sharing export when that better suits your purpose, then inspect the result before sending it anywhere.

With App 1.0.2 and firmware v0.2.4, enabling Listen to phone audio can add words heard on the phone to the agent’s model context. On-device speech recognition does not keep that transcript out of a model request. Enable Share with the computer only if you want the CLI to read the app’s transcript. The debug log can also contain snippets of the transcript. Review logs and traces before sharing them.

Branch accounting and export limits

The November 4 release-1.0 changes (#72/#74, included in v0.2.4) aggregate planner/actor calls, image-bearing requests and reported tokens. The original v1.0.0 tag lacks this increment. A short summary goes into the debug log; run_ended is sent only with optional statistics enabled. This does not add billing amounts to metrics.json; newer exports include available debug logs without guaranteeing every historical total. image_requests includes failed/retried attempts rather than distinct images. Missing usage is not zero; partial totals still need provider records. See models, costs and privacy.

Keep expectations precise

Saved exports help investigate behavior but do not reproduce every original request. Some request configuration and failed attempts are not fully captured. Diagnostic metrics can include a shared recent-step buffer, so they are not necessarily an isolated summary of one run.

Read the upstream export reference for event fields and analysis limits, and privacy and data before sharing archives.

Consecutive tasks and timing data in 1.0.11

1.0.11 fixes a second consecutive task reusing the previous task’s result directory; each new task gets its own folder. When old results appear, record the actual app build and both tasks rather than treating an old folder as new output. 1.0.10.1 also retains successful intent plans and stops writing the clipboard at task startup.

In 1.0.11 the free line also receives step timings for first token, image preparation, change checks, pointer checks and after-gesture work, plus the run’s start time, expressed in seconds. These diagnostics travel with free-line requests and do not mean optional usage analytics was enabled or that screenshots and tasks are absent. Default Look ahead can create cancelled requests; executed action counts alone cannot establish requests or cost.

Return an intent result to Shortcuts

1.0.13 adds Run Intent and Get Result and Get Run Result. The first runs a saved intent, fills its blanks one input line at a time and returns the answer, status and run ID. Status can be done, failed, needs you, stopped, still running or not started. Each action waits about 20 seconds; for a long run pass its ID to Get Run Result with Wait Until It Ends and repeat as needed. A question returns needs you immediately. In the AirPlay route, mirroring must already be on. Build 29 is listed in TestFlight; Screen Recording needs foreground system permission. These actions do not provide the separate Unicode clipboard proposal in #141.

1.0.13 also adds notification settings and reminders after 2, 10 and 30 minutes while waiting for you. iOS Screen Sharing notification settings and Focus can hide alerts. A returned done status is the app’s classification; verify the result before another shortcut relies on it.

Long saved intents in 1.0.14

The release removes the 12-step limit for intent parts with no step count while the screen changes, and hands stalled work back to the model. Script repair also avoids replaying steps already performed by the repair model (#215). These source changes do not remove free-line time limits or establish a 15-minute run’s success. Build 30 remains under review; inspect the trace and final phone state.

Project sources

CHANGELOG.mdios/IPhoneAgent/Shortcuts/AppModel+Shortcuts.swiftios/IPhoneAgent/Shortcuts/ShortcutActions.swiftdocs/run-data-export.mdios/IPhoneAgent/Services/TraceStore.swiftios/IPhoneAgent/Agent/ModelCall.swiftios/IPhoneAgent/App/RunSession.swiftios/IPhoneAgent/Services/Metrics.swiftdocs/privacy.mdios/IPhoneAgent/Audio/AudioFeed.swiftios/IPhoneAgent/Services/MemoryStore.swift