Spec file
llms.txt and AGENTS.md are not the same thing: a site entry point vs repo instructions
llms.txt is an entry point for AIs reading a website; AGENTS.md instructs coding agents in a repo. Neither guarantees inclusion or traffic. Not tested.
The names look alike but the jobs differ: one lives on a website, the other in a code repository. This article follows the official pages, treats the two files separately, and addresses website authors and repository maintainers in different sections.
- Verified
- · Not tested by us
When to use
- You run a website or docs site and want a short entry point for AI that links to Markdown content.[1]
- You maintain a code repository and want to give coding agents build, test and style instructions.[2]
- Someone treats the two files as the same thing and you need a comparison of who reads each and where it lives.[1][2]
When not to use
- You expect an llms.txt file to get you included or bring visits: neither official page promises that.[1][2]
- You want to control whether crawlers may access your site: the llms.txt page says that is the role of robots.txt.[1]
- You want coding agents in your repository to follow project docs written in llms.txt: that is what AGENTS.md is for.[2]
Who reads each file and where it lives
| Aspect | llms.txt | AGENTS.md |
|---|---|---|
| Who reads it | Readers of a website's content: llmstxt.org says it helps agents use a website, and agents read it on demand when they need information on a topic | Coding agents: agents.md describes it as guidance for coding agents, like a README for agents |
| Where it lives | The site root path /llms.txt, or any subpath such as /docs/llms.txt, covering the pages under that path | The repository root; large monorepos can add another one in each subproject |
| What it contains | Markdown: an H1 with the site name, a blockquote summary, H2 sections with link lists pointing to AI-friendly content | Plain Markdown with no required fields; common content is build and test commands and code style |
| Which file wins | Where more than one file applies, agents should use the most specific one | Agents read the nearest file in the directory tree and the closest one takes precedence |
The official pages position them as different, complementary things: llms.txt is an entry description for a website, AGENTS.md is working instructions inside a repository.[1][2]
Version scope: the llmstxt.org page is titled v2; the agents.md page states no document or format version, so it is taken as read on the verification date 2026-10-28.[1][2]
For repository maintainers: using AGENTS.md
The agents.md site's approach: create an AGENTS.md at the repository root covering things like a project overview, build and test commands, code style, testing instructions and security considerations; large monorepos can add one in each package, and agents read the nearest one.[2]
- The site says there are no required fields; use any headings you like.
- The site says that when instructions conflict, the AGENTS.md closest to the edited file wins, and explicit user chat prompts override everything.
- The site says that if you list test commands in AGENTS.md, the agent will attempt to run the relevant checks and fix failures.
- For how a specific tool such as Claude Code reads AGENTS.md, see that tool's official docs.
No guarantee of inclusion or traffic
llmstxt.org describes a proposed file format and how to use it; the page does not say that publishing an llms.txt gets a site included anywhere or brings visits, so that promise is Not stated officially. The agents.md site likewise only covers the format and use of AGENTS.md. This article makes no such guarantee either: putting a file in the right place only gives readers a ready entry point.[1][2]
Sources
All links are official pages; verification dates are listed per source, and links point to the version checked.