Shopify agents.md.liquid: Making Your Store Ready for AI Agents

Shopify is introducing agents.md.liquid, a new theme template designed to help AI agents and shopping assistants understand how to discover and interact with a Shopify store

Shopify agents.md.liquid: Making Your Store Ready for AI Agents
4 sections

The new agents.md.liquid template allows Shopify developers to customize the information that AI agents and shopping assistants use to discover a store's commerce capabilities. Shopify describes agents.md as the canonical, agent-facing description of a store.

What Is agents.md?

agents.md is a special file available at:

https://your-store.com/agents.md

Unlike traditional SEO files that are primarily designed for search engines, agents.md is designed specifically for AI agents and shopping assistants.

It can provide information such as:

  • Store information
  • Product and collection browsing URLs
  • Store policies
  • Universal Commerce Protocol (UCP) discovery
  • Model Context Protocol (MCP) endpoints
  • Guidance for shopping agents
  • Shopify automatically generates an agents.md file for every store, so most merchants don't need to create anything manually.

    Why Is This Important?

    Imagine a customer asking an AI shopping assistant:

    "Find me a pair of running shoes from this store under $100."

    Instead of an AI having to guess how the storefront works by reading HTML, agents.md provides a structured description of how the store can be discovered and interacted with.

    This is part of a broader shift from traditional human-only storefronts toward storefronts that can also communicate with AI-powered shopping agents.

    In other words:

    Traditional Store

    ↓ Human → Website → Products

    is evolving toward:

    AI Agent

    ↓ agents.md

    ↓ UCP / MCP

    ↓ Store Commerce Capabilities

    ↓ Products / Collections / Checkout

    Shopify Already Provides a Managed Version

    One of the most important details is that Shopify automatically manages agents.md by default.

    For most stores, this managed version is sufficient because Shopify keeps it aligned with the store's agent-discovery capabilities and commerce configuration.

    Therefore, developers shouldn't automatically add an agents.md.liquid file just because the feature exists.

    Shopify recommends customizing it only when your store has advanced requirements that aren't covered by the default version.

    What Is agents.md.liquid?

    If you need more control, you can create:

    templates/agents.md.liquid

    This template controls the content served at:

    /agents.md

    It uses a combination of Markdown and Liquid.

    For example:

    liquid
    # Agent Instructions — {{ agents.store_name }}
    
    This document describes how AI agents can interact with
    {{ agents.store_url }}.
    
    ## Commerce Protocol
    
    - Discovery: `GET {{ agents.ucp_discovery_url }}`
    - MCP endpoint: `POST {{ agents.mcp_endpoint_url }}`
    
    ## Supported UCP Versions
    
    {% for version in agents.ucp_versions %}
    - {{ version }}
    {% endfor %}

    Shopify provides a special agents object so developers can dynamically access important store and commerce information.

    The agents Object

    The agents object is particularly important because it helps developers avoid hardcoding information that could become outdated.

    It provides properties such as:

    PropertyPurpose
    agents.store_nameStore name
    agents.store_urlPrimary store URL
    agents.ucp_discovery_urlUCP discovery endpoint
    agents.mcp_endpoint_urlMCP endpoint
    agents.ucp_versionsSupported UCP versions
    agents.currencyPrimary store currency
    agents.sitemap_urlStore sitemap URL

    These values are automatically populated by Shopify and stay synchronized with the store's commerce configuration.

    This is preferable to hardcoding URLs such as:

    https://example.com/api/ucp/mcp

    because the agents object keeps these values up to date.

    An Important Difference From Normal Liquid Templates

    Developers need to be careful here.

    agents.md.liquid does not have the same Liquid context as a normal theme template.

    Only these objects are available:

    request

    agents

    Standard Shopify Liquid objects such as:

    {{ shop }}

    {{ collections }}

    {{ pages }}

    {{ blogs }}

    {{ articles }}

    aren't available in this template and will render blank.

    This restriction exists because the file needs to be safe to broadly cache and serve to AI agents.

    Therefore, if you want to include store information, use the agents object or explicitly hardcode the information you need.

    agents.md vs llms.txt

    Shopify also connects agents.md with the increasingly common llms.txt ecosystem.

    By default:

    /agents.md

    /llms.txt

    /llms-full.txt

    can provide the same agent-discovery content.

    If you want /llms.txt or /llms-full.txt to contain different information, you can create dedicated Liquid templates for those URLs.

    Tags
    Sources

    Related Articles

    Protecting Shoppers: Shopify’s New Confirmation Prompt for External Redirects

    Protecting Shoppers: Shopify’s New Confirmation Prompt for External Redirects

    Shopify now shows a confirmation modal before sending customers to untrusted external sites, helping prevent phishing and unwanted redirects. Learn what changed, who’s affected, and how to keep your store’s experience smooth.

    October 21, 20264 min
    Mastering Stock Counts: New Tools to Create, Manage, and Review Inventory in Shopify Admin

    Mastering Stock Counts: New Tools to Create, Manage, and Review Inventory in Shopify Admin

    Shopify’s latest Stock Count feature brings barcode scanning, real‑time reviews, and audit trails directly into the admin. Learn who it impacts, how to set it up, and what developers need to know.

    October 20, 20264 min
    Unlocking Analytics for Metaobjects: New Queryable Capability in the Shopify Admin API

    Unlocking Analytics for Metaobjects: New Queryable Capability in the Shopify Admin API

    Shopify’s 2027-01 GraphQL Admin API now lets you read and set the analyticsQueryable capability on metaobject definitions, aligning them with metafields. Learn what changed, who it impacts, and how to enable analytics for your custom data.

    October 20, 20263 min
    Securing Your Shopify App: New AI‑Powered Checks and Expiring Tokens

    Securing Your Shopify App: New AI‑Powered Checks and Expiring Tokens

    Shopify’s latest developer update forces app makers to adopt AI security scans, short‑lived access tokens, and tighter account protections. Learn what changed, who’s affected, and how to implement the new safeguards today.

    October 20, 20264 min