Developing-Gamer/agent-sim

iOS simulators for AI agents, on Linux. The agent layer for x86Sim.

What it solves

agent-sim lets AI agents test iOS apps on ordinary Linux machines — no Mac, no GPU. It brings Apple's iOS simulator to x86-64 Linux and gives agents the tools they need to drive an app: install an .ipa, read the screen as text, tap, type, scroll, and watch it live in a browser. This makes iOS UI testing possible in Linux-based CI or on a developer's Linux box, without buying Apple hardware.

How it works

agent-sim is built on x86Sim, which runs Apple's arm64 simulator runtime on x86-64 Linux using Darling (macOS kernel interfaces), dynarmic (ARM translation), and Mesa's CPU Vulkan driver with metal2vulkan (Metal drawing). On top of that, agent-sim adds an agent-facing layer:

  • A command-line interface (agent-sim launch, snapshot, tap, type, scroll, etc.) and an MCP server for agents like Claude Code, Cursor, and Codex.
  • snapshot reads the accessibility tree of the app, web pages, and SpringBoard, returning the screen as text (one element per line) so agents can see what's on screen.
  • Actions (tap, type, scroll) return the resulting screen, so an agent sees the effect of each step without extra calls.
  • A phone pool that boots multiple simulators and shares memory via KSM, plus a browser-based live view (H.264 over WebSocket) with touch and key input.
  • Performance tweaks: pre-translated runtime, 2x rendering, reduced transparency/motion, and patches to x86Sim for Safari web workers and crash reporters.

Who it’s for

Developers and AI agents who want to test iOS apps on Linux — either locally or in CI — without a Mac. It's aimed at agent-driven or scripted UI checks (launch, tap, type, read the screen, record). It's not yet a replacement for XCUITest suites or real-device behavior (camera, push, DRM, performance).

Highlights

  • Runs Apple's iOS simulator on ordinary x86-64 Linux (Ubuntu 24.04) with no Mac and no GPU.
  • Provides a CLI and an MCP server so agents (Claude Code, Cursor, Codex) can control the simulator over SSH.
  • Reads the screen as text via the accessibility tree — including system alerts, home screen, and status bar.
  • Supports installing .ipa files (device builds converted for the simulator; App Store FairPlay-encrypted builds won't work).
  • Live browser streaming with touch/key input and system gestures (e.g., swipe up from bottom goes home).
  • Phone pool with memory sharing (three phones use 6.8 GB instead of 8.7 GB) and fast VM snapshot restore (20 seconds).
  • Early stage: works end to end, but has known limitations (see docs/KNOWN_ISSUES.md).

Related

  • Project
  • Project
  • Project
  • Project