Agent Device: iOS & Android Automation for AI Agents

As AI coding agents become part of our daily engineering workflows, one gap remains clear: they can read and write code, but still struggle to reliably interact with mobile apps.

That’s why we built agent-device: a lightweight, token-efficient CLI for automating iOS and Android devices and simulators, with a command model designed for agents and developers.

Vercel’s agent-browser was a big inspiration for this project. If browser automation gave agents “eyes and hands” on the web while not burning tokens, agent-device brings that same idea to native mobile UI.

What is agent-device?

agent-device is a CLI + daemon stack for agent-driven mobile automation with practical primitives:

  • open / close for app lifecycle and session flow
  • snapshot for structured accessibility trees
  • click, fill, scroll, type, get for interactions
  • find for semantic targeting
  • replay for deterministic reruns from recorded .ad scripts

The workflow is straightforward: an agent explores the mobile app using accessibility tree snapshots, stores refs to interactive elements, and performs actions.

On top of that it can also do screenshots, record videos, and save “replay” scripts for later reuse.

Why it helps developers

As engineering teams increasingly use agents like Codex, Claude Code, and Gemini in day-to-day development, expectations are shifting from “assistive” to “autonomous.” Quickly. Teams want agents to handle more of the workflow end to end, including mobile UI tasks, so developers can move faster with less manual intervention.

agent-device is built for that direction: one command surface across iOS and Android, compact structured snapshots that fit LLM context limits, and session-aware behavior aligned with real app testing flows. It also bridges exploratory agent actions with deterministic replay, while screenshots and trace logs make flaky behavior easier to debug.

The outcomes are higher leverage from agents, less context switching for developers, and a clearer path to reliable mobile automation.

Why we’re building it

We can see that agent-native mobile tooling is still early, and the ecosystem around it hasn’t matured yet. What we’re still missing, among many other things are:

  1. Reliable mobile UI understanding for agents
  2. A practical bridge from exploratory actions to deterministic replay
  3. A unified agent experience across iOS and Android
  4. Debugging tools that are optimized for agents

agent-device is our way to close some of these gaps with a small, composable tool that works for both people and agents. After all, it’s a simple CLI. There's no AI inside.

Getting started

This is how you, or rather your agent, will typically interact with the app using agent-device:‍

agent-device open SampleApp --platform ios
agent-device snapshot -i                 # Get interactive elements and capture refs (@eN)
agent-device click @e2                   # Click by ref
agent-device snapshot -i                 # Update snapshot after interaction
agent-device fill @e3 "test@example.com" # Clear then type
agent-device snapshot -i
agent-device get text @e1                # Get text content
agent-device screenshot page.png         # Save screenshot
agent-device close

‍If you haven’t used agent-browser yet, this may be the first time you see snapshot-ref notation, and you’re perfectly fine to wonder: what are these @e2 and @e3, and where are they coming from?

Fortunately it gets quite obvious when you see the output of snapshot command:

> agent-device snapshot -i
@e1 [application] "Settings"
@e2 [window]
@e3 [other] "Settings"
@e4 [navigation-bar] "Settings"
@e5 [button] "Settings"
@e6 [other] "Hover Text, Off"
@e7 [other] "Vision"
@e8 [table] "Accessibility"

‍‍Now we see that e.g., @e5 in the above snapshot, taken from iOS Settings app, corresponds to the “Settings” button. An agent can discover these interactive (the -i flag) or non-interactive elements and “see” our UI, which has to be accessible for e.g. screen readers, as any app should be.

And if there’s any issue progressing with a task, such as “fill this 401k form for me”, due to missing accessible elements, an agent may choose to use screenshot command, understand what’s on the screen, pick coordinates, and use alternative syntax for interactions such as click or fill.

From there, you can record and replay flows (saved as .ad scripts) and use them as end-to-end tests that are deterministic and easy to maintain with replay --update command.

Use official Skills

How will an agent know all of that? This is where our built-in skills come in. Using a single command:

npx skills add callstackincubator/agent-device

‍…your agent can download the latest documentation and usage best practices for the agent-device project. Agents love this when exploring new tools like this one.

Without skills, they’re essentially blind to how to use them properly and will try some self-discovery through help command, sometimes web tool calls.

With skills loaded, any agent such as Claude Code or Codex gets proficient in wielding the tool from the first call. It saves time and tokens. We’ve seen this many times in our testing already, that’s why we ship them right away.

Try it yourself

If this workflow is relevant to you, give agent-device a try. Feel free to let us know what breaks, what’s missing, and what you want the project to support next.

And if you find it useful, star the repo to support the project and help more developers discover it: https://github.com/callstackincubator/agent-device

Insights

Learn more about Testing

How AI Agents Can Cut Manual QA by 30% — cover

Oct 30Article

How AI Agents Can Cut Manual QA by 30%

