AI commerce

Add your own llms.txt on Shopify: three templates, and no access to products

To add your own llms.txt on Shopify, you replace the file Shopify already serves with a theme template. templates/agents.md.liquid controls /agents.md and is the fallback for the other two addresses, while llms.txt.liquid controls only /llms.txt. You create them under Online Store > Themes > Edit code. Inside these templates only the request and agents objects exist. shop, collections and products render blank, so a product list has to be typed in by hand. A custom file fully replaces the managed one. This is the documented state as of 2 December 2026.

  • No separate admin setting is documented. The route is theme code.
  • The default files are not part of any theme, so the template has to be created first.
  • Shopify's developer documentation advises against a separate llms.txt.liquid in most cases.

Last checked:

In detail

Each of the three templates answers for a different address

According to Shopify's developer changelog entry dated May 28, 2026, merchants can override the default with three theme templates. The lookup order decides which one is served. For /llms.txt, the documentation on shopify.dev gives it as: llms.txt.liquid first, then agents.md.liquid, then the Shopify-generated default.

That order has a practical consequence. If you want the same custom text at all three addresses, one agents.md.liquid is enough. If you only want /llms.txt to differ, you add llms.txt.liquid and leave /agents.md on the managed version. shopify.dev itself says that in most cases a separate llms.txt.liquid should not be added and reserves it for advanced requirements.

The Shopify Help Center lists the merchant steps as follows (as documented on 2 December 2026, not reproduced by us in a store): open Online Store, pick the theme you want to edit, choose Edit code, choose Add a new template, select agents.md, llms.txt or llms-full.txt, then Create template, make the edits and save. shopify.dev adds where to look afterwards: the file is served at the bare primary domain, without a locale or Shopify Markets subfolder prefix. The documentation describes no preview of these files for a theme that is not published, so the address on the primary domain is the place to read the result.

  • templates/agents.md.liquid: controls /agents.md and serves as fallback for /llms.txt and /llms-full.txt
  • templates/llms.txt.liquid: controls only /llms.txt
  • templates/llms-full.txt.liquid: controls only /llms-full.txt

In detail

Liquid in these templates knows the store's name and endpoints, nothing else

According to shopify.dev, llms.txt.liquid and agents.md.liquid render with a restricted Liquid context. Only the request object and the agents object are available. The standard global objects such as shop, collections and articles are not injected, and the documentation says they render blank.

The agents object exposes store_name, store_url, ucp_discovery_url (the store URL followed by /.well-known/ucp), mcp_endpoint_url (the store URL followed by /api/ucp/mcp), ucp_versions, currency and sitemap_url. That is enough to rebuild the endpoint section of the default file. It is not enough to loop over products or collections.

This is the limit every llms.txt generator for Shopify runs into. A generator can crawl a storefront and produce a text with product names, prices and links, but on Shopify that text can only live in the template as fixed characters. A price change or a sold-out product does not update it. Whoever pastes a generated product list into llms.txt.liquid takes on the job of regenerating and pasting it again after every catalog change.

In detail

A custom agents.md.liquid hands the upkeep of the file to you

According to shopify.dev, a custom agents.md.liquid completely replaces the Shopify-managed file and, unless the other two templates exist, also the content at /llms.txt and /llms-full.txt. The documentation puts it as taking responsibility for keeping the content current, while the managed file stays aligned with Shopify's agent-discovery capabilities without theme maintenance.

What that means for a template depends on how it is written. shopify.dev advises keeping the UCP and MCP endpoints discoverable through the agents object instead of hardcoding URLs, and says the auto-populated values stay in sync as the store's commerce configuration changes. An address typed into the template as text does not follow such a change. And whatever wording Shopify adds to its managed file later does not appear in a file you wrote yourself. That last point is our reading of the word replaces, not a sentence from the documentation.

Shopify also warns not to output potentially private merchant data, such as contact email addresses or phone numbers, in agents.md. The generated default deliberately leaves contact details out. A hand-written file that adds them does what the documentation advises against.

What is not known

Redirects, app proxies and headless stores are not covered by the documentation

Shopify's documentation names only the three theme templates as the way to change these files. Whether a URL redirect or an app proxy can override /llms.txt today is not documented, and Shopify documents no other method.

Headless storefronts are a separate case. On 2 December 2026 one headless store with its own frontend did not serve the Shopify default; /llms.txt returned the brand's own HTML error page. Our inference from that single observation is that the default applies to Shopify-hosted Liquid storefronts and a headless domain has to serve the file from its own frontend. Shopify's documentation does not state this for agents.md.

Index AI

Where an app helps with this file and where it does not

Index AI does not generate or edit llms.txt. Its part is the access side around the file: Index AI checks crawler access per AI bot and provides a robots.txt template. The template work described on this page stays in the theme code editor.

FAQ

Questions about llms.txt generators and Shopify

Free check

Check what AI assistants can read on your store

The free check looks at crawler rules, llms.txt and product markup. No cost.

Index AI

Index AI checks every product for what AI channels read: category, category attributes, GTIN, title, description and images, with a readiness score and issues per product. The product data check is free in the Starter plan.

Install on Shopify

Sources

Sources