Loading…

Shopify
Global commerce platform powering millions of businesses with essential infrastructure and innovative engineering solutions.
- 379 posts summarised
- latest
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
From their blog
Latest articles
Building secure mobile apps in the agentic era (2026) - Shopify
Shopify’s mobile app team now ships 11x more code per week than a year ago, averaging 434,000 lines changed per week during a 12-week rewrite. To maintain security at this pace, they built a system that maintains a map of each app’s attack surface, organized into surfaces such as deep links, WebViews, and stored data. Each surface has a skill derived from OWASP MASVS/MASTG and lessons from past incidents, which is used to inventory and review one item at a time. A daily pipeline compares the latest inventory with the last accepted map, reviews each changed item with read-only code access, and publishes a new map and changes page. Agents also monitor security news for industry-wide vulnerabilities and check them against the map and code, posting briefings only when the app is affected.
Cyber Chaos Monkey: Staying ahead of security threats with AI agents (2026) - Shopify
Shopify built the Cyber Chaos Monkey (CCM), an agentic vulnerability hunter that runs live against production infrastructure to find security issues before attackers do. The system uses frontier cyber models to refine ideas, identify leads in code or configuration, and attempt exploits in a sandboxed environment. CCM separates into Discovery, which generates and refines hypotheses, and Sandbox, where agents test exploits by making live requests and reading production logs. To keep testing safe, the system enforces two-person integrity: a judge agent monitors the executor in real time and can kill it if behavior violates the Rules of Engagement. Since deployment, CCM has executed tens of thousands of offensive engagements and identified dozens of impactful findings without causing an outage or incident.
Shopify’s generative discovery model (2026) - Shopify
Shopify built a shared generative discovery model trained jointly on search and recommendation data to personalize product discovery across its commerce ecosystem. Products are represented by semantic IDs: three-token codes produced by an RQ-KMeans tokenizer that clusters product embeddings, allowing related products to share representations. The model starts from an open-weight pretrained language model and is adapted through continued pretraining, multi-task fine-tuning, and multi-teacher distillation. In production, the model improved the Shop home feed by 7.95% in orders and 9.85% in conversion rate, and boosted search OneDCG@10 by 2.1 points overall and 2.7 points for signed-in users. Multi-token prediction generates all three codewords in a single pass, reducing p95 latency compared to autoregressive generation while allowing a larger candidate set.
How we rebuilt the Shopify app in 12 weeks (2026) - Shopify
Shopify rebuilt its mobile app from React Native to native Swift and Kotlin in 12 weeks with 30 engineers organized in pods of two, each owning a product area across both platforms. Agents wrote most of the code, but humans owned architecture, product behavior, and final judgment. The team spent weeks upfront preparing the system around agents: the Reflex architecture, a CLI that can load any screen in milliseconds without a device, and guardrails enforced by CI, lint rules, and architecture.md files. Consistency between iOS and Android was prioritized over platform-specific idioms so that agent output remains reviewable and CI can detect drift. Launch time dropped by about 50% on Android and 14% on iOS, Android memory usage halved, and iOS peak memory dropped by more than 70%.
Reflex: an architecture for building mobile apps with agents (2026) - Shopify
Shopify’s Reflex architecture enables mobile app development where agents write most of the code. It separates core logic from UI into a headless module that runs on macOS or JVM without a simulator, using four pillars: a core module with no UI imports, a strict ViewModel contract, ViewModel introspection via JSON, and a platform-agnostic CLI. Agents explore and test the app via commands like ls and do without rendering any UI, achieving feedback loops where a test case runs in a couple hundred milliseconds without a device. The same test file runs against both iOS and Android, enforcing parity without shared code; 1,700+ behavior tests finish in about four minutes on CI. Reflex uses grey box testing where tests see ViewModel state and actions but not internals or pixels, with fixtures swapped at network and device boundaries.
We gave AI agents a mobile dev environment (2026) - Shopify
Shopify’s AI agent River could handle web and backend tasks but was limited for mobile development because laptops maxed out with compilers and simulators. To solve this, Shopify built Remote Dev, a fleet of remote Macs that each provide a dedicated environment for River sessions. Agents connect over SSH, and Android emulation required a separate Linux VM with nested virtualization since macOS lacks support. A warm pool of prebuilt Macs reduces setup time from over 30 minutes to a few minutes, and agents can work in parallel on different tasks. River can now autonomously implement changes, build, test, interact with simulators, and create PRs, and it can generate explainer videos from recordings, with adoption growing from 6% to 61% of merged mobile pull requests.
How Shopify turns open models into task experts (2026) - Shopify
Shopify’s Sidekick AI commerce assistant uses a frontier model for merchant interaction and hands off specialized tasks to post-trained open models. For the GraphQL subagent, they post-trained NVIDIA Nemotron 3.5 Lightning, which scored higher than the frontier model on their judge, responded 7x faster, and cost 90% less to serve. The Model Optimization Flywheel defines quality with an LLM judge tuned via GEPA and ACE optimizers, improves the frontier agent through an autoresearch loop, selects an open model like Nemotron, and optimizes inference using NVIDIA AIPerf and TensorRT-LLM. Self-healing turns failed production conversations into training examples; over 86 nightly runs it repaired 69% of failures, and human annotators correct the rest. After six flywheel loops and 61,000 healed examples, the post-trained model’s judge score rose from 37.7 to 74.5, surpassing the frontier model’s 73, while serving cost dropped 90% and median response time fell from 6.50s to 0.87s.
Cross-store product clustering across millions of stores (2026) - Shopify
Shopify’s cross-store product clustering system groups listings of the same product across different merchants into a single global Universal Product Identifier. The approach avoids comparing every pair by generating candidate pairs using approximate nearest-neighbor search across billions of vector embeddings. Scoring uses three models of increasing cost: L1 is a fast GBDT classifier, L2 is a fine-tuned multilingual cross-encoder that reads both listings together, and L3 adds images. The UPI builder evaluates proposed merges using a trained model that weighs evidence, handling non-transitive pairwise judgments. The system caches scores and uses priority queues for expensive inference, enabling daily cluster updates while background GPU inference continues refining matches.
Building Overexposed: understanding application exposure (2026) - Shopify
Shopify built Overexposed, a scanner that checks which applications have internet-facing endpoints and whether they allow anonymous access. It scans Kubernetes Ingresses on GKE and Cloud Run services by querying GCP’s Cloud Asset Inventory for deployed resources, then sending anonymous HTTP probes—HEAD requests first, up to three redirects, checking for authentication challenges. The scanner classifies each endpoint into six verdicts—exposed, expected, protected, not found, unreachable, or inconclusive—based on the probe response and an allowlist of approved public endpoints. Overexposed reduced inconclusive Ingress results by about 80% within weeks by refining classification rules and testing changes against historical scan data. The project revealed that reading configuration files is insufficient because they show intent, not enforcement; the true inventory must come from what the cloud actually runs, and each verdict includes a reason for investigation.
ShopGym: Realistic, reproducible sandboxes for shopping agents (2026) - Shopify
ShopGym converts live storefronts into self-contained, resettable sandbox shops for training and evaluating shopping agents, addressing challenges from changing products and bot detection. Its ShopArena layer separates exploration from generation using anonymized specifications and coding agents with execution-verification loops that repair failures without regenerating the whole shop. ShopGuru then synthesizes benchmark tasks across seven skill categories using rule-based and LLM generators grounded in each shop’s catalog, navigation, and policies. Validation over 224 tasks across six shops, three synthetic and three real, showed synthetic shops retain key structural properties and agent performance positively correlates with live storefronts when tested with BrowserGym and an internal system. The framework aims to provide reproducible environments for agents to fail and learn before interacting with live stores, with plans to expand to more retail domains and task types.
Helix: The internal tool powering our Shopify app's native migration (2026) - Shopify
Shopify’s internal tool Helix powers the native migration of its Shopify app, which has over 300 screens. The company previously rebuilt the Shop app in just 12 weeks using similar methods. Helix is a set of tools and skills that help LLMs migrate features and screens from the React Native app while following a highly opinionated architecture. Unlike most tools that gather information, create specs, and implement everything at once, Helix aims for consistent, high-quality, and maintainable results. The approach is now being applied to the larger Shopify App after its success with Shop.
Native is now the future of mobile at Shopify
Shopify is moving its mobile apps from React Native to Swift and Kotlin after reevaluating the assumptions behind its 2020 decision as coding models improved. React Native had reduced duplicated implementation and feature-parity work, but agents now handle much of the cross-platform implementation, translation, testing, and review work. Shopify is choosing greenfield rebuilds, with Helix breaking migrations into reviewed checkpoints that require tests, visual comparison, adversarial code review, and human approval. The Shop app reached the app stores as a fully native rebuild in 12 weeks, while the Shopify app migration is underway. The company will continue selected React Native library support while migrating all its apps, and will judge success by product velocity, app quality, and autonomous agent work.
Migrating Shop app from React Native to native
Shop migrated its React Native app to native iOS and Android implementations in SwiftUI and Jetpack Compose after coding-agent advances changed the economics of a shared mobile codebase. A one-week proof of concept showed that one engineer using agents could recreate screens, interactions, and flows closely enough to make a full migration feasible although the result was not production-ready. Six engineers then built the native foundations and main journeys with feature teams validating edge cases; they preserved sign-in state, push notifications, analytics events, and behavior while simplifying some screens. Compared with React Native, native startup was 23% faster on iOS and 50% on Android, stability rose from 99.5%+ to 99.95%+, Android size dropped 109 MB, release builds fell about 75%, and scrolling reached 120 FPS. The migration’s workflow combined specialized agents, plan approval, Tardis live-app feedback, screenshot and event comparisons, and human review while feature parity remained a release requirement.
How River takes security work from a fix to merge
Shopify’s River is an AI agent in Slack that manages dependency and first-party application vulnerability remediation beyond the patch. It validates ledger entries against repository, pull-request, and vulnerability-tracker state, checks whether findings remain active, and updates code on the repository head when it can do so safely. River regenerates lockfiles with repository tooling, repairs upgrade failures, discards stale CI results after rebases, and avoids overwriting human work. When product or risk judgment is required, it preserves evidence and hands owners a question, then verifies the repository head, dependency graph, tracker, and ledger after merge. In its 11 days, the dependency backlog fell about 70%, while security merges through the freshness-gated queue rose from about 10% to 80%.
Gisting: Compressing LLM Agent context to ↑ throughput and ↓ cost
Long system prompts improve agent behavior but increase inference time, cost, and the GPU capacity needed to serve a given traffic level. Shopify compresses the Sidekick GraphQL agent’s roughly 6,000-token system prompt into about 1,500 gist tokens, using special vocabulary tokens whose embeddings are learned by knowledge distillation while the model weights remain frozen. Training compares teacher logits from the full prompt with student logits from the gist-token prompt using KL divergence; at inference, the prompt is replaced with the gist-token string, requiring no custom serving path. In load tests at 350 requests per minute, compression reduced median time to first token from 438ms to 354ms and end-to-end latency from 6.8s to 4.2s, while raising throughput from 20.2 to 23.4 QPS and enabling 14% fewer GPUs in production without losing prediction quality.
How we raised mobile end-to-end test stability to 98%
Shopify’s largest mobile app had become blocked by flaky end-to-end tests, which failed when screens took longer to render and had been removed from pull-request checks. Since 2023, tests used Appium through WebdriverIO and React Native Test IDs, allowing timing shortcuts and assertions about component-tree presence rather than what merchants could see or use. The rebuild hides Appium behind a strict builder-style wrapper that requires an assertion after every action; computer vision uses screenshots, PaddleOCR for text, and OpenCV for icons, with Test IDs as an opt-in fallback. After promotion into blocking CI, stability reached 98% of individual test successes over total runs, up from 50% with the old API, on two platforms. A pre-promotion flakiness gate rejects tests that exceed a failure threshold across repeated runs, while remaining failures largely involve network problems or simulator boot failures.
Sidekick's continual learning loop
Frontier models can accelerate an AI product launch, but their serving cost and latency can become impractical as usage grows, while their weights do not learn from production failures. Shopify’s proposed flywheel captures low-quality conversations, defines quality with a rubric and calibrated judges, improves the surrounding harness through autoresearch, and then converts repaired trajectories into supervised fine-tuning and GRPO training signal. A panel of frontier reasoning models critiques failures, an arbiter produces repair instructions, and unresolved cases go to expert annotators; gist compression then shortens the agent’s static prompt without measured judge-quality loss. In production, the GraphQL agent serves up to 2,000 requests per minute and reportedly achieves a 96% serving-cost reduction versus an estimated frontier-model cost, with lower latency and higher throughput. The approach is presented as a continual-learning system that turns production experience into model-weight updates.
Building an agentic harness that outlasts the model
Shopify’s Application Security team built an agentic harness that scans software for vulnerabilities, proves candidates with real tests, and opens Shopify-specific remediation pull requests. Its Dispatch orchestrator partitions repositories, runs category-specific Hunting agents in parallel, verifies findings sequentially with a different model, and persists architecture artifacts for later diff-based scans. Test oracles require realistic integration or functional coverage, including cross-tenant fixtures for IDOR checks, while unproven candidates are rejected or downgraded. Across more than 80 applications and thousands of scans, the workflow produced over 300 findings, including two rated Critical by Shopify’s severity calculator, with full scans costing $50–$300 and incremental scans $5–$50. The post concludes that durable value lies in the harness’s verification, partitioning, cross-model review, and deterministic infrastructure rather than in any single model.
Upgrading Checkout Blocks app to Polaris web components
Checkout Blocks upgraded all five UI extensions from React and Shopify’s legacy Remote UI bridge to remote-dom with Preact and Polaris web components, while moving from JavaScript to TypeScript and API version 2026-01. The migration addressed checkout’s performance sensitivity and Shopify’s requirement that deployments move off versions earlier than 2026-01. A parallel core-next library allowed extensions to transition incrementally, with shared providers, telemetry, hooks, helpers, and rules adapted before legacy core was removed. To meet the remote-dom CLI’s 64KB gzip limit, the team dropped react-reconciler, replaced liquidjs with a smaller parser validated against more than 42,000 lines of merchant configurations, replaced dayjs, and retained markdown-to-jsx through Preact compatibility. Transferred bundles fell 40% to 85%, while weighted ELT improved 8% at P50 and 7% at P90.
Inside Shopify Hack Days: Building a prototype for music-playing pages
During Shopify Hack Days 39, a 13-person team addressed why artists selling music on Shopify product pages lacked a built-in way to hear digital albums before buying. The team pursued two paths in parallel: a first-class Audio media type across Core, Admin API, admin-web, and storefront, and a standalone Shop Sounds app for release management. The app orchestrated product and variant creation, audio and artwork metafields, storefront access, and Online Store publication, while a theme extension provided track-level purchasing and a shared audio instance that continued across navigation. It also included six GLSL fragment shaders driven by bass, mid-range, treble, and overall energy, plus synced lyrics and a geolocated tour dates block. After three days, the team had a working prototype, but Shop Sounds was not a live product; the project demonstrated that native audio support and Shopify metaobjects and metafields could support a music toolkit without custom infrastructure.
Topics they write about
All topics →Weekly digest
The best engineering reads, once a week.