agent-device
OfficialThe agent-device server enables AI agents to automate real mobile, TV, and desktop apps through inspection, interaction, evidence capture, and workflow replay across iOS, Android, macOS, tvOS, and Linux platforms.
Device & App Management
List devices (
devices), boot devices (boot), list/install/reinstall apps (apps,install,reinstall,install-from-source), open apps/deep links/URLs (open), close apps or sessions (close), manage sessions (session), and check foreground app state (appstate).
UI Inspection
Capture accessibility snapshots (
snapshot), diff snapshots (diff), find elements by text/label/role/id (find), get element text/attributes (get), and assert UI state (is).
UI Interaction
Tap/click (
click,press), long press (longpress), fill text fields (fill), type into focused fields (type), focus inputs (focus), scroll (scroll), swipe (swipe), run structured gestures like pan/fling/pinch/rotate (gesture), navigate back (back), go home (home), open app switcher (app-switcher), rotate orientation (rotate), handle alerts (alert), manage keyboard (keyboard), read/write clipboard (clipboard), wait for conditions (wait), change OS settings/permissions (settings), push notifications (push), and trigger app-defined events (trigger-app-event).
Evidence & Diagnostics
Capture screenshots (
screenshot), record video (record), collect logs (logs), monitor network traffic (network), gather performance metrics (perf), and start/stop traces (trace).
Workflow Automation
Replay recorded
.adscripts (replay), run multiple scripts with retry and JUnit reporting (test), and batch multiple commands in a single request (batch).
React Native / Metro
Prepare Metro runtime, reload React Native apps (
metro), and dismiss React Native overlays (react-native).
Supports native, Expo, Flutter, and React Native apps on simulators, emulators, and physical devices.
Automates Android emulators and devices, enabling app opening, UI accessibility tree inspection, element interaction (fill, tap), and evidence collection (screenshots, videos, logs, CPU/memory/perf).
Enables testing of Expo apps on iOS and Android, including opening Expo Go or dev clients, UI snapshotting, element interaction, and gathering evidence such as screenshots, videos, logs, and performance traces.
Automates iOS simulators and devices, enabling app opening, UI accessibility tree inspection, element interaction, and evidence collection (screenshots, videos, logs, network, performance).
Automates Linux desktop applications, enabling UI inspection via accessibility snapshots, element interaction, and evidence collection (screenshots, logs, performance).
Automates macOS desktop applications, enabling UI inspection via accessibility snapshots, element interaction, and evidence collection (screenshots, logs, performance).
agent-device
Let your coding agent verify its changes in the running app.
agent-device lets coding agents inspect, control, and verify apps on iOS, Android, tvOS, Android TV, Amazon Vega OS TV through the Vega Virtual Device (VVD), web, macOS, and Linux. Agents can read token-efficient accessibility snapshots where supported, find elements by ref or selector, run device actions, and save evidence for review. Initial Vega OS support is VVD-only and covers discovery, app lifecycle, and complete TV-remote control; physical Fire TV, capture, and selector backends remain unsupported.
Your coding agent or QA tool reads each result and chooses the next command. agent-device runs the command and saves evidence when asked.
agent-device uses the inspect-act-verify process from Vercel's agent-browser for mobile, TV, and desktop apps. Basic --platform web support runs agent-browser in the same session and replay system.
Quick start
Install the CLI and check setup. It requires Node.js 22.12 or newer; web automation requires Node.js 24 or newer. See Installation for target requirements.
npm install -g agent-device@latest
agent-device doctor
agent-device help workflowRun agent-device doctor yourself before handing the CLI to an agent. The installed CLI help defines current behavior. agent-device help workflow links to guides for debugging, replay, React Native profiling, and other tasks.
Add a contact in the built-in iOS Contacts app:
# Start a session.
agent-device open Contacts --platform ios
# Inspect the screen. The example below shows the output; refs vary.
agent-device snapshot -i
# @e2 [button] "Add"
# Use the ref and wait for the UI to settle.
agent-device press @e2 --settle
# The diff includes:
# + @e7 [text-field] "First name"
agent-device fill @e7 "Ada" --settle
# The next diff shows changed values and current refs:
# - @e7 [text-field] "First name"
# + @e14 [text-field] "Ada"
# = @e15 [text-field] "Last name"
# Capture evidence and close the session.
agent-device screenshot ./contact-form.png
agent-device closeUse refs only from the latest output. Do not assume an earlier @eN still identifies the same element. After a command with --settle, use the refs in its diff. Take another snapshot only if the diff omits what you need.
Snapshots use the app's accessibility tree. Clear labels, roles, and test IDs make agent runs more reliable. Use screenshots and videos as evidence or when accessibility data is poor. Use refs and selectors for actions and assertions when you can.

