# Simulators and emulators driven by agents

> An agent that builds a mobile app can check its own work on a real iOS simulator (Mac) or Android emulator of your computer: start the device, install the build, launch the app, open a deep link or an Expo dev-client URL, take a screenshot and read the logs.

- Area: Desktop app
- Plans: All plans
- Last checked against the product: 2026-11-23
- Web page: https://agentsroom.dev/docs/device-control

## What it does

An agent that builds a mobile app can check its own work on a real iOS simulator (Mac) or Android emulator of your computer: start the device, install the build, launch the app, open a deep link or an Expo dev-client URL, take a screenshot and read the logs. Only the agents you grant "Device access" get these tools. Available to everyone, no beta to join.

The agent can also read the screen's elements, tap, swipe, type and press keys. On iOS that needs serve-sim (`npm install -g serve-sim`, Apple Silicon Mac). You watch the device live in Tests > Device, and can tap, swipe and type on it yourself: doing so takes control from the agents until you hand it back (or 2 minutes without a gesture). From the phone, the project menu > "Device screenshots" shows the last screenshot each agent took.

## Where to find it

- The device itself: right panel > Tests > "Device · iOS · Android": pick a simulator or emulator, Start, watch it live, see which agent drives it, "Take control" / "Hand back", recent actions, and which agents have access.
- Per agent: Edit agent > Capabilities > "Device access (iOS simulator, Android emulator)". Same box in the Add agent window (Advanced), in a scheduled agent's editor (Capabilities), and on the phone's New agent sheet.
- Default for new agents: Settings > AI providers > "New agents: Device access", overridable in Project settings > Capabilities.

## How to use it

1. Tick "Device access" on the agent that works on the mobile app.
2. Ask it to build the app for the simulator (for Expo: `npx expo run:ios` or `npx expo run:android`) and to check a screen.
3. The agent calls `device_list`, boots a device, installs the build, opens the screen and sends back a screenshot.

Only one pilot per device: a second agent waits (up to 90 s) or picks another device. Unticking "Device access" takes effect at the agent's next call, without restarting it.

## Settings

- `deviceAccess` (agent, Edit agent > Capabilities > "Device access (iOS simulator, Android emulator)"): lets this agent drive devices. Default off. Also settable with `agents_save` and `settings_set` at agent scope.
- `newAgentDeviceAccess` (global, Settings > AI providers > "New agents: Device access"): every new agent starts with the box ticked. Default off.
- `newAgentDeviceAccess` (project override, Project settings > Capabilities): same, for one project; unset inherits the global value.

## Agent tools (MCP)

Server `AgentsRoom-Device`, only for agents with "Device access":
- `device_list`: devices of this computer, their state, who drives each, and what to install when a platform is missing. `setup.ios` says `ready` only when touch and UI reading work too; without serve-sim (or on an Intel Mac) it starts with "Partly ready" and says what is missing and how to install it.
- `device_boot`: start a device and wait until it is ready (up to 3 minutes).
- `device_install_app`: install a simulator `.app` folder (iOS) or an `.apk` (Android).
- `device_launch_app`: launch an installed app by bundle id or package name.
- `device_open_url`: open a deep link or an Expo dev-client URL (`reversePorts` lets an Android emulator reach Metro on 8081).
- `device_screenshot`: capture the screen.
- `device_get_logs`: recent logs, optionally for one app.
- `device_read_ui`: the elements on screen (ref, role, label, frame).
- `device_tap`, `device_swipe`, `device_type`, `device_press`: act on the screen (a ref, or pixels of the last screenshot).

## Providers

All providers with MCP support (Claude Code, Codex, Gemini, OpenCode, Cursor, Grok, Antigravity...). Aider has no MCP client, so no device tools.

## Mobile

The "Device access" box exists on the phone (New agent sheet, scheduled agents). The device itself is not shown on the phone.

## Limits

- iOS Simulator needs a Mac with Xcode (not the Command Line Tools alone) and an iOS runtime. On Windows and Linux, `device_list` says so.
- Android needs Android Studio's SDK with the "Android Emulator" package and at least one virtual device (Device Manager). Windows needs hardware virtualisation (Windows Hypervisor Platform); Linux needs access to `/dev/kvm`.
- Touch and typing on the iOS Simulator need serve-sim (`npm install -g serve-sim`) and an Apple Silicon Mac; with Xcode 27, the Simulator window must stay visible and AgentsRoom needs the Accessibility permission. An Android emulator types plain ASCII only.
- The live Android screen works for emulators started from AgentsRoom; one started from Android Studio shows no live screen (stop it and start it from Tests > Device).
- A simulator with two screens (a foldable iPhone) is captured on its primary screen; the second screen cannot be captured, and touch coordinates follow the primary screen.
- Physical phones, watchOS, tvOS and visionOS are not supported.
- An agent can have at most two devices started by AgentsRoom running at once (each emulator uses 2 to 4 GB). Agents cannot shut a device down; devices AgentsRoom started are stopped when you quit the app, yours are never touched.

## Common questions

- **Can my agent test the mobile app on a simulator by itself?** Yes: tick "Device access" on that agent; it installs the build, opens the screen and sends you a screenshot.
- **Why does the agent say the Android SDK was not found?** AgentsRoom looks in `ANDROID_HOME`, `ANDROID_SDK_ROOT`, then Android Studio's default folder. Install Android Studio, or set `ANDROID_HOME` and restart AgentsRoom.
- **Two agents want the same simulator?** One drives, the other waits up to 90 seconds, then is told who drives it and can pick another device.
- **The agent reads no logs from my iOS app (.NET MAUI, Flutter, Unity).** Fixed in 1.288: logs filtered on an app now also match its program name, which often differs from its bundle id, so `print` and `NSLog` lines come through. Update the app.
- **The agent cannot open my app on a recent Android emulator (Android 15).** Fixed in 1.288: the app is opened the way the launcher opens it. Update the app.
- **Does it work on Windows or Linux?** Android emulators yes; the iOS Simulator only exists on a Mac.
- **Can my agent show me the simulator?** Yes, when you ask it to: "show me the simulator". It opens Tests > Device, on the device it is using. It never switches your tab on its own.
- **Does a simulator open in a separate window?** An iOS simulator started from AgentsRoom shows only in Tests > Device (no Simulator.app window); "Open in its own window" in the toolbar opens it if you want it. An Android emulator still opens its own window for now.

## Related

- [Browser Automation](https://agentsroom.dev/docs/browser-automation.md): the same idea for web apps, in the embedded browser.
- [AgentsRoom in Chrome (agents drive your own Chrome)](https://agentsroom.dev/docs/chrome-control.md): agents driving your own Chrome.
