Blog

agents.md and llms.txt on Shopify: which template to edit

Every Shopify store already serves /agents.md, /llms.txt and /llms-full.txt. What's in them, which theme template controls each URL, and when to change one.

By · · 7 min read

Open yourstore.com/llms.txt. On a store that runs on Shopify's Online Store, you'll get a Markdown page that starts with "Agent Instructions" and your store name. That's Shopify's agents.md. Since May 2026, every store serves /agents.md, and /llms.txt and /llms-full.txt show the same text unless the theme says otherwise. Shopify's help center is direct about it: "You don't need a third-party app to generate these files."

So the URL already works. What's left to decide is whether /llms.txt should say something different from /agents.md, which comes down to the theme template you add. Below: what the default file contains, which template controls which URL, what those templates can read, and how much llms.txt matters for AI answers.

One exception: on a headless storefront, where another host serves your public domain, /agents.md returns whatever that host serves, and the theme templates below don't apply.

What Shopify serves at /agents.md, /llms.txt and /llms-full.txt

Here is the default, as served at allbirds.com/agents.md on 16 October 2026. Kith, Brooklinen, Tentree and Rothy's served the same six sections that day:

  1. Shop skill. Points personal shopping agents to Shop's skill file for search, carts, Shop Pay checkout and order tracking.
  2. UCP integration. The store's Universal Commerce Protocol discovery URL (/.well-known/ucp) and MCP endpoint (/api/ucp/mcp), plus the WebMCP tools an agent should use when it works through a browser.
  3. Interaction guidelines. Orders only with the buyer's authorization, agents identify their requests (server-side ones through Web Bot Auth), and back off on 429 responses.
  4. Read-only browsing. The sitemap, /products/{handle} and /collections/all.
  5. Store policies. Links to the privacy policy, terms of service, refund policy and shipping policy.
  6. Platform. A paragraph about Shopify and links to its developer sites.

Shopify's help center lists the same contents. Contact details are left out on purpose: the developer docs note that the file is cached broadly and served to every agent that requests it.

The managed file is a set of instructions for buying from the store. It names no categories, collections, size guide or FAQ.

To check whether your three URLs match:

curl -s https://yourstore.com/agents.md > agents.md
curl -s https://yourstore.com/llms.txt > llms.txt
diff agents.md llms.txt

On the default setup the only difference is the last line, where Shopify tells the reader which URL it's on ("You're reading /llms.txt, which mirrors that content"). A bigger difference means your theme has a template for one of them.

Which template controls which URL

Each URL looks for a theme template first and falls back in a fixed order. This is the table from Shopify's agents.md.liquid documentation:

URL Template lookup order
/agents.md agents.md.liquid, then Shopify's default
/llms.txt llms.txt.liquid, then agents.md.liquid, then Shopify's default
/llms-full.txt llms-full.txt.liquid, then agents.md.liquid, then Shopify's default

Three things catch people out.

agents.md.liquid changes all three URLs. A generic tutorial says "create an llms.txt file". On Shopify, if that advice ends up as an agents.md.liquid, it replaces /agents.md, /llms.txt and /llms-full.txt together, and the Shop skill, UCP and buyer-authorization sections are gone unless you copied them in. A URL-specific template such as llms.txt.liquid wins for its own URL only.

The templates can't see your catalog. agents.md.liquid, llms.txt.liquid and llms-full.txt.liquid render with a restricted Liquid context. Only two objects exist: request and agents. The usual globals (shop, collections, pages, blogs, articles, linklists) render blank. A loop like {% for collection in collections %} copied from a theme section outputs nothing here, so any product or collection you want listed has to be typed in by hand.

The agents object gives you seven values: store_name, store_url, ucp_discovery_url, mcp_endpoint_url, ucp_versions, currency and sitemap_url.

There's one file per store, not per market. All three are served on the bare primary domain, with no locale or Shopify Markets prefix and no translated version. A store that sells in four languages has one /llms.txt for all of them.

Does llms.txt help you show up in ChatGPT?

There's no public evidence that it does. Google's guidance on AI features in Search says: "You don't need to create new machine readable files, AI text files, or markup to appear in these features." The crawler documentation from OpenAI, Anthropic and Perplexity covers robots.txt and doesn't mention reading a site's llms.txt. Shopify itself calls /agents.md the canonical file and describes /llms.txt and /llms-full.txt as URLs for older AI crawlers that look for those names.

Where llms.txt has a visible job today is developer documentation. OpenAI's and Perplexity's own docs sites publish one as an index of their documentation for AI agents.

For a store, two other things decide far more: whether AI search crawlers can reach your pages at all (how to check if your store blocks them), and whether your product pages state the facts shoppers ask about in plain text (how AI assistants choose which stores to recommend). A curated llms.txt is a small, cheap extra after those.

When to add llms.txt.liquid, and what to put in it

Shopify's documentation says most stores shouldn't add one, and that it's meant for when /llms.txt needs to differ from /agents.md. That's the case if you want /llms.txt to read as an index of what you sell, in the format llmstxt.org proposes (a # name, a > summary, then ## sections of links), while /agents.md stays Shopify's managed file.

To add it, from Shopify's steps: go to Online Store, click ... > Edit code on your theme, click Add a new template, choose llms.txt and click Create template. A short example:

# {{ agents.store_name }}

> Wide-fit trail and road running shoes, socks and rain shells. Prices in {{ agents.currency }}.

## Collections

- [Wide-fit trail shoes]({{ agents.store_url }}/collections/wide-fit-trail)
- [Road running shoes]({{ agents.store_url }}/collections/road)

## Before you buy

- [Size guide]({{ agents.store_url }}/pages/size-guide)
- [Shipping policy]({{ agents.store_url }}/policies/shipping-policy)
- [Refund policy]({{ agents.store_url }}/policies/refund-policy)

## For shopping agents

- [Agent instructions]({{ agents.store_url }}/agents.md)
- [Sitemap]({{ agents.sitemap_url }})

The store name, URL, currency and sitemap come from the agents object. The collection and page handles are typed in. The last section links back to /agents.md, so an agent that lands on /llms.txt can still find the UCP and checkout instructions.

A few rules:

After saving, open /llms.txt to see the new text, and /agents.md to confirm it hasn't changed.

When to add agents.md.liquid

For most stores, don't. Shopify's documentation says the managed file stays aligned with its agent features without theme maintenance, while a custom template is yours to keep current.

If you have a requirement the managed file doesn't cover:

Don't confuse it with the AGENTS.md file in a theme's root folder. That one gives coding agents context about how the theme is built and is never served on the storefront.

If an app or a tutorial already added one

In Edit code, open the templates folder and look for agents.md.liquid, llms.txt.liquid and llms-full.txt.liquid.

URL redirects set up in the admin to send /llms.txt somewhere else are not a workaround here. In May, developers on Shopify's developer forum reported that such redirects stopped working once Shopify began serving the route itself. The templates are the supported way to change these files.

Quick answers

Do I need an app to add llms.txt to Shopify?

No. Shopify serves /llms.txt, /llms-full.txt and /agents.md on every Online Store, with the same content at all three by default. An app or a template only matters if you want /llms.txt to say something different.

What's the difference between agents.md and llms.txt on Shopify?

/agents.md is Shopify's canonical file for AI agents: how to discover the store's commerce endpoints and how to buy on a shopper's behalf. /llms.txt mirrors it by default and can be replaced with its own llms.txt.liquid template, for example to list your collections and policies.

Drafting llms.txt.liquid without editing theme code

Discoverly for Shopify, an AI visibility app, drafts this file as one of its store fixes. The fix is optional: it drafts an llms.txt.liquid for your theme that lists your collections and store policies, and you read the full diff before anything goes live. Nothing is published until you press publish, and the original is saved, so the change rolls back in one click. /agents.md stays Shopify's.

The score, the audit and the llms.txt fix are free. AI-written titles, descriptions, alt text and FAQs use credits on paid plans, from $9.99 a month through Shopify billing.

Bring your store into the answer.

Install on Shopify 14-day trial, 20 AI credits. The audit stays free.