Maker Resources

Shopify agents.md Guide: Prepare Your Store for AI Shopping

July 27, 2026 · 17 min read

Shopify agents.md Guide: Prepare Your Store for AI Shopping - Hat Patch Supply

Why Shopify Stores Should Care About agents.md and llms.txt

Online shopping is beginning to change in a way that goes beyond traditional Google searches, social media ads, and marketplace listings. Shoppers can now ask an AI assistant to find a product, compare several options, explain the differences, build a cart, and help prepare a checkout.

That creates a new challenge for Shopify merchants: AI systems need to understand exactly what your store sells before they can confidently recommend it.

A human shopper can look at product photos, read through several pages, open a size chart, and eventually figure out what is included. An AI shopping agent needs the same information in a more direct and structured format. It needs to know whether a listing is a physical product, digital download, subscription, accessory, custom order, replacement part, deposit, or complete finished product.

That is where Shopify’s agents.md file becomes important.

What Is agents.md?

The agents.md file is an agent-facing description of a Shopify store. It gives AI shopping assistants and commerce agents instructions for discovering products, reading store data, understanding policies, and interacting with supported commerce tools.

Shopify now manages an agents.md file for stores by default. It is served from the store’s primary domain at:

yourstore.com/agents.md

Shopify identifies agents.md as its canonical agent-discovery document. The alternate /llms.txt and /llms-full.txt URLs mirror the same content by default unless a merchant creates separate templates for them.

That means the filename merchants should pay the most attention to is not technically llm.txt. The commonly discussed filename is llms.txt, with an “s,” while Shopify’s primary file is now agents.md.

Does Shopify Already Create This File?

Yes. Shopify provides a managed version automatically, and for many stores that default file will be enough.

The managed file includes basic commerce information such as the store’s agent-discovery endpoints, public catalog routes, policy pages, and instructions for supported shopping agents. Shopify keeps that version aligned with the store’s current commerce configuration.

A custom file becomes useful when your store sells products that an AI could easily misunderstand.

Examples include:

  • Custom or personalized products

  • Digital files and physical products in the same catalog

  • Products sold separately from the finished item pictured

  • Subscriptions and one-time purchase options

  • Replacement parts and accessories

  • Deposits for future services

  • Preorders and made-to-order products

  • Marketplace products fulfilled by different vendors

  • Products with complicated compatibility requirements

  • Wholesale products with quantity-based pricing

  • Products requiring artwork, measurements, text, or production notes

A customized file can explain these differences before an agent recommends the wrong item or creates an incomplete cart.

Why This Matters for Shopify Stores

A normal product description is written primarily to persuade a person. An agent instruction file is written to remove ambiguity.

Consider a store selling personalized engraved tumblers. A human shopper may understand that the photograph shows an example and that a name must be entered before checkout. An AI agent could incorrectly add the default product without the personalization, assume the photographed name is included, or fail to preserve the customer’s spelling.

A better agents.md file can tell the agent to:

  • Confirm the customer’s personalization

  • Preserve spelling and capitalization

  • Select the correct size and color

  • Attach uploaded artwork through the approved process

  • Avoid approving a proof without permission

  • Confirm production time separately from carrier transit time

  • Review custom-product refund restrictions before checkout

The same concept applies to clothing sizes, equipment compatibility, food allergens, digital licenses, subscription renewals, product bundles, local pickup, international shipping, and nearly every other area where a listing needs additional context.

Can agents.md Improve SEO?

It is better to think of agents.md as AI commerce optimization rather than a traditional Google ranking tactic.

There is no established evidence that simply adding a longer agents.md or llms.txt file will raise a store’s organic rankings. Google says that no special AI text file or additional AI-specific markup is required to appear in its AI search features. Its existing recommendations still focus on indexable pages, helpful content, internal links, structured data, accurate product information, and a strong page experience.

A custom agent file does not replace:

  • Product descriptions

  • Collection content

  • Internal linking

  • Product structured data

  • Merchant Center feeds

  • Image optimization

  • Reviews

  • Shipping information

  • Return-policy markup

  • Traditional technical SEO

Google specifically recommends accurate product structured data and Merchant Center information to improve its understanding of ecommerce products and their variants.

The value of agents.md is different. It gives compatible shopping agents a direct set of instructions for interpreting and interacting with your Shopify store.

It may help prevent agents from confusing one product type with another, overlooking required options, quoting an incorrect starting price, or making unsupported claims about delivery and returns.

What Should a Good Shopify Agent File Include?

A useful file should begin with a clear explanation of what the store sells and who its products are intended for. Avoid vague descriptions such as “we offer premium products and excellent service.” That language does not help an agent choose the correct item.

