ランキングに戻る

callstack/agent-device

TypeScriptagent-device.dev

CLI to control iOS and Android devices for AI agents

agentic-aiagentsautomationmobiletestingadbandroid-emulatore2e-testingexpoios-simulatormcpreact-native
スター成長
スター
3.5k
フォーク
194
週間成長
Issue
29
2k2.5k3k3.5k
26年2月26年3月26年5月26年7月
成果物npmnpm install agent-device
README
agent-device: device automation CLI for AI agents

agent-device

npm version CI License: MIT Glama MCP server

Let your coding agent verify its changes in the running app.

agent-device lets coding agents inspect, control, and verify apps on iOS, Android, TV, web, macOS, and Linux. Agents can read token-efficient accessibility snapshots, find elements by ref or selector, run device actions, and save evidence for review.

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 --version
agent-device help workflow

Run 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 close

Use 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.

agent-device demo showing Codex using agent-device to create a new contact in the iOS Contacts app from a simple prompt

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 .ad scripts for local use or CI. Export strict Maestro YAML when needed.

See Commands for the commands and evidence each target supports.

Diagram of the agentic development loop: humans assign tasks, agents write and review code, agent-device verifies mobile apps, pull requests receive evidence, and bugs or performance issues lead to fixes

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, 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.

関連リポジトリ
Significant-Gravitas/AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

PythonPyPIOtheraiopenai
agpt.co
185.6k46.1k
langgenius/dify

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

TypeScriptnpmOtheraigpt
dify.ai
149.5k23.6k
infiniflow/ragflow

RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs

GoGo ModulesApache License 2.0aiai-agents
ragflow.io
85.5k10k
microsoft/ai-agents-for-beginners

18 Lessons to Get Started Building AI Agents

Jupyter NotebookMIT Licenseagentic-aiagentic-framework
aka.ms/ai-agents-beginners
70k23.2k
ruvnet/ruflo

🌊 The leading agent meta-harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

TypeScriptnpmMIT Licenseclaude-codeswarm
cognitum.one
65.3k7.8k
Mintplex-Labs/anything-llm

Stop renting your intelligence. Own it with AnythingLLM. Everything you need for a powerful local-first agent experience

JavaScriptnpmMIT Licenseraglocalai
anythingllm.com
63.6k7k
shanraisshan/claude-code-best-practice

from vibe coding to agentic engineering - practice makes claude perfect

HTMLMIT Licenseclaude-aiclaude-code
linkedin.com/in/shanraisshan
63.2k6.3k
FlowiseAI/Flowise

Build AI Agents, Visually

TypeScriptnpmOtherartificial-intelligencechatgpt
flowiseai.com
54.8k24.7k
siyuan-note/siyuan

A privacy-first, self-hosted, fully open source personal knowledge management software, written in typescript and golang.

TypeScriptnpmGNU Affero General Public License v3.0note-takinglocal-first
b3log.org/siyuan
45.3k2.9k
calesthio/OpenMontage

World's first open-source, agentic video production system. 12 pipelines, 52 tools, 500+ agent skills. Turn your AI coding assistant into a full video production studio.

PythonPyPIGNU Affero General Public License v3.0agentagentic-ai
openmontage.video
40.6k4.8k
wshobson/agents

Multi-harness agentic plugin marketplace for Claude Code, Codex CLI, Cursor, OpenCode, GitHub Copilot, and Gemini CLI

PythonPyPIMIT Licenseagentsanthropic
sethhobson.com
38.1k4.1k
CopilotKit/CopilotKit

The Frontend Stack for Agents & Generative UI. React, Angular, Mobile, Slack, and more. Makers of the AG-UI Protocol

TypeScriptnpmMIT Licenseaillm
docs.copilotkit.ai
36.2k4.5k