--- url: "https://web.dev/articles/ai-agent-site-ux" titulek: "Build agent-friendly websites | web.dev" h1: "Build agent-friendly websites Stay organized with collections Save and categorize content based on your preferences." popis: "When designing your websites for agents and humans, you can follow similar best practices. Learn what they are." jazyk: "en" kanonicka: "https://web.dev/articles/ai-agent-site-ux" drobecky: ["web.dev", "Resources"] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-13 23:12:29" znaku: 5556 slov: 857 kodovani: "iso-8859-2" sha256: "bf0346df440d10b071b6565281610d450379d1725c85726fb28f540f62fdb8e5" --- Build agent-friendly websites Stay organized with collections Save and categorize content based on your preferences. Kasper Kulikowski Omkar More Your website has a [new type of visitor](/articles/ai-agents). Some human users are pivoting from manual navigation to delegating goal-oriented journeys to AI agents. Those autonomous systems can interpret input, plan, and execute actions on behalf of a user. However, many of our websites are designed to be beautiful for humans, with complex hover-states, shifting layouts, and fluid motion. This is functionally broken for agents. How agents view your site Agents don't look at your website on a monitor. They operate on a machine-readable representation of your site. The quality of this representation determines their performance. Agents can view your website in 3 primary ways: screenshots, raw HTML, and the [accessibility tree](/articles/the-accessibility-tree). Screenshots The agent takes a snapshot of the rendered page and uses a vision model to identify elements. Based on the screenshot, the agent can recognize that a search bar at the top-right is a global search, while a box in the middle is likely a form field. Visual cues can be helpful, as agents can use color, size, and proximity to determine importance. A big **Delete** button will likely be interpreted with more caution than a small "Help" link. However analyzing screenshots can be slow and expensive (in terms of used tokens), making it better as a backup when the structure is confusing. HTML The agent analyzes the DOM and reads the HTML. It understands how elements are nested, the logical hierarchy of the DOM tree, attributes like IDs and classes that define structure, and raw data strings that form the site's informational backbone. This helps the agent understand the relationship between elements. If a **Buy Now** button is inside a product container, the agent assumes that button belongs to *that* specific product. Accessibility tree The accessibility tree is a browser-native API distills the DOM into what's most important: roles, names, and states of interactive elements. It's the page's semantic summary, used by assistive technology. For an AI agent, it functions as a high-fidelity map that ignores the visual "noise" of CSS to focus on pure utility. By interpreting this tree, an agent can learn the functional intent of every toggle, slider, and input field. Combined modalities Relying on a single input creates a semantic gap. For example, in the DOM, an agent might see a `