agents.md gets talked about as a Shopify thing because Shopify generates one for every store automatically. But the file itself is a web convention, not a platform feature. Any store on any stack can serve one, and as more shoppers search inside AI assistants, any store benefits from doing so. Here's how to serve agents.md when the platform doesn't hand it to you.
What agents.md actually is
Stripped of Shopify specifics: agents.md is a Markdown file served at yourdomain.com/agents.md that tells AI shopping agents three things, what your store is, what it sells, and how to transact with it. It's the agent-facing front door, the way robots.txt is the crawler-facing one. We compare the three root files in robots.txt vs llms.txt vs agents.md.
The only hard requirement is that it resolves at the bare domain root at /agents.md, with a Markdown content type. Everything else is content.
Serving it on different stacks
The file is the same everywhere; only how you serve it changes.
| Platform | How to serve /agents.md |
|---|---|
| Static site (Astro, plain HTML, etc.) | Drop an agents.md file in your public/ root so it's served at /agents.md |
| Next.js (App Router) | A route handler at app/agents.md/route.ts returning the Markdown with Content-Type: text/markdown |
| Headless Shopify (Hydrogen) | A resource route at app/routes/[agents.md].tsx that returns the Markdown |
| Other frameworks (Nuxt, SvelteKit, Remix) | A server route at /agents.md returning Markdown |
| WooCommerce / WordPress | A template or a small plugin/route that outputs the file at the root path |
The pattern is identical: respond to GET /agents.md with your Markdown and the right content type. Generate it from your data at build or request time so it stays current rather than hand-editing a static blob.
What to put in it
Use the same checklist as a Shopify store (the full version is here):
- Identity and positioning — what you are, who it's for, why buy from you.
- A capabilities summary — currencies, where you ship, returns window, subscriptions. The scannable "can you serve my shopper" block.
- What you sell — your real categories, in priority order.
- Most popular and featured products — what to recommend when the shopper is vague.
- Ratings and policies — proof, and the shipping/returns answers agents need before recommending a buy.
- Transaction rails — if your platform exposes a commerce API or an MCP endpoint, point at it so agents can check out programmatically. If not, list your read-only browsing URLs so agents can at least navigate.
And the same exclusions: no private data (contact email, phone), no discount codes that go stale, no system or internal pages.
The transaction rails are the platform-specific part
On Shopify, the file points at the platform's UCP discovery and MCP endpoints (explained here). Off Shopify, you point at whatever your stack offers. If you've stood up an MCP server or a commerce API, name it and describe the flow so agents transact the supported way. If you haven't, a descriptive agents.md still earns its keep: agents that understand what you sell and why can recommend you and send shoppers to your normal checkout, even without programmatic buying.
In other words, the descriptive half works on any stack today; the transactional half depends on what your platform exposes.
Keeping it current is the same problem everywhere
Whatever the platform, the file is a snapshot, and snapshots go stale. Generate it from live data and rebuild it when your store changes, rather than hand-maintaining a static file that drifts. The dynamics are the same as we cover in why your agents.md goes stale; only the hosting differs.
If you're on Shopify, it's easier
This is the one place the platform matters. On Shopify you don't serve the file yourself, the platform serves it, and you customize it with a templates/agents.md.liquid template. AgentReady generates a brand-specific one from your live store and keeps it current, free. On other platforms you own the hosting and the generation, using the structure above.
Either way, the free AI-readiness checker fetches any store's /agents.md and reports what an agent sees, a quick way to confirm yours resolves and reads the way you intend.
Run the checker to see what an AI agent reads about your store today.

Comments
Every comment here comes from a verified email. Write yours, confirm from your inbox, and it's live.
Loading comments…