Skip to main content

llms.txt.liquid

The llms.txt.liquid template renders the llms.txt file, which is hosted at the /llms.txt URL.

/llms.txt is an agent-discovery file and an alternate URL for /agents.md, which is the canonical agent-discovery document. By default, /llms.txt mirrors the content of /agents.md, so agents and crawlers that request it still find a usable, agent-facing description of the store. As a result, this template isn't included in any themes by default.

Tip

The llms.txt file is served at the bare primary domain, without a locale or Shopify Markets subfolder prefix. It has no localized counterpart.


Anchor to When to use this templateWhen to use this template

In most cases you don't need a separate llms.txt.liquid template. If you want to customize the agent-discovery content for every URL at once, then add an agents.md.liquid template instead — /llms.txt falls back to it automatically.

Add an llms.txt.liquid template only when you want /llms.txt to diverge from /agents.md. The template lookup order for /llms.txt is:

  1. llms.txt.liquid (if present)
  2. agents.md.liquid (if present)
  3. The Shopify-generated default

So a dedicated llms.txt.liquid takes precedence for /llms.txt only, while /agents.md and /llms-full.txt are unaffected.


The llms.txt.liquid template is located in the templates directory of the theme:

└── theme
├── layout
├── templates
| ...
| ├── llms.txt.liquid
| ...
...

If your theme doesn't already contain the llms.txt.liquid template, then you can add it with the following steps:

  1. From your Shopify admin, go to Online Store > Themes.

  2. Find the theme that you want to edit, and then click ... > Edit code.

  1. In the left sidebar, locate the Templates folder.
  2. Right-click on the Templates folder.
  3. Click New File from the context menu.
  4. Name the file llms.txt.liquid.
  5. Press Enter to create the file.

This template can't be a JSON template. It must be llms.txt.liquid.

The template accepts standard text or Markdown and Liquid. Like agents.md.liquid, it has access to the agents object for auto-populated UCP and agent-interaction metadata, alongside the standard global Liquid objects. For the full list of agents properties, refer to agents.md.liquid.

For example:

templates/llms.txt.liquid

# {{ agents.store_name }}

> Agent-discovery summary. The canonical, full description is at {{ agents.store_url }}/agents.md.

- UCP discovery: {{ agents.ucp_discovery_url }}
- MCP endpoint: {{ agents.mcp_endpoint_url }}
- Sitemap: {{ agents.sitemap_url }}

To customize the agent-discovery content for /agents.md, /llms.txt, and /llms-full.txt together, edit agents.md.liquid. Use llms.txt.liquid only when /llms.txt needs content that differs from /agents.md.


Was this page helpful?