Related MCP server: hermes-oh-my-pi-mcp
What agents can do
Inspect app state through accessibility snapshots, refs, selectors, and React Native component trees.
Act on visible UI by tapping or pressing elements, filling fields, scrolling, making gestures, waiting, asserting state, and handling alerts.
Diagnose failures with screenshots, video, logs, traces, network data, performance samples, crash details, and React profiles.
Repeat workflows by saving working steps as
.adscripts for local use or CI. Export strict Maestro YAML when needed.
See Commands for the commands and evidence each target supports.
Next steps
Set up your agent: run the CLI from Cursor, Codex, Claude Code, Windsurf, or another agent terminal. See AI Agent Setup for skills, rules, MCP tools, and setup for each client.
Try the sample app: clone the repo and run the bundled Expo test app. Quick Start covers a guided run with screenshots, replay, and performance data.
Build repeatable tests: use Replay & E2E to repeat tests. Use Debugging & Profiling to find bugs.
Articles and videos
Articles
Videos
Where to run agent-device
Path | Best for | Start with |
Local | Trying commands and debugging apps on simulators, emulators, physical devices, macOS, and Linux. | Follow the Quick Start. |
CI/CD | Automated pull request and merge validation with replay scripts and captured artifacts. | Try the EAS workflow template. GitHub Actions template coming soon. |
Cloud / remote | Linux runners, managed devices, and remote jobs. | Use Agent Device Cloud, set a remote profile with Commands, or contact Callstack for team QA. |
How it works
agent-device keeps device state in sessions. It sends commands to XCTest on iOS and tvOS, ADB and the snapshot helper on Android, Vega CLI/VDA on the Vega Virtual Device, a local helper on macOS, and AT-SPI on Linux.
Node.js apps can use the typed client or public subpaths. agent-device/android-adb provides the Android ADB provider interface, helpers for logcat, the clipboard, the keyboard, and apps, and port reverse management.
FAQ
What is agent-device?
agent-device is a command-line tool that lets coding agents inspect, control, and verify apps and save evidence for review. It supports iOS, Android, TV, web, macOS, and Linux.
Does it work with React Native, Expo, Flutter, and native apps?
Yes. agent-device supports native iOS and Android apps, plus React Native, Expo, and Flutter apps on supported targets. The commands and evidence vary by target.
How is it different from Appium, Detox, or Maestro?
With agent-device, an agent reads app state and chooses each command at run time. Teams use Appium, Detox, and Maestro to write and maintain test suites. agent-device can complement them by saving its runs as .ad scripts or exporting them as strict Maestro YAML.
Can agent-device run in CI?
Yes. Record a run as an .ad script, replay it locally or in CI, and save screenshots, logs, and other artifacts for review. See Replay & E2E or start with the EAS workflow template.
Who uses agent-device?
Teams and developers at Callstack, JPMorgan Chase, Expensify, Shopify, Kindred, Total Wine & More, LegendList, HerLyfe, App & Flow, and others use agent-device.
Documentation
Contributing
See CONTRIBUTING.md.
Made at Callstack
agent-device is open source under the MIT license. Visit agent-device.dev or contact Callstack.
Maintenance
Related MCP Servers
- Alicense-qualityAmaintenanceActs as a unified dispatch hub for local coding agent CLIs, supporting capability-based routing, schema validation, and retries via MCP tools.Last updatedMIT
- AlicenseBqualityBmaintenanceA tiny Hermes-friendly bridge that exposes oh-my-pi's CLI as MCP tools (prompt and doctor) for code generation and environment verification.Last updated21MIT
- Flicense-qualityBmaintenancePublic MCP front door for Spala agent discovery, providing onboarding, documentation search, and template/addon listings for planning backend workflows.Last updated
- Alicense-qualityBmaintenanceDiscovers and manages portable agent capabilities (skills and MCP servers) from configurable collections, providing search, inspection, and local installation via CLI and MCP tools.Last updated1MIT
Related MCP Connectors
Discover, search, invoke, and rate A2A (Agent-to-Agent) protocol agents.
Discover Wiplash and manage owned agents with human OAuth.
Operate smplkit from your agent: feature flags, config, logging, audit, and scheduled jobs.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/callstack/agent-device'
If you have feedback or need assistance with the MCP directory API, please join our Discord server