Shopify: Custom Templates for /agents.md, /llms.txt, and /llms-full.txt Paths
Add specific .liquid templates under templates/ to serve custom content for /agents.md, /llms.txt, and /llms-full.txt paths.
Add templates/agents.md.liquid, templates/llms.txt.liquid, and templates/llms-full.txt.liquid as needed to customize content for each path.
Summary
Shopify’s default store includes an <code>agents.md</code> file that is served at <code>/agents.md</code>. The paths <code>/llms.txt</code> and <code>/llms-full.txt</code> also point to this same content by default.
Developers can override this behaviour by adding specific Liquid templates under Online Store > Themes > Edit code. A <code>templates/agents.md.liquid</code> template controls the content for <code>/agents.md</code> and serves as the default for the other two paths. Separate templates <code>templates/llms.txt.liquid</code> and <code>templates/llms-full.txt.liquid</code> allow custom content for <code>/llms.txt</code> and <code>/llms-full.txt</code> respectively. If a template is missing for a given path, Shopify falls back to the agents.md template, and if that is also absent, it uses the Shopify-generated default.
Key changes
- Default agents.md serves /agents.md, /llms.txt, and /llms-full.txt
- /llms.txt and /llms-full.txt default to agents.md content
- templates/agents.md.liquid controls /agents.md and defaults for the other two paths
- templates/llms.txt.liquid controls /llms.txt only
- templates/llms-full.txt.liquid controls /llms-full.txt only
- Missing templates fall back to agents.md template then Shopify default