Shopify launches Reflex architecture, letting Agents verify native App behavior without simulators
Shopify Engineering has released Reflex, a mobile application architecture for AI coding that separates business logic from the UI, letting Agents read JSON state, execute actions, and verify results via the command line without starting a device or simulator. iOS and Android still use Swift and Kotlin respectively to write native code, but they share the same set of behavior tests, and changes can only be merged if both platforms pass. Shopify says that more than 1,700 behavior tests run in about 4 minutes across both platforms in the continuous integration environment, take only a few hundred milliseconds to run without a device, while the same test takes about 2 seconds on the iOS simulator. Reflex does not verify pixels, nor can it prove that a button is correctly connected to the corresponding action, and it is currently not an open-source library that can be installed directly; teams need to implement the architecture and adaptation layer themselves.
Why read this
AI score 54
The original article provides the architecture layers, command-line verification methods, and dual-platform test durations, offering a look at one engineering solution for the verification step in AI coding.
Topics
View original postWe rebuilt our mobile apps in Swift and Kotlin with agents. To keep pace and hold our quality bar, we built Reflex: an agentic-first architecture that lets agents build and verify app behavior across iOS and Android without needing devices or simulators. Here's how it works, piece by piece: https://t.co/Eaxae98QXS
View original
We rebuilt our mobile apps in Swift and Kotlin with agents. To keep pace and hold our quality bar, we built Reflex: an agentic-first architecture that lets agents build and verify app behavior across iOS and Android without needing devices or simulators. Here's how it works, piece by piece: https://t.co/Eaxae98QXS
Body · AI translation
Shopify Reflex: Letting AI Verify Native App Behavior Without a Simulator
From the Shopify Engineering blog, Reflex is Shopify's mobile app architecture designed for AI programming: it separates business logic from the interface, letting Agents directly read state, execute actions, and verify results via the command line. iOS and Android still each write native code, but share behavior tests.
# The bottleneck shifts from writing code to verification
An Agent can write a page in minutes, but verification still requires launching a simulator, building the app, and simulating taps. Even after improving its simulator tooling, Shopify hit a speed ceiling.
Reflex's approach is not to keep speeding up taps, but to have the app itself provide a way to run and inspect without launching the interface.
# Core mechanism: directly operating the state behind the interface
The app's core layer does not depend on the interface or the device, and can run directly on macOS or the JVM. Each page's ViewModel (the component that manages page state and actions) exposes a unified interface: current state, executable actions, and child components.
The Agent sends actions via the command line, then reads the JSON state to verify business logic, input validation, navigation, and error handling. It runs real business code, not a separate mock implementation; external dependencies such as the network are replaced with preset data, and behavior tests also forcibly block real HTTP requests.
The key principle is "share tests, not code": Swift and Kotlin each implement their own version, and the same behavior tests run on both sides, with both passing required before merging. This preserves native implementations while using tests to constrain both sides to consistent behavior.
# Results and boundaries
Shopify reports that over 1,700 behavior tests run on both sides in about 4 minutes in the continuous integration environment. In the article's example, after warm-up, running without a device takes only a few hundred milliseconds, while the same test takes about 2 seconds on an iOS simulator.
However, it does not verify pixels, nor can it prove that interface buttons are correctly wired to their corresponding actions. Visual checks still rely on design system comparison, a small number of screenshot tests, and actual use. Reflex is also not currently an installable open-source library; teams need to implement this architecture and adaptation layer themselves.
AI Trends