Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Shopify Engineering 6 min read Deep dive mediumAdept

Building the Universal Commerce Protocol

Universal Commerce Protocol (UCP), co-developed by Shopify and Google, is an open standard for AI agents to discover merchant capabilities and complete transactions. It layers a core shopping service (checkout sessions, line items, totals) under independently versioned capabilities (Checkout, Orders, Catalog) and composable extensions namespaced by reverse-domain names, so anyone owning a domain can define extensions without a central registry. Merchants publish profiles at /.well-known/ucp, agents pass their own profile URL, and the merchant computes the intersection of supported capabilities and payment handlers, similar to HTTP content negotiation. A checkout state machine (incomplete, requires_escalation, ready_for_complete) plus a continue_url and the JSON-RPC-based Embedded Checkout Protocol handle handoff to a human buyer when the agent cannot finish.

Assumes: REST/JSON APIsHTTP content negotiationpayment checkout flows

Related posts

  • Introducing the commerce payments protocol

    Shopify Engineering mediumAdept

    The Commerce Payments Protocol, built by Coinbase and Shopify on Base, brings card-style authorize-and-capture flows onchain using an immutable escrow smart contract between payer and receiver. Operators submit transactions and pay gas on behalf of merchants but are constrained: payers sign a hash of the payment terms (receiver, token, max amount, expiries, operator), signatures cannot be replayed, payers can reclaim funds after authorization expiry, and each operator's funds sit in separate buckets. Six operations (authorize, capture, charge, void, reclaim, refund) cover the payment lifecycle, with partial captures and ERC-3009 signature-based token collection enabling gasless USDC payments. The protocol powers Shopify's USDC payment method and is open for extension via operator, receiver and token-collector contracts.

  • MCP UI: Breaking the text wall with interactive components

    Shopify Engineering easyNovice

    MCP UI extends the Model Context Protocol so servers can return interactive UI components, such as product selectors, galleries and cart flows, as embedded ui:// resources alongside JSON data. Components can be delivered three ways: inline HTML via srcDoc in a sandboxed iframe, remote resources loaded in a sandboxed iframe, or Remote DOM for direct client-side rendering. Components never modify state directly. They emit intents like view_details, checkout, notify and ui-size-change, which the agent interprets, so the agent stays in control. Hosts can pass CSS through render data to match their branding, and Shopify argues this beats having agents generate commerce UI with variants, bundles, subscriptions and live inventory.

  • ShopGym: Realistic, reproducible sandboxes for shopping agents

    Shopify Engineering mediumAdept

    ShopGym turns live storefronts into self-contained, resettable sandbox shops and generates grounded shopping tasks so agents can be evaluated reproducibly. ShopArena explores a seed store with planner and browser agents to write an anonymized shop specification, then generates a fictional catalog and storefront in fixed stages. Each stage runs an execution-verification loop of fresh coding agents, rule-based checks and visual browser verification. ShopGuru builds rule-based single-skill tasks and LLM-written multi-step journeys, validated against the shop's actual products and filters. Across 224 tasks in six shops, graph-based analysis showed similar state counts and page complexity to live stores, with fewer connections. Agent success rates on the twins tracked live stores and preserved model rankings on multi-step tasks, though some focused tasks showed larger gaps.

  • Agents that can pay: building Restock with Stripe's Link and Managed Deep Agents

    LangChain mediumAdept

    Restock is a sample Slack office-supply agent on Managed Deep Agents that makes real purchases. It searches Zinc, builds a cart, and pays through Stripe's Link wallet over the Machine Payments Protocol, where the merchant returns HTTP 402 with payment instructions and the client retries with a shared payment token. Spending limits and approvals live in code the model can't touch. The user sets an upfront amount under the budget, approves it through a Slack interrupt and again in Link, and the agent reads actual fees from the 402 challenge first. Credentials stay in per-user Connections and a sandbox, tokens are deleted after use, and an order counts as placed only when the merchant reports it.

  • Building the Agent Host Protocol for sessions that continue across devices

    GitHub Engineering mediumAdept

    The Agent Host Protocol (AHP) is an open standard that lets multiple clients (VS Code, the Copilot app, mobile apps, custom tools) share the same long-running agent sessions, so work started on one device can continue on another. It is organized around URI-identified channels (required root, session and chat channels, plus optional terminal, MCP and telemetry channels), each holding server-arbitrated reducer-based state that clients mutate by dispatching actions. This makes reconnection and replay over flaky networks straightforward and fits UI frameworks like React. Two independent hosts, VS Code's in TypeScript and GitHub's in Rust, exposed protocol gaps such as non-PTY shell output and client assumptions about session URI structure, and libraries now exist in six languages.

The quest for software engineering knowledge.

Look:
Layout: