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

    Shopify Introduces a New Collections API in 2026-07
    Platform Updates

    Shopify Introduces a New Collections API in 2026-07

    Shopify is introducing a major update to its Collections API in the 2026-07 GraphQL Admin API release. The new model replaces the traditional split between smart collections and custom collections with a more flexible, composable system based on multiple collection sources

    August 9, 20262 min
    Identity verification for Shopify Partners starts today
    Platform Updates

    Identity verification for Shopify Partners starts today

    Starting today, Shopify Partners can complete identity verification before requesting collaborator access to merchant stores. Identity verification is optional today and will become mandatory in the coming weeks before sending a new collaborator request

    August 6, 20267 min
    Recent Shopify Updates to Boost Your Store's Performance
    Platform Updates

    Recent Shopify Updates to Boost Your Store's Performance

    Discover the latest Shopify updates, including app-added annotations, WhatsApp marketing, and UPS return labels, to enhance your store's performance and customer experience. Learn how to leverage these updates to drive sales, improve analytics, and streamline operations. Get expert insights on how to implement these updates and take your Shopify store to the next level.

    August 3, 20262 min
    Developer Preview: Shopify Introduces Liquid Block and Partial Tags
    Platform Updates

    Developer Preview: Shopify Introduces Liquid Block and Partial Tags

    Shopify continues to improve the developer experience with an exciting new Developer Preview that introduces two powerful additions to Liquid: block and partial tags.

    August 2, 202615 min