Explain the meaningful distinctions within the catalog. For example:

  • Physical product versus digital download

  • Product component versus completed item

  • Standard product versus personalized product

  • Genuine material versus synthetic alternative

  • One-time purchase versus subscription

  • In-stock product versus preorder

  • Retail product versus wholesale pack

  • Merchant-manufactured product versus marketplace listing

The file should also tell agents to retrieve current product and variant data before quoting prices or confirming availability. Prices, promotions, inventory, production times, and shipping options can all change.

A strong file should never encourage an agent to rely on a cached search result when live Shopify data is available.

Keep Dynamic Store Information Dynamic

Shopify provides a special Liquid object named agents for these templates. It can automatically output the store name, primary URL, currency, sitemap location, supported commerce-protocol versions, discovery URL, and MCP endpoint.

Using these dynamic values is better than hardcoding them because they remain synchronized with Shopify’s current configuration. Shopify also limits the template’s Liquid environment to the agents and request objects. Standard objects such as shop, collections, products, articles, and linklists are not available in this template.

For example:

# {{ agents.store_name }}

Store: {{ agents.store_url }}

Currency: {{ agents.currency }}

UCP discovery: {{ agents.ucp_discovery_url }}

MCP endpoint: {{ agents.mcp_endpoint_url }}

Sitemap: {{ agents.sitemap_url }}

This is one reason merchants should avoid copying a template that contains another business’s domain, currency, product names, policies, or protocol versions.

Do Not Stuff the File With Every Product

A common mistake is trying to turn agents.md into a permanent export of the entire catalog.

That approach creates several problems. Products can be added or removed, handles can change, prices can change, inventory can sell out, and promotions can expire. A manually written catalog becomes outdated quickly.

The better approach is to explain how the store should be interpreted and then direct agents to current sources such as:

  • UCP and MCP commerce data

  • Product records

  • Variant records

  • Shopify search

  • Product JSON

  • Collection JSON

  • Store policies

  • The sitemap

  • Live checkout totals

A few important collection or landing-page links can be included, but live catalog data should remain the source of truth.

Protect Private Information

Do not treat agents.md as a private internal document.

Shopify warns that the file may be cached broadly and served to agents that request it. Merchants should avoid placing private email addresses, personal phone numbers, unpublished discount codes, internal production notes, customer information, API credentials, or other sensitive details inside it.

Everything in the file should be considered public.

How to Add a Custom agents.md File to Shopify

From the Shopify admin:

  1. Go to Online Store → Themes.

  2. Open the theme menu and select Edit code.

  3. Find the Templates folder.

  4. Create a new file named agents.md.liquid.

  5. Paste the template into the file.

  6. Save your changes.

  7. Visit yourstore.com/agents.md to confirm that it renders correctly.

Shopify requires this to be a Liquid template rather than a JSON template. Once added, the custom file replaces Shopify’s managed agents.md. Unless separate templates are created, it also becomes the fallback content for /llms.txt and /llms-full.txt.

Because the customized version replaces Shopify’s managed file, the merchant becomes responsible for keeping its custom instructions accurate.

Test the File Before You Forget About It

After publishing the file, check:

  • /agents.md

  • /llms.txt

  • /llms-full.txt

  • /.well-known/ucp

Make sure the store name, domain, currency, sitemap, and commerce endpoints render correctly. Confirm that literal Liquid tags have not been accidentally escaped and that store-specific instructions do not contradict current product pages or policies.

Review the file whenever the business introduces a major new product type, subscription model, marketplace vendor, customization process, fulfillment method, or policy change.

Final Thoughts

The purpose of a Shopify agents.md file is not to repeat every piece of marketing copy already on the website. Its purpose is to make the store easier for machines to interpret accurately.

A good file tells an AI agent what the business sells, how products should be classified, which choices must be confirmed, where current information should be retrieved, and what the agent must never assume.

That does not guarantee that an AI assistant will recommend a particular store. It does, however, give compatible agents a better chance of understanding the catalog correctly when the store is discovered.

As shopping continues to move beyond traditional search boxes, accurate agent-facing information will become another part of maintaining a professional ecommerce website.

The free generalized Shopify template below can be copied, edited, and shared with other store owners.

FREE SHOPIFY TEMPLATE

Generic Shopify agents.md.liquid Template

Copy the complete template, then add it to your Shopify theme as templates/agents.md.liquid.

Ready to press your own?

Custom UV patches with no minimum, shipped in 72 hours — or grab a free-shipping sample pack first.

Start a Custom Order
HPS

Hat Patch SupplyFamily-run patch shop in East Liverpool, Ohio. We UV print and laser engrave every patch in-house — and press a lot of hats ourselves. Our story