This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.

Argent and Expo

Edit page

Use Argent to let your AI agent control, debug, and profile your Expo project on Android Emulators, iOS Simulators, and physical devices.


Argent is an agentic toolkit from Software Mansion that gives your AI agent, such as Claude Code or Codex, direct access to your running app. With Argent, the agent can control, debug, and profile apps on mobile, TV, desktop, and web platforms. On Android and iOS, it works with emulators, simulators, and physical devices. You set it up once and connect it to your AI agent through the Model Context Protocol (MCP).

Prerequisites

3 requirements

1.

Node.js 22.18 or later

Argent's CLI requires Node.js 22.18 or later. The CLI does not support Node.js 23.0 to 23.7.

2.

An emulator, simulator, or physical device

For Android, install the Android SDK Platform Tools (adb), make sure adb is on your PATH, and have an emulator available or a physical device connected over adb. For iOS, use macOS with Xcode installed.

3.

Extra setup for a physical iPhone

To use a physical iPhone, sign in to Xcode with your Apple ID (a free account works). Turn on Developer Mode on the iPhone. Keep the iPhone unlocked and connected to your Mac in Xcode, over USB or the network. On first use, Argent takes a few minutes to build and install a test runner app on the iPhone. iOS then asks you to trust the developer of the test runner app in the Settings app. For the steps, see Physical iOS devices.

Quick start

1

Set up Argent

From your Expo project's root directory, run the init command. The wizard installs Argent globally, detects the AI agents you use, registers the Argent MCP server, and copies its skills into your workspace.

Terminal
- npx @swmansion/argent@latest init
- yarn dlx @swmansion/argent@latest init
- pnpm dlx @swmansion/argent@latest init
- bunx @swmansion/argent@latest init

By default, your agent starts the Argent MCP server from the globally installed argent command. If your shell cannot find argent after the wizard finishes, install Argent globally:

Terminal
- npm install -g @swmansion/argent
- yarn global add @swmansion/argent
- pnpm add -g @swmansion/argent
- bun add -g @swmansion/argent

Restart your agent so it picks up the new configuration.

2

Run your app

Your agent can boot an emulator or simulator, then launch, restart, and reinstall your app through Argent. Install the app first: build a development build or use Expo Go, and keep the development server running. You can also start the app yourself:

Terminal
# Run a development build on an emulator or simulator
- npx expo run:android
- npx expo run:ios

# Or pick a connected physical device
- npx expo run:android --device
- npx expo run:ios --device

# Or start the development server and test in Expo Go
- npx expo start

3

Prompt your agent

Start your agent in your project and describe what you want to do with the running app. For example, ask it to launch the app, tap a button, and read the logs.

4

Verify setup

In your agent panel, enter the following prompt to confirm Argent can reach the running app:

Example prompt
Take a screenshot of the running app and describe what's on screen.

If the agent returns a screenshot and describes your app's current screen, Argent is connected correctly.

What Argent lets your agent do

Once connected, your agent can work against the live app:

  • Control: launch the app, tap, swipe, type into fields, open deep links, and navigate through accessibility trees to run multi-step flows.
  • Debug: read console logs, explore the view hierarchy, inspect the React component tree, and examine network requests and their payloads at both the JavaScript and native layers.
  • Profile: record React and native profiles together, trace slow React commits to the native stack frames behind them, and surface UI hangs, render cascades, and memory leaks.

On a physical iPhone, only some of these tools are available. See Limitations and tips.

Example prompts

After setup, describe tasks in plain language. For example:

TaskExample prompt
Smoke-test a flowLaunch the app, tap through onboarding, and tell me where it breaks from the logs.
Verify the UITake a screenshot of the home screen and confirm the product list rendered.
Debug a network callOpen the cart screen and show me the failing request and its response payload.
Inspect React stateOpen the settings screen and show me the React component tree for the toggle row.
Profile a slowdownProfile scrolling the products list and point me to the slowest commit.
Test a deep linkOpen the app through its deep link and confirm the right screen loads.

Use Argent with the rest of the Expo AI tooling

Argent connects through MCP, so it works alongside Expo's own agent tooling. Pair it with Expo Skills and the Expo MCP Server so your agent knows Expo conventions while Argent drives the app.

Expo MCP Server

Connect the remote Expo MCP Server to give agents live access to Expo documentation and Expo Services.

Expo Skills

Install the plugin that teaches agents known-good Expo patterns.

Manage Argent

Terminal
# Refresh to the latest version and configuration
- argent update

# List feature flags and their state
- argent flags

# Unregister the MCP server and remove Argent
- argent remove

Limitations and tips

  • A physical iPhone supports a subset of Argent's tools. On iOS, JavaScript debugging, React and native profiling, and native view inspection work on a simulator only. Argent does not support physical iPads.
  • Beyond Android and iOS, Argent also drives Apple TV, Android TV, Fire TV, Expo web apps in Chromium, Mac apps, and HarmonyOS devices (experimental). For details, see Supported platforms.
  • Let Argent launch or relaunch the app on the device when it can. If you boot the device yourself, Argent may not be able to see system dialogs or native modals.
  • In Expo Go, Argent can control the app, read the React component tree, and run the React profiler. Native profiling needs a development build, because in Expo Go it profiles the Expo Go host app instead of your code.
  • The React component tree and the React profiler rely on the JavaScript debugging connection, so keep your development server running.
  • For configuration, troubleshooting, and the full tool reference, see the Argent documentation.