# Reflex: an architecture for building mobile apps with agents

DevFeed: [Reflex: an architecture for building mobile apps with agents](<https://devfeed.tech/articles/reflex-an-architecture-for-building-mobile-apps-with-agents-119294.md>)

Original publisher: [Read original article](<https://shopify.engineering/reflex>)

Author: Thiago Magalhaes

Published: 2026-11-05T15:41:40Z

Content type: article

Language: en

Sources: [Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering.md>), [Shopify Engineering - Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering-shopify-engineering.md>)

Topics: [Mobile](<https://devfeed.tech/topics/mobile.md>), [mobile devops](<https://devfeed.tech/topics/mobile-devops.md>), [Android](<https://devfeed.tech/topics/android.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Swift](<https://devfeed.tech/topics/swift.md>), [SwiftUI](<https://devfeed.tech/topics/swiftui.md>)

Tags: [abstraction](<https://devfeed.tech/tags/abstraction.md>), [access-control](<https://devfeed.tech/tags/access-control.md>), [accessibility](<https://devfeed.tech/tags/accessibility.md>), [actions](<https://devfeed.tech/tags/actions.md>), [agent](<https://devfeed.tech/tags/agent.md>), [agentic](<https://devfeed.tech/tags/agentic.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [android](<https://devfeed.tech/tags/android.md>), [app](<https://devfeed.tech/tags/app.md>), [apps](<https://devfeed.tech/tags/apps.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [behavior](<https://devfeed.tech/tags/behavior.md>), [emulator](<https://devfeed.tech/tags/emulator.md>), [ios](<https://devfeed.tech/tags/ios.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-app](<https://devfeed.tech/tags/mobile-app.md>), [reflex](<https://devfeed.tech/tags/reflex.md>), [sync](<https://devfeed.tech/tags/sync.md>), [test](<https://devfeed.tech/tags/test.md>)

## AI overview

Reflex lets Shopify test and drive native iOS and Android app behavior without rendering UI: platform logic runs in a UI-free core, and each screen exposes JSON state and actions through a consistent ViewModel contract. A CLI uses that contract for exploration and behavior tests; one test suite runs against both implementations, enforcing parity while keeping platform code separate. Tests use real app logic and fixtures at external boundaries, with network access blocked to keep runs deterministic. Shopify reports 1,700+ behavior tests finishing in about four minutes on CI, and an example test running in a few hundred milliseconds on both platforms versus about two seconds on an iOS simulator. These tests cover behavior rather than pixels, so the described workflow also uses visual review, screenshot tests for selected components, and live integration journeys. The article presents the architecture and implementation steps, not a transferable library.

## Source excerpt

Our architecture lets agents test mobile app behavior without an emulator and use one test suite to keep iOS and Android in sync.