How AI agents actually read your site

The short answer

AI agents read your site through four surfaces, in this order: robots.txt tells them whether they may enter, llms.txt tells them where the useful content lives, JSON-LD gives them machine-readable facts, and your HTML is what they parse when nothing else answers. If any surface contradicts another, the agent has to guess. TheBotStack's Agent Score measures how well an agent can discover, ingest and interact with your site and its APIs.

What do AI agents read on a website?

In practice: robots.txt for access rules, llms.txt when present for a curated page index, JSON-LD structured data for facts, and the semantic HTML itself for content. Sites fail when one of these contradicts the others or is missing.

The four surfaces, in reading order

An agent does not see your site the way a visitor does. It checks permissions first, looks for a curated map next, reaches for structured data when it needs facts, and falls back to raw markup last. Each surface has one job, and each has a typical way of failing. Fix them in this order, because an error early in the sequence undermines everything after it.

  • robots.txt: declares access for known crawlers with user-agent and disallow/allow directives. Failure mode: contradicted rules, such as a blanket disallow that overrides an allow you meant to apply.
  • llms.txt: a plain-text guide that points agents to the pages worth reading. Failure mode: a stale file that lists moved or deleted URLs, or pages that robots.txt blocks.
  • JSON-LD: structured data in a script element of type application/ld+json, the W3C-recommended way to embed machine-readable data. Failure mode: missing entirely, so the agent infers facts from prose.
  • HTML: the fallback every agent can parse. Failure mode: div-soup with no headings, landmarks or lists, so structure and meaning are lost.

Where sites usually fail

Most failures are not exotic. They come from files written once and never revisited, or from one team changing a rule without telling another. TheBotStack checks for these patterns directly, and the Agent Score reflects them. You can find most of them in an afternoon with a text editor and a browser's view-source.

  • robots.txt blocks a path that llms.txt recommends, so the agent is told to read a page it is not allowed to fetch.
  • llms.txt links to URLs that redirect, return errors or no longer exist, which wastes the agent's first impression of your site.
  • Pages carry no JSON-LD, or the JSON-LD describes content that no longer matches the visible page.
  • Key content sits in generic div elements with no headings, so an agent cannot tell a title from a footnote.
  • Important facts appear only inside scripts or images, leaving nothing in the parsed text for an agent to ingest.