This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Test pull requests with an AI agent
Edit page
Add an agentic workflow in which a coding agent tests each pull request on an Expo Simulators session and posts a verdict with evidence.
Expo Simulators is a limited-access preview. It is not included with paid or free plans and is currently available only to select partners. Join the waitlist if you are interested in trying it.
Agentic CI is an automated workflow in which a coding agent tests a pull request (PR) on a remote Android Emulator or iOS Simulator. The agent tests the change that the PR describes. Then it reports back on the PR with a verdict and evidence.
How Agentic CI works
When a person opens a PR to main, the Agentic CI workflow does these steps:
- It finds a build of the app with the same native code, or it creates one. Then it adds the JavaScript of the PR to the build.
- It starts an Expo Simulators session with the build.
- A coding agent reads the PR, tests the change in the app, and writes a verdict.
- The workflow posts the verdict on the PR. The comment links to the session recording, the screenshots, and a browser preview of the build.
Agentic CI does not replace your scripted tests. It tests the behavior that a PR describes, even when no script covers it. To learn how the parts work together, see Introduction to agentic workflows.
The following screenshot shows an Agentic CI comment with a PASS verdict:
Add Agentic CI with an AI agent
Paste this into Claude, Cursor, Codex, or another agent.
Add the Agentic CI workflow to my Expo project. Use https://docs.expo.dev/agentic-workflows/agentic-ci.md as the source for each step and each file. 1. Check each step on https://docs.expo.dev/agentic-workflows/setup.md, except the GitHub token step. Do each step that is not done. Use the version of .eas/agents/run-agent.sh for the agent that I name, and the version of .eas/agents/start-session.sh for the controller that I name: agent-device or Argent. 2. Create each file that the page shows, at the same path and with the same content. 3. When a step needs a token, an account, or a choice, stop and ask me. Do not print or save a token. 4. Run `eas workflow:validate` on each workflow file that you added. 5. Commit the files, but do not push them. Tell me which files you added.
Set up your project
Follow Set up a project for agentic workflows one time for your project. Agentic CI does not need the GitHub token step. See What the agent can do to learn which limits apply to the agent.
Add the Agentic CI workflow
1
Add the workflow
Use the file for the platform that you test.
Android support in Expo Simulators is still in development. Some features that work on iOS may not work on Android yet. See Limitations.
To test both platforms, add both files with different names, such as agentic-ci-android.yml and agentic-ci-ios.yml. Each workflow posts its own comment.
The workflow runs on PRs to main. If your base branch has a different name, change branches. The workflow does not run on draft PRs. It runs when a draft PR is ready for review.
The jobs do these tasks:
fingerprint,get_build,build, andrepackfind or create the build for the remote device.repackadds the JavaScript of the PR to a build that already exists.checkstarts a session with the build and runs the agent. Then it stops the session and uploads the report and the screenshots of the agent.commentposts the verdict on the PR with thegithub-commentjob.resultfails the run when the verdict is notPASS.
2
Add the prompt
The check job adds the title and the description of the PR, and agent-output/device.md, to the end of this prompt:
To give the agent facts about your app, such as how to pass the onboarding screens, add them to .eas/agents/app-facts.md. See Add the device controller.
Open a pull request
Open a PR to main with a change that a user can see in the app. Describe the change in the title and the description, because the agent tests what they say. EAS starts the workflow.
The first run takes longer, because the workflow creates a build. Later runs use this build again when the native code does not change.
Each run uses a build or a repack, an Expo Simulators session of up to 30 minutes, and model tokens of your agent. To use less, open a draft PR first, and mark it ready for review when you want a check.
Read the result
When the run finishes, the PR gets an Agentic CI comment:
The comment has these parts:
- Verdict:
PASSorFAIL, with one sentence from the agent. - Commit: the short hash of the commit that the agent tested.
- Session recording: the session page on expo.dev, with the screen recording of the session.
- Agent report and screenshots: the workflow run on expo.dev. The report and the screenshots are in its artifacts.
- Try this build in your browser: a link that starts a new session with the build and opens its browser preview. Each click starts a new session.
To open these links, sign in to an Expo account that can view the project.
When the verdict is not PASS, the result job fails, and the workflow run shows the failure. To test the PR again, push a new commit to its branch. Each run updates the same comment, so the comment shows only the result of the last run.
The verdict of the agent can be wrong. A
FAILcan come from what the prompt tells the agent, or does not tell it, and not from the app. A falseFAILalso fails the PR check. Before you make this check required, read the evidence of some runs. A person must read the evidence and decide, as with any other report. To fix a falseFAIL, add facts about your app to .eas/agents/app-facts.md. See Add the device controller.
Next steps
Issue to PR: a coding agent writes the change for a GitHub issue and opens a pull request, and Agentic CI tests it.
Start, use, and always stop sessions from GitHub Actions, EAS Workflows, or another CI system.
Collect evidence from a remote device and download the session artifacts.