跳到正文
InfoQ· Sergio De Simone·· 5 天前AI 評分53

Shopify 如何以 Remote Dev 編排 AI 智能體開發手機應用程式,避免開發者電腦資源超載

How Shopify Orchestrates AI-Powered Mobile App Development without Overloading Developers' Machines

AI 導讀

Shopify 建立 Remote Dev 遠端手機開發環境,讓 AI 智能體可在各自環境中並行建置、測試及維護 iOS 和 Android 應用程式。平台以 SSH 連接運行 Shopify 開發環境和 iOS 模擬器的遠端 Mac,Android 模擬器則設於 Linux VM;智能體可操作模擬器、修正問題並提交 PR。

正文

To prevent AI development workflows from exhausting developer machines' resources, Shopify built Remote Dev, a remote mobile development environment that enables AI agents to independently build, test and maintain iOS and Android applications and in parallel.

In fact, according to Shopify engineers, running agentic workflows in parallel quickly hogs all resources available on development machines. They explain that "three or four workflows were enough to max out a laptop", on top of the resources already consumed by compilers, simulators, and emulators. Moreover, "if someone accidentally closed a laptop lid, the work stopped".

Shopify had previously built River to address the same challenge in web and backend development, but, being River a Linux-based solution, it could not be used for building iOS apps. To overcome this limitation, Shopify built Remote Dev:

With Remote Dev, we're no longer limited by how many builds and simulators our laptops can handle. Each River session gets its own environment, so we can have one agent debugging something on Android, another working on an iOS feature, and another testing a PR, all in parallel.

Remote Dev uses a fleet of remote Macs running Shopify's development environment and iOS simulators, accessible via SSH. Android emulators run on separate Linux VMs. This architecture allows developers to build and test both iOS and Android builds through the same SSH session.

Agents can work on multiple tasks in parallel, each with its own environment for maximum independence. They can also be accessed through a Slack channel backed by River. Thanks to this setup, Remote Dev can

implement changes, build the app, run tests, interact with the simulators, collect screenshots, and create a PR. If something fails, it can inspect the logs, fix the issue, and try again, all while we focus on other tasks.

The platform supports automated workflows, including overnight runs that identify bugs, implement fixes, and submit PRs. Agents can also verify that a build is functional by navigating through the app, interacting with its UI, reproducing bugs, recording current behavior, implementing fixes, and running the same interaction to verify the fix.

Shopify says that, after promoting internal adoption through demonstrations and storytelling, River's share of merged PRs increased from 6% to 61%.

Commenting on Shopify's article, LinkedIn user Raiyan Jugbhery, in charge of software infrastructure and founder at SpendMe, argued that the key advantage of Remove Dev is its Xcode and iOS Simulator integration, noting that "a PR you still have to pull and verify on a Mac isn't really autonomous". However, he pointed out that the article does not explain "how they keep builds from queuing when several agents ask for a Mac at once", which he identified as a key concern.

Junaid Raza, solutions architect at Hoboetech, raised another concern. Allowing agents to run the simulator could lead to unreliable test results, as "give [the agent] a red test and enough retries and it'll sometimes rewrite the test until it passes". To prevent this, he suggests prohibiting runner agents from modifying the tests they execute.

Shopify says it plans to expand the platform with continuous application health monitoring, automated crash detection and fixes, and PR generation for identified issues, among other capabilities.

About the Author

Sergio De Simone

Show moreShow less

來源:InfoQ · infoq.com