llms.txt for ecommerce stores: what to include
llms.txt is a Markdown file at /llms.txt that gives AI agents a curated map of a site. For an ecommerce store it should start with the store name, then link collections, search, shipping, returns, contact and any agent endpoints such as a UCP profile or sitemap. It is a low-weight, contested signal.
Updated · By the Medusa team
- Category
- Discovery (15% of score)
- Impact
- Low
- Scanner check
- /llms.txt or /agents.md guides agents to your catalog
Why it matters for AI agents
/llms.txt is a proposed convention for a Markdown file at the site root that tells language models and AI agents what a site is and where its important content lives. The format is simple: a required H1 with the site name, a blockquote summary, then H2 sections containing Markdown link lists.
For a store, llms.txt works as a curated entry point. Instead of crawling navigation, an AI shopping agent can learn in one request where the collections are, how search works, what the return policy says, and whether the store exposes agentic commerce endpoints (see agentic commerce protocols).
The evidence is mixed, which is why this check has the lowest weight:
- Against: Google says Search does not use AI text files like llms.txt (Google AI optimization guide), and no major assistant documents reading it.
- For: Chrome Lighthouse’s Agentic Browsing category includes an llms.txt audit, and at least one large hosted commerce platform began serving
/llms.txton its stores by default in 2026. Coding agents read it when pointed at it.
What the scanner checks
The scanner requests /llms.txt and /agents.md. A file counts as found when it returns a successful status, its content type is not text/html, and the body does not start with <!doctype or <html (this filters out storefronts that answer every path with an HTML page). If both exist, /llms.txt is graded.
| Result | When |
|---|---|
| Pass | File has a # title line, at least one link (Markdown link or http(s):// URL), and mentions commerce topics: products, collections, catalog, shop, policies, shipping, returns, refunds, cart, checkout, UCP or MCP |
| Partial | File exists but is missing one or more of the three above |
| Fail | Neither file exists (or /llms.txt returns a server error) |
How to fix it
Create /llms.txt with links an agent would actually use. An example for a store:
# Example Outfitters
> Outdoor apparel and socks. Ships to the US and Canada. Prices in USD.
## Catalog
- [All products](https://shop.example.com/collections/all)
- [Socks](https://shop.example.com/collections/socks)
- [Search](https://shop.example.com/search?q={query}): replace {query} with search terms
## Policies
- [Shipping](https://shop.example.com/pages/shipping): rates and delivery times
- [Returns and refunds](https://shop.example.com/pages/returns): 30-day returns
- [Contact](https://shop.example.com/pages/contact)
## For agents
- [Sitemap](https://shop.example.com/sitemap.xml)
- [UCP profile](https://shop.example.com/.well-known/ucp)
Only list endpoints you actually serve. Then:
- Serve it at
/llms.txtwith HTTP 200 andContent-Type: text/markdown(ortext/plain). - Optionally mirror it at
/agents.md. - Keep the links current; an llms.txt that points to deleted collections is worse than none.
- Verify:
curl -i https://shop.example.com/llms.txtreturns 200 and a body starting with#.
Common mistakes
- Catch-all routes that return the homepage HTML with 200 for
/llms.txt. The scanner treats this as missing. - Copying a docs-site template that links blog posts and the About page but no collections, search or policies.
- Listing endpoints that don’t exist, such as an MCP URL you never deployed.
How to fix it on Medusa
Medusa’s DTC starter storefront does not ship an llms.txt, so add one to the Next.js app:
- A static file at
public/llms.txt, or - A route handler at
app/llms.txt/route.tsthat returnstext/markdown(Next.js route handlers). A route handler can build the collection links from the Store API, so the file stays current.
Link your regions, top categories, the search URL and your policy pages. For real-world examples of the format, see medusajs.com/llms.txt and docs.medusajs.com/llms.txt. The Medusa agent-readiness guide covers the rest of the starter’s gaps.
Sources
Frequently asked questions
- Does Google use llms.txt?
- No. Google Search says it does not use llms.txt or other AI text files. Chrome Lighthouse does audit llms.txt in its Agentic Browsing category.
- What should an ecommerce llms.txt include?
- An H1 with the store name, a one-line summary, and sections of links to main collections, a search URL pattern, shipping, returns, contact and FAQ pages, plus agent endpoints like a UCP profile, MCP server or sitemap.
- What is the difference between llms.txt and agents.md?
- Both are Markdown guides for AI clients. llms.txt follows the llmstxt.org proposal; agents.md is a newer convention some stores also serve. The scanner accepts either file.
- What content type should llms.txt use?
- Serve it with HTTP 200 as text/markdown or text/plain. If it comes back as an HTML page, clients and the scanner treat it as missing.
Run your store on a platform built for agentic commerce
Medusa is open-source, headless commerce with a full Store API agents can call and storefronts you control end to end.
Deploy on Medusa Cloud
Open-source commerce with a full Store API, hosted and scaled for you. Your storefront, your data model.
Storefront skills for coding agents
Teach Claude Code, Cursor or Codex to build storefronts with the patterns these checks look for.
npx skills add medusajs/medusa-agent-skills