Field noteNov 6, 20265 min read1 source

Reflex: an architecture for building mobile apps with agents

In one minute

Shopify describes Reflex, an architecture for building and testing native mobile apps with agents. It moves app logic into a headless core and exposes each screen’s state and actions through a JSON contract, allowing one behavioral test suite to exercise separate iOS and Android implementations without rendering their interfaces.

What changed: Shopify introduces Reflex, an architecture for agent testing of mobile behavior without an emulator and sharing one test suite across iOS and Android.

What happened

In a November 5, 2026 engineering post, Shopify explains Reflex as an MVVM-based architecture developed while rebuilding its mobile apps natively. The company says its bottleneck was the feedback loop: an agent could write a screen quickly, but checking it required a build, an emulator or simulator, scripted interaction, and time. Reflex is intended to let agents inspect and drive app behavior without depending on rendered UI.

The design has four pillars. First, a core module holds everything except views and device-dependent code, so logic can run headlessly on macOS or the JVM. Second, each screen’s ViewModel follows a strict action-in, state-out shape. Third, ViewModels expose an introspection contract describing a name, JSON state, and accepted actions. Fourth, a platform-agnostic CLI lets an external process inspect the app and invoke those actions. The CLI can run against a headless core process or a real build, but interacts with ViewModels rather than pixels.

Shopify’s principle is “share the test, not the code.” The iOS app uses Swift and the Android app uses Kotlin, with no shared cross-platform implementation layer. Instead, the same behavior test runs against both; Shopify says a pull request cannot merge if it passes on only one platform. The tests operate at a grey-box boundary: they see the state and actions exposed to the UI, while using real reducers, services, navigation, and a GraphQL client. Fixtures replace dependencies that would otherwise require network or device access. Shopify says the suite contains more than 1,700 behavior tests and completes in about four minutes on CI across both platforms.

The module split is explicit. Core contains ViewModels, services, navigation state, GraphQL, persistence logic, and deep links; Mobile contains views and platform integrations. Core declares platform needs as protocols and receives implementations through constructors. A CLI depends on Core as a host does, but uses fixtures for platform services. Shopify says Reflex itself has no third-party dependencies: it consists of a base ViewModel class, an introspection protocol, and the discipline of keeping Core free of platform imports. The post explains how to build a similar architecture; it does not announce a packaged product or release.

What the archive adds

Shopify’s mobile development environment for AI agents covered a related earlier development: an environment for agents to build and test mobile apps in parallel. Reflex is a new architectural detail on that known thread, focused on headless behavioral testing and keeping two native implementations in sync.

Trend signal

This supports the assumption that AI-native organizations move toward review and orchestration. Reflex places a shared, executable behavior suite at the center of accepting agent-written changes across two platforms. It is one company’s reported implementation, rather than evidence that this operating model will work equally well elsewhere.

Why now

Shopify says it had moved back to native Swift and Kotlin apps and found that simulator tooling had reached a ceiling for the feedback speed it wanted. Reflex emerged from asking how to build mobile apps when agents write most of the code. The timing is tied to that rebuilding effort, not to a general product launch.

Connections to other events

Shopify says Reflex is the architecture behind a CLI mentioned in its earlier Helix work, where agents rebuild screens through small checkpoints and strict gates. The archive’s October 2026 note on Shopify’s Remote Dev environment concerns the adjacent problem of giving agents a place to build and test mobile apps. Reflex addresses another layer: expressing app behavior so it can be exercised without a simulator.

Why it matters

Agent-generated mobile code is only useful if a team can establish that it behaves correctly on both platforms. Reflex makes that verification boundary explicit: rather than asking an agent or reviewer to infer behavior from screenshots, a test can inspect screen state and invoke the same actions exposed to the UI. Headless execution also removes rendering and device setup from a large class of tests, which Shopify says helps its suite run quickly.

The more consequential trade-off is organizational. Shopify accepts duplicated native implementations and makes tests, rather than shared code, responsible for behavioral parity. That can preserve platform-specific choices, but it makes the quality and coverage of the shared suite central. Teams should read the reported test count and runtime as Shopify’s result, not as a guaranteed outcome. Still, the architecture offers a concrete design question for teams using coding agents: can the app’s meaningful actions be made observable and testable without launching its full interface?

Limits and uncertainty

The source is Shopify’s account of its own architecture and results. It does not provide an independent evaluation, a quantified comparison with its prior test runtime, or evidence that the approach improves shipped-app quality. Reflex is not announced as open source, a standalone CLI, or a generally available tool. The sample inventory app is illustrative, and the supplied material does not establish how the architecture performs across other application types, team sizes, or production constraints. Shopify’s stated 1,700-plus tests and roughly four-minute CI runtime are company-reported figures.

Skill to build now

Pick one screen with meaningful state transitions and write down its state plus the actions a user can take. Then build a small test harness that invokes those actions without rendering the screen, supplying network- or device-dependent inputs as fixtures. This does not reproduce Reflex, but it tests whether the app’s behavior can be made observable at a stable boundary before investing in agent-driven UI automation.

Reader takeaway

Reflex is not a drop-in tool; it is a way to structure native mobile apps so agents can inspect and test behavior quickly. Its central bet is that teams can share behavioral tests across separately written Swift and Kotlin implementations, making the test suite the mechanism that keeps the platforms aligned.

Evidence / sources

  1. 1shopify.engineering/reflex
All Field Notes

Next reads

Read next

Open the graph
  1. 01topicEngineering ManagementExplore the engineering-management topic hub.
  2. 02archiveField NotesOpen the latest editorial analysis.
  3. 03sourcesSourcesSee the original sources this archive cites.
Who read this page?Machine requests, hidden until opened

Loading the privacy-safe route aggregate...

Open the JSON contract