Explore an agentic QA workflow targeting 30% less manual effort across mobile, web, and TV, with test selection, failure triage, and validation.

Give QA Agents the Controls They Need With Appduct — cover

Oct 20Article

Give QA Agents the Controls They Need With Appduct

Use Appduct to give AI QA agents access to app functions for setting test conditions, triggering events, and checking results with UI automation.

cover

Oct 13Article

Agentic Mobile Testing With e2e and agent-device

See how e2e uses agent-device for AI-driven iOS and Android tests, combines exact assertions with agent actions, and replays cached steps without model calls.

Who Tests AI-Written Code? Inside TesterArmy With Szymon Rybczak — cover

Oct 12Podcast

Who Tests AI-Written Code? Inside TesterArmy With Szymon Rybczak

Szymon Rybczak explains how TesterArmy tests web and mobile apps with AI agents, creates test plans for pull requests, and fits into QA workflows.

cover

Aug 4Article

Automating Mobile QA With Cloud Agents

Code review and green CI checks do not prove a mobile app still works. Learn how cloud agents, agent-device, and runtime evidence can verify app behavior before merge.

cover

Jul 21Webinar

Behavior Review for AI-Native Delivery

AI can increase code output faster than teams can verify the real app. See why behavior review matters before merge.

cover

Jul 6Article

Introducing Sniffler: Run only the E2E tests your changes can affect

Sniffler maps changed files to affected E2E tests, so teams can avoid running the full suite on every pull request.

cover

Jun 17Talk

Automating Mobile QA with Cloud Agents

Michał Pierzchała will present Automating Mobile QA with Cloud Agents at Ship London on 17 June 2026.

cover

May 13Podcast

How AI Is Changing React Native Development and Testing

Zack Ebenfeld joins React Universe On Air to talk about how AI is changing React Native workflows, testing, QA, and day-to-day engineering work.

cover

Apr 14Article

Agent React DevTools: Give AI Agents Access to React Internals

Agent React DevTools gives AI agents access to the React component tree, state, and performance data, enabling deeper debugging and more reliable QA for React and React Native apps.

cover

Mar 19Live Stream

Agent Device, AI workflows, and mobile testing in practice

A discussion on Agent Device, AI-driven workflows, and testing mobile apps using simulators and accessibility data.

cover

Aug 23Podcast

Introducing E2E Tests to React Native Core

This episode of the React Native Show dives into the recent introduction of End-to-End (E2E) testing in RNTester. Join us as we unpack the thought process, technical considerations, and practical implementation of this new approach to testing in React Native.

cover

Mar 19Tutorial

The Hard Way vs. The React Native AI SDK Way: Stop Writing Custom Modules for Every Model

Learn how React Native AI uses a unified provider model to switch between cloud and on-device LLMs without rewriting application logic, enabling reliable AI experiences online and offline.

cover

Mar 12Tutorial

Build Smarter Apps: Tool Calling & AI Orchestration Explained

Learn how on-device models in React Native can call tools, interact with external APIs, and return structured outputs you can use directly in application logic.

cover

Mar 5Tutorial

MLC LLM + React Native: On-Device AI Without the Pain

Learn how to run third-party on-device LLMs in React Native using MLC LLM. Choose your models, run them efficiently across platforms, and keep a unified JavaScript API with React Native AI.

cover

Feb 24Tutorial

Intelligent Fallbacks with Apple Intelligence in React Native

Learn how to use Apple’s built-in Foundation Models in React Native apps, reduce memory usage, and enable fast, fully on-device AI with React Native AI Apple.

cover

Feb 10Tutorial

What Is the React Native AI SDK? A Complete Intro & Quickstart

Learn why on-device AI matters for React Native apps, how local LLMs behave offline, and what problems React Native AI is designed to solve from day one.

cover

Jan 29Tutorial

Implementing an Android TurboModule with Kotlin

Learn how to implement a React Native TurboModule on Android, from the TypeScript spec and Codegen to the Kotlin implementation and package registration.

cover

Jan 19Tutorial

Working with Different Threads in Swift TurboModules

Learn how JavaScript, native module, background, and main threads interact in React Native TurboModules, and how to use GCD queues to run async work safely in Swift.

cover

Jan 9Tutorial

How to Add Type-Safe Constants to Swift TurboModules

Learn how to expose typed, immutable constants from a Swift TurboModule using Codegen, and get full end-to-end type safety between native and JavaScript.

cover

Dec 30Tutorial

Adding Event Emitters to Your TurboModule in Swift

Learn how to emit native events from a Swift TurboModule and subscribe to them in JavaScript, including proper memory management and Codegen integration.

cover

Dec 22Tutorial

Writing Your First TurboModule in Swift

Learn how to build a fully working TurboModule in Swift, integrate it with Codegen, and bridge it through Objective‑C inside an Expo app.