mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
v0.10.1
agent-device
agent-device is a CLI for UI automation on iOS, tvOS, macOS, Android, and AndroidTV. It is designed for agent-driven workflows: inspect the UI, act on it deterministically, and keep that work session-aware and replayable.
If you know Vercel's agent-browser, this project applies the same broad idea to mobile apps and devices.
Project Goals
- Give agents a practical way to understand mobile UI state through structured snapshots.
- Keep automation flows token-efficient enough for real agent loops.
- Make common interactions reliable enough for repeated automation runs.
- Keep automation grounded in sessions, selectors, and replayable flows instead of one-off scripts.
Core Ideas
- Sessions: open a target once, interact within that session, then close it cleanly.
- Snapshots: inspect the current accessibility tree in a compact form and get stable refs for exploration.
- Refs vs selectors: use refs for discovery, use selectors for durable replay and assertions.
- Human docs vs agent skills: docs explain the system for people; skills provide compact operating guidance for agents.
Command Flow
The canonical loop is:
agent-device open SampleApp --platform ios
agent-device snapshot -i
agent-device press @e3
agent-device diff snapshot -i
agent-device fill @e5 "test"
agent-device close
In practice, most work follows the same pattern:
opena target app or URL.snapshot -ito inspect the current screen.press,fill,scroll,get, orwaitusing refs or selectors.diff snapshotor re-snapshot after UI changes.closewhen the session is finished.
Where To Go Next
For people:
For agents:
Install
npm install -g agent-device
Contributing
See CONTRIBUTING.md.
Made at Callstack
agent-device is an open source project and will always remain free to use. Callstack is a group of React and React Native geeks. Contact us at hello@callstack.com if you need any help with these technologies or just want to say hi.
Description
agent-device: Automates Apple-platform apps (iOS, tvOS, macOS), Android devices, and Amazon Vega OS TV apps in Vega Virtual Devices. Use when navigating apps, taking…; dogfood: Systematically explore and test a mobile app on iOS/Android with agent-device to find bugs, UX issues, and other problems. Use when asked to dogfood, QA,…; ios-simulator: Verify and debug native, React Native, Expo, or Flutter apps on an iOS Simulator with agent-device. Use when an agent needs to launch an app, inspect i…
adbagentic-aiagentsai-agentsandroid-emulatorautomatione2e-testingexpoflutterios-simulatormcpmobilemobile-testingperformance-optimizationreact-nativetestingxcuitest
Readme
MIT
170 MiB
Languages
TypeScript
94.1%
Swift
3.7%
JavaScript
0.9%
Objective-C
0.7%
Java
0.4%
Other
0.2%