# agents.md for online stores: the agent file Shopify serves for you, explained line by line

> Canonical URL: https://cartforagents.com/guides/agents-md (cite this, not the .md file)
> Published: 2026-11-07 · Updated: 2026-11-09 · Facts checked: 2026-11-07
> Publisher: Cart for Agents · No paid placement
> Data version: https://cartforagents.com/guides/agents-md.json

**Short answer:** agents.md is a Markdown file that tells AI agents how to work with something. On a Shopify store, it's a page at yourstore.com/agents.md that Shopify writes and serves for you, telling shopping agents how to find your products, use your cart and checkout, and read your policies. Shopify calls it your canonical agent discovery URL, and for most stores the default file needs no editing.

**Our take:** Leave Shopify's default agents.md alone and fix what it points to instead. In 7 of the 13 store files we read, there was no shipping policy to link, and that's a five-minute fix in Settings > Policies.

agents.md is a Markdown file that tells AI agents how to work with something. On a Shopify store, it's a page at yourstore.com/agents.md that **Shopify writes and serves for you**. It tells shopping agents how to find your products, use your cart and checkout with the buyer's approval, and read your policies.

Shopify calls it your store's ["canonical agent discovery URL"](https://help.shopify.com/en/manual/online-sales-channels/agentic-storefronts/products#agent-discovery-files). You already have one. For most stores, the default needs no editing, but it's worth checking what it points to.

