How to Build Agent-Friendly Websites: A Practical Guide to AEO, llms.txt, and the New Web for AI Agents
What AEO (Agent Experience Optimization) means, why it matters, and practical steps to make your website discoverable and useful to AI agents — including llms.txt, Markdown content, semantic HTML, and structured discovery.
The web is no longer visited only by humans.
Your next visitor might be a person scrolling on their phone. It might also be an AI assistant researching vendors, comparing products, summarizing your docs, helping someone make a purchase, or trying to complete a task on behalf of a user.
That changes how websites need to be designed.
For years, we optimized websites around human experience and search engines: fast pages, clear navigation, good copy, semantic HTML, metadata, and SEO. Those things still matter. But AI agents introduce a new kind of visitor: one that reads, reasons, extracts, cites, and acts.
If your site is hard for agents to understand, they will skip it, misrepresent it, or fail to use it. If your site is agent-friendly, it becomes easier to discover, easier to cite, easier to operate, and easier to build on top of.
This is where AEO — Agent Experience Optimization — starts to matter.
What is AEO?
AEO is the practice of making your website understandable and useful to AI agents.
It is related to SEO, but it is not the same thing.
SEO asks: Can search engines discover, index, and rank this page?
AEO asks: Can an AI agent understand this site, trust the content, and complete the user’s goal?
That goal might be simple, like summarizing a blog post. It might be commercial, like comparing SaaS vendors. It might be transactional, like adding an item to a cart, booking a demo, or retrieving account information.
AEO is about the full agent experience:
- Can the agent discover the most important pages?
- Can it parse the content without wasting tokens on navigation, scripts, and layout noise?
- Can it understand what the company does, who it serves, and what actions are possible?
- Can it find pricing, docs, support, policies, and API references?
- Can it distinguish authoritative content from marketing fluff?
- Can it safely interact with the site when actions, auth, checkout, or user data are involved?
A website that only looks good to humans is no longer enough. A modern website needs to communicate clearly to both humans and agents.
AEO vs. an agent-friendly website
It is useful to separate the strategy from the implementation.
AEO is the strategy. It covers how your website should be discovered, interpreted, cited, and used by agents.
Agent-friendly web design is the implementation. It is the technical work that makes the strategy real.
That implementation includes things like:
- clean semantic HTML
- accessible navigation and controls
- structured metadata
- useful sitemap and robots rules
- an
llms.txtfile - Markdown versions of important pages
- content negotiation with
Accept: text/markdown - API discovery for applications
- MCP or other agent-facing protocol surfaces where useful
- clear policies around bot access, training, search, and agent use
The important point: AEO is not a single file or checklist item. It is a way of designing the whole site so agents can understand the business and help users accomplish real tasks.
The current state of the internet
The internet is in an awkward transition period.
Most websites were designed for people and search crawlers. Many depend heavily on JavaScript, visual layout, tracking scripts, dynamic rendering, and UI patterns that assume a human is clicking around with full visual context.
Agents experience those sites differently.
They may browse through a headless browser. They may request raw HTML. They may prefer Markdown. They may summarize content into a context window. They may rely on the accessibility tree to understand controls. They may need to decide whether your page is authoritative enough to cite.
That means old assumptions break down.
A beautiful page can still be hostile to agents if the core content is buried behind client-side rendering, vague headings, inaccessible components, or bloated markup. A technically functional site can still be confusing if it does not explain what it does in a way agents can easily extract.
The best websites of the next few years will be designed for both audiences:
- Humans, who need trust, clarity, brand, visual hierarchy, and conversion paths.
- Agents, who need structure, concise content, machine-readable discovery, and safe ways to take action.
The standards are still evolving
This space is moving fast. The standards are not fully settled, and they are changing month by month.
That does not mean you should wait.
It means you should start with the standards that are already useful, low-risk, and easy to implement.
One practical reference point is Cloudflare’s agent-readiness ecosystem. Their scanner at isitagentready.com checks for emerging patterns like robots.txt, sitemap support, Markdown negotiation, content signals, MCP discovery, OAuth discovery, Agent Skills, and commerce-related protocols.
Cloudflare also tracks adoption of AI agent standards through Cloudflare Radar AI Insights, which is useful because the landscape is not static.
The key lesson: do not treat agent-readiness as a one-time checkbox. Treat it as an evolving capability of your website.
Practical starting points
Different sites need different levels of agent support.
A SaaS marketing site is different from an ecommerce store. A documentation site is different from an authenticated web app. A purely informational site does not need the same agent-facing surface as a transactional product.
But almost every site can start with a small set of fundamentals.
1. Publish an llms.txt file
Add an llms.txt file at the root of your website.
Think of it as a curated map for AI agents. It is similar in spirit to a sitemap, but written for reasoning systems instead of search crawlers.
A good llms.txt should explain:
- what the site is
- who it is for
- the most important pages
- where docs, pricing, support, policies, and product information live
- which pages are authoritative starting points
- any pages agents should avoid or treat carefully
It should be concise. Agents do not need your entire website dumped into one file. They need a useful entry point.
2. Provide Markdown versions of important pages
Markdown is one of the most agent-friendly content formats because it preserves structure without carrying the noise of a rendered webpage.
For content-heavy sites, provide Markdown versions of key pages:
- blog posts
- documentation
- product pages
- pricing pages
- case studies
- help center content
- policy pages
There are two common approaches:
- expose
.mdversions of pages directly, such as/blog/post.md - support content negotiation, where agents request
Accept: text/markdownand receive a Markdown response
Cloudflare’s Markdown for Agents is an example of this direction. When enabled, agents can request a page with Accept: text/markdown, and the site can return a cleaner Markdown representation instead of full HTML.
This matters because agents operate within context windows. Token waste is real. A clean Markdown page is easier to summarize, cite, and reason about than a noisy HTML document full of menus, footers, scripts, and layout wrappers.
3. Keep semantic HTML and accessibility strong
Agent-friendly does not mean ignoring the human website. In fact, many agent-friendly improvements are the same things that make websites better for humans.
Use proper headings. Make links descriptive. Label buttons and forms clearly. Avoid hiding core content behind fragile scripts. Make navigation predictable. Ensure interactive controls are accessible.
Modern agents often rely on the same structural signals used by assistive technologies. If your website is inaccessible, it is usually harder for agents too.
4. Make content easy to trust
Agents need to know what content is authoritative.
Make important facts explicit:
- company description
- product positioning
- pricing and plan details
- service areas
- contact and support paths
- update dates
- authorship
- policy ownership
- canonical links
Avoid burying key facts inside vague marketing copy. Agents are good at summarizing, but they are not magic. If your site does not clearly say what you do, agents will infer — and sometimes infer badly.
5. Add structured discovery for applications
For SaaS products, marketplaces, ecommerce sites, and apps, content is only part of the problem.
Agents also need to understand actions.
Can a user book a demo? Search inventory? Create a ticket? Retrieve an invoice? Add something to cart? Start a return? Call an API?
Where appropriate, expose structured ways for agents to discover capabilities:
- OpenAPI specs
- OAuth discovery
- protected resource metadata
- MCP server cards
- Agent Skills
- API catalogs
- clear docs for authenticated workflows
The goal is not to let agents do everything blindly. The goal is to make supported actions explicit, safe, and reliable.
A minimum viable agent-ready checklist
If you are just starting, this is a practical baseline:
robots.txtexists and includes clear sitemap references- sitemap is current and includes important canonical pages
llms.txtexists at the site root- important content pages have Markdown equivalents or support
Accept: text/markdown - pages use semantic headings and descriptive links
- core content is available without relying entirely on client-side rendering
- metadata clearly describes the page and organization
- important pages include canonical URLs and updated dates where useful
- docs, pricing, contact, support, and policies are easy to find
- APIs or app capabilities are documented in machine-readable formats where relevant
- access, auth, checkout, and user-data boundaries are explicit
This is not the finish line. It is the starting line.
Why Astro is a strong fit for agent-friendly sites
At Callstack Labs, we use Astro to build websites that are polished for humans and readable for agents.
Astro gives us full control over presentation and structure. That matters because agent-friendly websites are not just about generating pages — they are about controlling exactly how content, metadata, routing, and alternate representations work.
With Astro, we can build polished human experiences while also supporting agent-facing needs like:
- static or server-rendered content
- clean semantic HTML
- fast pages with less JavaScript by default
- content collections for structured publishing
- Markdown-first authoring workflows
- custom
.mdroutes for pages and posts - site-wide
llms.txtgeneration - precise metadata and sitemap control
- integration with APIs, docs, and agent-facing protocols
That combination is powerful. You do not have to choose between a great human website and a useful agent-readable website. With the right architecture, you can have both.
The bigger shift
Agent-friendly websites are not a gimmick. They are part of a larger shift in how people use the internet.
Users will increasingly ask agents to research, compare, summarize, buy, book, configure, and operate software for them. When that happens, your website is no longer only a destination. It becomes an interface for delegation.
If your site is hard for agents to understand, you become invisible or unreliable in those workflows.
If your site is agent-friendly, you give agents the context they need to represent you accurately and help users take action.
The companies that adapt early will have an advantage. They will be easier to discover, easier to cite, easier to integrate with, and easier for agents to use on behalf of real people.
The web is becoming agent-mediated.
Design accordingly.