
agemu
io.github.piotr-graczyk-dev由 GitHub 账号 piotr-graczyk-dev 发布v0.2.1更新于 Nov 14, 2026
Fast Android emulator and iOS Simulator control for coding agents: screenshots, UI tree, taps, logs
概览
让编码代理操控 Android 模拟器和 iOS 模拟器:截图、UI 树、点击、输入、日志与崩溃信息,响应时间达毫秒级。
- 可以做什么
- 创建、启动、关闭、重置 agemu 管理的模拟器,并切换屏幕配置
- 截取屏幕、读取 UI 树、查找元素、点击、滑动、输入文本和按键
- 安装、启动和终止应用,打开深链,等待文本或元素出现
- 设置权限、位置、剪贴板、外观,以及在 iOS 上推送通知
- 读取按应用过滤的日志,以及崩溃、ANR 和系统终止报告
- 卸载应用并清除应用数据
- 适用场景
- 适用于代理开发移动应用时,在模拟器上快速完成“改代码、运行、检查”的循环:查看屏幕、点击走完流程、读取日志并在两次运行之间重置。不适用于真机、平板,也不适用于电视、网页或桌面应用。
- 运行要求
- 以 npx 运行的本地进程(需 Node.js),或全局安装。macOS 需 Apple Silicon Mac;Android 还可在带 KVM 的 Linux 或带 WHPX 的 Windows 上运行。iOS 需装有模拟器运行时的 Xcode;Android 需 Android SDK、指定的 arm64 系统镜像和 Java 17+。可选 AGEMU_* 环境变量用于调整守护进程。
安装
在 SourceWeft 中
- 打开 控制台中的 agemu,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
agentic-emulator (agemu)
A fast control layer for the Android emulator and iOS Simulator, for coding agents that build mobile apps. A screenshot takes 4-5 ms and reading the screen 2-23 ms.
[The same agent task with adb, agent-device, Argent and agemu, on Android and iOS]
The same 18-step shopping flow (sign in, search, cart, checkout) driven by four tool stacks. Montage · Android race · iOS race · method
When an agent builds an app, writing the code is quick. Checking the result on a device is slow.
Every screenshot, screen read, tap and reset goes through adb, simctl or Maestro, and each call
takes from hundreds of milliseconds to several seconds. A test flow has dozens of these steps, so
the agent spends most of its time waiting for the emulator instead of building.
agemu replaces that control layer and leaves the devices stock: the Android SDK's arm64 image and Xcode's Simulator runtime. Your app behaves exactly as it does on the standard emulator and Simulator. Agents use agemu through an MCP server or a CLI.
Where it helps
The build, run and check loop: the agent changes code, installs the app, looks at the screen, taps through a flow, reads the logs, resets, and goes again.
A whole test flow (the race above, 3 runs per tool, medians):
On iOS most of the flow's time belongs to the app itself, so the gap is smaller there.
Each step of the loop:
Each device uses less of your Mac, so it can run beside your IDE, builds and browser:
The standard Android emulator is the AVD as Android Studio runs it: 4 GB of guest RAM, a window and audio. agemu runs it headless with 2 GB, the host GPU and preinstalled Google apps turned off. The iOS simulator saves come from system services an app under test doesn't use, which agemu turns off. Idle figures are single sessions on a busy Mac, so treat them as rough.
Measured on an M2 Pro Mac with 16 GB, over agemu's daemon connection as the MCP server uses it. The method, sample sizes and every other measurement are in docs/ANDROID.md, docs/IOS.md and bench/final/.
What the agent gets
- One call per step.
tap --text "Sign in" --wait-text Welcome --uitaps, waits for the result and returns the new screen. Fewer calls means fewer agent turns. - Taps that land. A tap by selector waits until the element can take the touch: after a screen
transition, or when an alert or sheet has just appeared. A flow doesn't fail because a tap came
too early.
--containsprefers an element whose whole text is the given text, and a switch is tapped on the switch, not in the middle of its row. - Crash notice. When the app dies, the next call says so instead of waiting for a timeout.
- Logs and crash reports from memory, filtered to your app and to what happened since launch.
- Test capabilities. Deep links, permissions, location, clipboard, dark mode, push (iOS),
clear data and uninstall.
resetundoes them all. - Lighter devices. agemu turns off system services an app under test doesn't use, such as widgets, Siri and preinstalled Google apps.
- Leaves your own devices alone. agemu touches only devices named
agemu-*, so it runs next to your emulators, simulators and other tools.
Where it doesn't help
- Real phones and tablets. agemu drives the Android emulator and the iOS Simulator only.
- Boots, app launches and your app's own animations take as long as before. That time belongs
to the OS and the app.
AGEMU_ANDROID_ANIMATIONS=0andAGEMU_IOS_ANIMATIONS=0shorten animations if you opt in. - A new Android device takes 7-8 minutes to prepare, once. agemu saves a clean baseline after the system has settled, so every later boot and reset is fast and quiet.
- More devices don't add up. On a 16 GB Mac, total throughput levels off at about 2.5 devices' worth.
- iOS needs an Apple Silicon Mac and relies on private Xcode APIs. Android also runs on Linux and Windows, where it is newer and less measured. See Known limitations.
agemu and other tools
agemu does one job: it makes the emulator and the Simulator fast and light for an agent's build,
run and check loop. Other tools cover more ground. agemu runs next to them, because it touches
only devices named agemu-*.
The agent race measures agemu against adb, agent-device and Argent on one
task. mobile-mcp is not in it yet.
Install
Cursor (~/.cursor/mcp.json), Gemini CLI (~/.gemini/settings.json), Claude Desktop and other
clients that read an mcpServers config:
agemu doctor checks each platform separately. One is enough: an iOS-only or Android-only Mac is
fine.
For agents that use a shell, put agemu on PATH:
Other MCP clients, updates, uninstalling, building from source and troubleshooting: docs/INSTALL.md.
Use
Every command prints JSON, and agemu help lists them all. Coordinates are screenshot pixels on
both platforms. With exactly one booted device, -d <device> can be left out. The test
capabilities and what reset restores: docs/CAPABILITIES.md.
The MCP server exposes the same functions as 31 tools: devices, profiles, create, boot,
shutdown, reset, park, resume, set_profile, screenshot, ui_tree, find, tap,
swipe, type_text, press_key, install, launch, terminate, wait_for, open_url,
permission, location, clipboard, appearance, apps, uninstall, clear_app_data,
push, logs and crashes. While a new Android device prepares, boot returns state
preparing at once and the agent polls devices, so no tool call outlasts a client timeout.
Profiles
Settings
Environment variables for the daemon
The daemon reads them from the process that started it, which may be an MCP client without your
shell's environment. Set them in the MCP config's env, or run agemu daemon restart from your
shell. Devices keep running across a restart.
Known limitations
- iOS uses private CoreSimulator, SimulatorKit and AccessibilityPlatformTranslation APIs. Any Xcode release can break them. This version was tested on Xcode 26.6 with iOS 26.5.
- The Simulator is not an iPhone. It runs apps natively on the Mac, so GPU, sensors, memory limits and performance differ from a real device.
- iOS reset is a soft reset. It removes user apps, privacy grants, the keychain, the pasteboard,
appearance and location. Built-in apps' data stays. For a full wipe, use
agemu shutdownandxcrun simctl erase. - Android: one UiAutomation client per device. While agemu runs,
uiautomator dumpand UiAutomator-based tests can't connect. - Android profiles other than the AVD's native one are resampled. Create the AVD with
--profile <name>to make that profile pixel-exact. - Rotation isn't handled, and iPad Split View and Slide Over are untested.
- Android on Windows is a preview. On GitHub's Windows runner the emulator boots under agemu, but the guest's services fail under nested virtualization, so the UI tree and taps are not yet verified on Windows. CI covers the unit tests, the daemon and the installers there, and runs the Android end-to-end test on Linux with KVM. Windows screenshots use the gRPC reply for now (see docs/INSTALL.md).
Documentation
- docs/INSTALL.md: every install method, MCP clients, updates, troubleshooting.
- docs/ARCHITECTURE.md: components and conventions.
- docs/ANDROID.md and docs/IOS.md: platform design, all measurements, caveats.
- docs/CAPABILITIES.md: test capabilities, the reset contract, logs and crashes.
- examples/agent-race: the recorded race and how to run it.
Contributing and license
Bug reports, measurements on other Macs and pull requests are welcome: see
CONTRIBUTING.md, and SECURITY.md for vulnerabilities. Tests:
make test (no device needed), make android-e2e and make ios-e2e. agemu is released under the
MIT License; the code it includes from others is listed in
THIRD_PARTY_NOTICES.md.
来源:README.md,提交 7a10d24
工具
0版本历史
1- v0.2.1最新Nov 14, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分