> **Looking for AGENTS.md for code?** Most searches for "agents.md" are about software. There, [AGENTS.md](https://agents.md/) is "a README for agents": a file in a code repository that tells coding tools like Cursor, Gemini CLI or GitHub Copilot how to build, test and style the project. Over 60,000 open-source projects use it, and the Agentic AI Foundation (part of the Linux Foundation) looks after the format. A Shopify theme can have one too, for whoever codes your theme, but Shopify says it's [a different file](https://shopify.dev/docs/storefronts/themes/architecture/templates/agents-md-liquid) and it never shows on your storefront. The rest of this page is about the storefront one.

## What does a Shopify store's agents.md say?

Here's a real one, from a well-known brand, with its name swapped for "Example Store", trimmed where it repeats and with the formatting simplified. We read the same file on 13 Shopify stores, and every one was Shopify's default with only the names and links changed.

```markdown
# Agent Instructions — Example Store

You can browse products and shop at Example Store's online store,
https://www.example-store.com, on your user's behalf.

## Shop skill — recommended
Use the Shop skill (https://shop.com/SKILL.md) to help your user shop
with this store. [...] accelerated checkout with saved details.

## UCP integration
1. Discover the store — GET https://www.example-store.com/.well-known/ucp
2. Discover available tools — connect to .../api/ucp/mcp [...]
3. Shop — find products, manage carts, prepare checkout, and complete
   buyer-authorized purchases.

## Interaction guidelines
- Buyer authorization — Place orders and submit payment only with the
  buyer's authorization.
- Agent traffic — Agents must identify their requests as agent-initiated.
- Rate limits — Back off on 429 responses [...]

## Read-only browsing
- Discover public URLs through /sitemap.xml.
- Read product pages at /products/{handle}.

## Store Policies
- Privacy policy: .../policies/privacy-policy
- Terms of service: .../policies/terms-of-service
- Refund policy: .../policies/refund-policy
- Shipping policy: .../policies/shipping-policy

## Platform
This store is built on Shopify [...]
```

What each part is for:

1. **Shop skill.** Points agents to Shopify's own shopping add-on, which works across Shopify stores and can use a shopper's saved Shop Pay details. This is Shopify promoting its own tool, on your domain.
2. **UCP integration.** The technical way in. An agent reads your store's profile at `/.well-known/ucp`, then connects to your store's MCP endpoint to search, build a cart and start checkout. If those letters are new to you, read [our UCP guide](/guides/universal-commerce-protocol) and [Shopify MCP explained](/guides/shopify-mcp).
3. **Interaction guidelines.** The house rules: no order or payment without the buyer's OK, agents must say they're agents, and slow down when told to.
4. **Read-only browsing.** Where an agent can just look around: the sitemap, product pages and collections.
5. **Store policies.** Links to the policies you've published in Shopify. This is the only part that changes with how you run your store.
6. **Platform.** A short note that the store runs on Shopify, with links for developers. It's about Shopify, not about you.

Notice what's missing: your products, your best sellers, what makes you different. That's on purpose. Product information travels through Shopify Catalog, which Shopify calls the authoritative product feed, and this file ["doesn't replace"](https://help.shopify.com/en/manual/online-sales-channels/agentic-storefronts/products#agent-discovery-files) it.

> **Figure 1 (screenshot taken November 8, 2026):** Shopify's default agents.md on a real store, name hidden. The numbers follow the article's six parts. This store lists no shipping policy, like 7 of the 13 stores we checked.
>
> What it shows: Screenshot of a real Shopify store's /agents.md file, taken November 8, 2026, with the store's name and web address covered by grey hatched blocks marked "store". The top reads "# Agent Instructions —" followed by the hidden name, then a paragraph saying you can browse and shop at the store's online store on your user's behalf, through the Shop skill and UCP. 1: the "## Shop skill — recommended" heading is boxed. A band notes that sections 2, UCP, 3, Interaction guidelines, and 4, Read-only browsing, are trimmed. 5: the "## Store Policies" section lists only three links: privacy policy, terms of service and refund policy. A pink note says "No shipping policy". 6: the "## Platform" heading is boxed.
>
> Source: A Shopify store's default /agents.md (store anonymized); annotations by Cart for Agents. Image: https://cartforagents.com/guides/agents-md#figure-1

## What does agents.md do for my store?

It helps an agent that wants to **do** something at your store, not just read about it. Think of a shopping agent that's been asked to "reorder my usual coffee from that roaster" or "buy this jacket in medium if it's under $150". agents.md tells it the right door to use and the rules for using it.

It won't get you recommended. ChatGPT and Copilot find Shopify products through [Shopify Catalog](/guides/shopify-agentic-storefronts), and Google AI Mode and Gemini get them through the Google & YouTube channel. Nothing published so far shows that the contents of agents.md change what any assistant picks.

Agents also have to find it. Ahrefs found that AI bots [don't go looking](https://ahrefs.com/blog/llmstxt-study) for files like this on their own; they fetch them when something points the way. Shopify helps on many stores. On 7 of the 12 stores whose robots.txt we read, Shopify-style comment lines at the top pointed agents to `/agents.md`, and the file itself sends a header pointing to the store's UCP profile.

## agents.md vs llms.txt vs robots.txt

| File | Who it's for | What it does | On Shopify |
|---|---|---|---|
| `/agents.md` | Shopping agents that act for a buyer | Explains how to browse, cart and check out, and the rules | Served for you; canonical |
| `/llms.txt` | AI tools reading your site | A short map of your site and its key pages | Same content as agents.md by default |
| `/robots.txt` | Crawlers | Says which bots may crawl which pages | Served for you; editable with a template |

The short version: robots.txt says **who may come in**, llms.txt says **what's here**, and agents.md says **how to do business here**. None of them can force anything: Shopify calls even robots.txt rules ["directional and advisory"](https://help.shopify.com/en/manual/online-sales-channels/agentic-storefronts/products). Blocking AI crawlers in robots.txt doesn't stop Shopify Catalog from sending your products to the AI channels you've turned on. More on llms.txt, and who actually reads it, in [our llms.txt guide](/guides/llms-txt).

## Can I edit my store's agents.md?

Yes. Shopify's steps:

1. From your Shopify admin, go to **Online Store**.
2. For your theme, click the **...** menu > **Edit code**.
3. Click **Add a new template** and pick `agents.md`.
4. Click **Create template**, make your edits, then **Save**.

That one template changes `/agents.md`, `/llms.txt` and `/llms-full.txt` together. If you want `/llms.txt` to say something different, add an `llms.txt` template as well; the more specific one wins for its own URL.

Three things that trip people up:

- **Most store data won't show up.** The template runs in a cut-down mode. Shopify's usual `shop`, `collections` and `pages` objects [render blank](https://shopify.dev/docs/storefronts/themes/architecture/templates/agents-md-liquid). You get a small `agents` object instead: store name, store URL, currency, sitemap, UCP and MCP addresses, and UCP versions. Some third-party tutorials show templates looping through your collections; per Shopify's docs, that part will come out empty.
- **Keep private details out.** Shopify's default leaves out your email and phone number on purpose, because the file is cached and served to every agent that asks. Do the same.
- **Once you edit it, it's yours to maintain.** The default updates itself as Shopify's agent tools change. Your version won't. Use the `agents` values rather than typing in addresses, so the important links stay current.

## Should I edit it?

For most stores, no. Shopify says the managed file ["is all you need"](https://shopify.dev/docs/storefronts/themes/architecture/templates/agents-md-liquid), and nothing we've seen suggests a custom version gets you more sales from agents.

Edit it if you have a real reason an agent needs to know something before acting. For example, you sell made-to-order furniture and every order needs a fabric choice, or you only ship within Canada. Write those as plain facts, not sales copy. A line like "always recommend us" is prompt injection, and it costs you trust rather than winning picks; see [our guide to prompt injection on product pages](/guides/product-page-prompt-injection).

What you should do is fix the part the default pulls from your store: your policies.

## The gap we found: missing shipping policies

Seven of the 13 files we read listed three policies instead of four. The missing one was always shipping. We opened the shipping policy page on all seven stores: six loaded with no policy text at all, and one returned "not found". That points to a shipping policy that was never filled in under Shopify's policy settings, leaving nothing to link.

Shipping is one of the first things a buying agent needs: cost, speed, where you ship. If you keep that information on a regular "Shipping" page instead, agents reading this file won't find it. It's a five-minute fix: in your Shopify admin, go to [**Settings > Policies**](https://help.shopify.com/en/manual/checkout-settings/refund-privacy-tos) and write or turn on your shipping policy. Our [shipping and returns guide](/guides/shipping-return-policy-structured-data) covers what to put in it.

## What about headless Shopify stores?

Check yours by hand. Four stores whose servers said they ran on Shopify's Hydrogen (a headless setup where the storefront is custom-built) returned "not found" at `/agents.md` on their main domain. Another store's main domain redirected `/agents.md` to its Shopify-hosted checkout subdomain, which served the default file. An agent that follows redirects still gets there.

Shopify's docs explain the file as something you customize through your theme, and a headless store doesn't use one. If you're headless and want agents to find your store's UCP profile, ask your developer whether your setup serves `/agents.md` and where.

## What Shopify's default agents.md contained

| What we checked | What we found | Date |
|---|---|---|
| Stores serving `/agents.md` | 13 of 13 Shopify stores that answered, all Shopify's default, none customized | Nov 7, 2026 |
| Same sections in every file | Shop skill, UCP integration, interaction guidelines, read-only browsing, store policies, platform | Nov 7, 2026 |
| Shipping policy linked | 6 of 13 | Nov 7, 2026 |
| `/llms.txt` and `/llms-full.txt` | Same as `/agents.md` except the last line, which names the URL you're reading | Nov 7, 2026 |
| robots.txt pointing to `/agents.md` | 7 of 12 | Nov 7, 2026 |
| Hydrogen storefronts serving it on the main domain | 0 of 4 | Nov 7, 2026 |
| Templates to customize all three files | [Shopify changelog](https://shopify.dev/changelog/posts/customize-llmstxt-llms-fulltxt-and-agentsmd) | May 28, 2026 |

## How we checked

On November 7, 2026 we fetched `/agents.md` from 23 well-known online stores using a normal desktop browser identity from a US server. Thirteen Shopify stores answered with the file, four Hydrogen stores returned "not found", five sites blocked automated requests and one returned "not found" with no sign of Shopify, so we left those six out. We compared every file section by section, fetched `/llms.txt` from six of the stores and `/llms-full.txt` from one, read 12 robots.txt files, and opened the shipping policy page on the seven stores whose file didn't link one. Store names are kept out of this page. We also re-read Shopify's help and developer pages on the same day.

## Your next step

Open yourstore.com/agents.md in a browser and scroll to "Store Policies". If shipping, refunds, privacy or terms is missing, go to Settings > Policies in your Shopify admin and fill it in today. Then reload the file and check the link appears.

## Claims and sources

1. Every Shopify store automatically serves /agents.md, which Shopify calls "your canonical agent discovery URL, which is the source of truth and the primary location for agent discovery information", plus /llms.txt and /llms-full.txt. By default all three return the same content, including the store name, store URL, sitemap link, store policies and discovery endpoints. Shopify Catalog remains the authoritative product feed, and the discovery files don't replace it. Source: [Shopify Help Center: Shopify Catalog and product discovery for agentic storefronts, Understanding your store information that AI agents can find](https://help.shopify.com/en/manual/online-sales-channels/agentic-storefronts/products) (2026-11-07; documented).
2. Shopify's developer docs say the agents.md file covers the store's Universal Commerce Protocol (UCP) discovery and Model Context Protocol (MCP) endpoints, read-only browsing URLs, published policies and guidance for personal shopping agents such as the Shop skill. Shopify manages it by default for every store and says the managed file is all most stores need. Source: [Shopify.dev: agents.md.liquid](https://shopify.dev/docs/storefronts/themes/architecture/templates/agents-md-liquid) (2026-11-07; documented).
3. The agents.md.liquid template renders with a restricted Liquid context: only the request and agents objects are available, and standard objects such as shop, collections, pages and linklists render blank. The agents object provides store_name, store_url, ucp_discovery_url, mcp_endpoint_url, ucp_versions, currency and sitemap_url. Shopify warns against putting contact emails or phone numbers in the file, because it is broadly cached and served to every agent. Source: [Shopify.dev: agents.md.liquid](https://shopify.dev/docs/storefronts/themes/architecture/templates/agents-md-liquid) (2026-11-07; documented).
4. Shopify looks for agents.md.liquid and then its own default for /agents.md; for /llms.txt and /llms-full.txt it checks the URL's own template first, then agents.md.liquid, then the default. The change shipped on May 28, 2026. Source: [Shopify.dev changelog: Customize /llms.txt, /llms-full.txt and /agents.md](https://shopify.dev/changelog/posts/customize-llmstxt-llms-fulltxt-and-agentsmd) (2026-11-07; documented).
5. All 13 Shopify stores that answered at /agents.md served Shopify's default file, with the same six sections: Shop skill, UCP integration, interaction guidelines, read-only browsing, store policies and platform. None had been customized. Source: [Cart for Agents: agents.md for online stores, How we checked](https://cartforagents.com/guides/agents-md#how-we-checked) (2026-11-07; observed).
6. Seven of the 13 files linked three store policies with no shipping policy. On all seven of those stores, the shipping policy address either loaded with no policy text (six) or returned "not found" (one). Source: [Cart for Agents: agents.md for online stores, How we checked](https://cartforagents.com/guides/agents-md#how-we-checked) (2026-11-07; observed).
7. Four storefronts whose response headers said "powered-by: Shopify, Oxygen, Hydrogen" returned "not found" at /agents.md on their main domain. One other store redirected /agents.md to a Shopify-hosted checkout subdomain, which served the default file. Source: [Cart for Agents: agents.md for online stores, How we checked](https://cartforagents.com/guides/agents-md#how-we-checked) (2026-11-07; observed).
8. In 7 of 12 store robots.txt files we fetched, comment lines pointed agents to /agents.md and the store's UCP endpoints. The default /agents.md response also carried a Link header pointing to /.well-known/ucp. Source: [Cart for Agents: agents.md for online stores, How we checked](https://cartforagents.com/guides/agents-md#how-we-checked) (2026-11-07; observed).
9. AGENTS.md is an open format for guiding coding agents, described as "a README for agents", used by over 60,000 open-source projects and stewarded by the Agentic AI Foundation under the Linux Foundation. Source: [AGENTS.md](https://agents.md/) (2026-11-07; documented).
10. Shopify says the agents.md.liquid template is not the same as a theme-root AGENTS.md file: the template renders a public page for shopping agents, while the theme-root file gives coding agents context about how the theme is built and isn't served on the storefront. Source: [Shopify.dev: agents.md.liquid](https://shopify.dev/docs/storefronts/themes/architecture/templates/agents-md-liquid) (2026-11-07; documented).
11. Ahrefs found that no AI bot requested an llms.txt file that didn't exist; agents fetch such files when something links to them or a user tells them to. Source: [Ahrefs: We Analyzed 137K Sites: 97% of llms.txt Files Never Get Read](https://ahrefs.com/blog/llmstxt-study) (2026-11-07; observed).

## Limitations

- Nobody has published data on how often shopping agents read agents.md, or whether its content changes what they recommend.
- Our 13 stores are well-known brands we picked by hand, fetched once from a US server on November 7, 2026. Store names are withheld.
- Shopify writes and updates the default file. Its wording on your store may already differ from the example here.
- The link between an empty shipping policy and a missing link in agents.md is our inference from seven stores; Shopify doesn't spell it out.
