September 27, 2026 · Muhammad Umar · More by Muhammad Umar
Shopify's agents.md Templates: What Controls AI Agent Discovery
Shopify now lets stores customize agents.md, llms.txt, and llms-full.txt via Liquid templates — here's the exact fallback order and what ships by default.
Since May 28, 2026, every Shopify store has served a Shopify-managed agents.md file at /agents.md, with /llms.txt and /llms-full.txt mirroring that same content by default. It's Shopify's answer to the growing number of AI shopping agents and LLM crawlers that need a canonical, agent-facing description of a store: not a sitemap, not marketing copy, but a machine-readable rundown of how to discover and transact with the store's commerce endpoints.
Until this change shipped, that description was entirely Shopify-managed and non-negotiable. Now three Liquid templates give merchants and theme developers a way to override it, added under Online Store > Themes > Edit code.
Three templates, one fallback chain
The lookup order is the part worth understanding before touching any of this:
- /agents.md resolves to agents.md.liquid, then the Shopify-generated default.
- /llms.txt resolves to llms.txt.liquid, then agents.md.liquid, then the Shopify-generated default.
- /llms-full.txt resolves to llms-full.txt.liquid, then agents.md.liquid, then the Shopify-generated default.
The practical consequence: adding only agents.md.liquid covers all three URLs at once, since it's the fallback for the other two. You only need llms.txt.liquid or llms-full.txt.liquid separately if you want that specific path to diverge from what /agents.md serves. These also can't be JSON templates — Shopify requires the exact filenames.
What the agents object gives you
When you do write a custom agents.md.liquid template, Shopify auto-populates an agents object so you're not hardcoding values that can drift from the store's real configuration:
- agents.store_name and agents.store_url
- agents.ucp_discovery_url — the store's Universal Commerce Protocol discovery endpoint ({store_url}/.well-known/ucp)
- agents.mcp_endpoint_url — the store's Model Context Protocol endpoint ({store_url}/api/ucp/mcp)
- agents.ucp_versions — supported UCP versions, newest first
- agents.currency and agents.sitemap_url
Shopify's guidance is to reference these fields rather than hardcode the equivalent URLs, so the file stays correct as the store's UCP/MCP configuration changes. One thing to know before reaching for shop, articles, or collections inside these templates: they aren't available. All three templates render with a restricted Liquid context — only request and agents are injected.
When a custom template is actually worth it
Shopify's documentation is explicit that the managed default is sufficient for most stores — it already stays aligned with the store's commerce configuration without any theme maintenance. A custom template earns its place when you need agent-facing instructions the managed file doesn't cover: guidance specific to your catalog structure, policies phrased for a particular shopping assistant, or a deliberately different llms-full.txt for deeper crawlers than what /agents.md serves.
For most storefront engineering teams, the first move isn't to add a template — it's to check what's already being served at /agents.md today, and confirm the auto-populated UCP and MCP URLs match what you expect before deciding whether the default needs an override at all.