agent-sim
Health Uyari
- License — License: Apache-2.0
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 6 GitHub stars
Code Basarisiz
- rm -rf — Recursive force deletion command in install.sh
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
iOS simulators for AI agents, on Linux
agent-sim
iOS simulators for AI agents, on ordinary Linux machines. No Mac, no GPU.
agent-sim runs Apple's iOS simulator runtime on an x86-64 Linux VM and gives agents what they need to test iOS
apps: install an .ipa, read the screen as text, tap, type, scroll, and watch it live in a browser. One command line
for scripts and CI, and an MCP server for Claude Code, Cursor, Codex and other agents.
$ agent-sim launch com.apple.Preferences && agent-sim snapshot
app com.apple.Preferences
@e1 button "Apple Account, Sign in to access your iCloud data, the App Store, Apple services, and more." (201,213)
@e2 button "General" id="com.apple.settings.general" (201,320)
@e3 button "Accessibility" id="com.apple.settings.accessibility" (201,372)
...
$ agent-sim tap @e2
tapped @e2 button "General"
Status: early. It works end to end; expect rough edges, and see what does not work yet.
Quick start
On an x86-64 Linux machine with Ubuntu 24.04 (8+ CPUs, 16 GB of memory, 60 GB of free disk):
curl -fsSL https://raw.githubusercontent.com/Developing-Gamer/agent-sim/main/install.sh | bash
agent-sim setup # once, about half an hour: x86Sim, Apple's iOS runtime (8 GB, from Apple), a first phone
agent-sim up # boot it: 12-30 s, depending on the CPU
agent-sim snapshot
From a checkout instead: cargo build --release, then scripts/setup-vm.sh and target/release/agent-sim.
agent-sim setup --fidelity high --device hifi adds a phone that looks exactly like Apple's simulator (3x, every
blur and animation) for screenshots; the default draws at 2x with reduced effects and scrolls twice as fast.
Use it from an agent
As an MCP server:
claude mcp add agent-sim -- agent-sim mcp # Claude Code
{ "mcpServers": { "agent-sim": { "command": "agent-sim", "args": ["mcp"] } } }
The tools are snapshot, tap, type, scroll, swipe, press, launch, terminate, install,uninstall, apps, open_url, wait_for, screenshot and boot. Actions answer with the screen that follows,
so an agent sees the result of each step without asking again. For agents that work in a shell,
skills/agent-sim/SKILL.md teaches the command line.
The command line
agent-sim install MyApp.ipa # a device build is converted for the simulator; a simulator .app works too
agent-sim launch com.example.myapp
agent-sim snapshot # the screen as text, one element per line (--json for frames, ids, states)
agent-sim tap @e4 # an element from the last snapshot; or: tap "Sign in"; or: tap 201 320
agent-sim type "[email protected]"
agent-sim scroll down
agent-sim wait "Welcome" --timeout 20
agent-sim screenshot -o screen.png
agent-sim press home
agent-sim open https://example.com
snapshot reads the accessibility tree of the app in front, the web pages it shows, and SpringBoard, so system
alerts, the home screen and the status bar are in it too. Every command takes --device NAME; agent-sim --help
lists them all.
The simulator controls Apple's simctl has are here too: appearance dark, status-bar --time 9:41, clipboard,record -o video.mp4, erase, logs, plus x86Sim's location, push, privacy and addmedia.
docs/PARITY.md compares every feature with Apple's Simulator on a Mac.
Device builds run when they are not encrypted. App Store downloads are (FairPlay), so use an Ad Hoc, Development or
Enterprise export, or build for the simulator.
Watch it in a browser
agent-sim serve --listen 0.0.0.0:7979
It prints a URL with an access token. The page streams the screen as H.264 over a WebSocket (decoded with
WebCodecs, so a recent Chrome, Edge or Safari) and sends touches, keys, scrolling and the Home and Lock buttons
back. Touches that start at a screen edge are system gestures: a swipe up from the bottom goes home. Keep the token
private.
Many phones
agent-sim pool up 3 # prepare and boot pool1..pool3
phone=$(agent-sim pool take) # a booted phone nobody else holds
agent-sim --device "$phone" snapshot
agent-sim pool release "$phone" # it restarts in the background for the next taker
Phones share memory through the kernel's KSM: three take 6.8 GB together instead of 8.7 GB. On a cloud provider
with VM memory snapshots, a booted phone can be saved and brought back running in about 20 seconds
(docs/BENCHMARKS.md).
How it works
x86Sim runs Apple's arm64 simulator runtime on x86-64 Linux: Darling provides
the macOS kernel interfaces, dynarmic translates the ARM code, and Mesa's CPU Vulkan driver draws Metal through
metal2vulkan. agent-sim builds the agent-facing product on top of it:
- A phone set up for speed: a pre-translated runtime, the services apps need and none they do not, the screen
drawn at 2x, and reduced transparency and motion. Scrolling runs at about 55 fps on a Zen 5 VM, and a touch
reaches the screen in about 14 ms (docs/BENCHMARKS.md). - Fixes in x86Sim (patches/x86sim): web workers in Safari, and apps with crash reporters
no longer crawl. - Hooks in the phone (hooks): an accessibility reader for
snapshot, and stale permission prompts
dismissed as on a device. - The agent interface: the CLI, the MCP server,
.ipaconversion, the phone pool and the browser stream.
Documentation
- docs/PARITY.md: feature by feature against Apple's Simulator on a Mac
- docs/BENCHMARKS.md: speed, memory, several phones, snapshots
- docs/KNOWN_ISSUES.md: what does not work yet and why
- docs/ROADMAP.md: what comes next
- CONTRIBUTING.md and SECURITY.md
Credits
agent-sim builds on x86Sim, which runs Apple's simulator runtimes on Linux
through Darling, dynarmic and
metal2vulkan. Fixes agent-sim needs in x86Sim itself live in
patches/x86sim until they are upstream.
Apple's runtimes are downloaded from Apple onto your own machine and are never part of this repository.
License
Apache-2.0, except the patches in patches/x86sim, which follow x86Sim's GPL-3.0-or-later.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi