中文
All Agent Engineering

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
Applies to
  • General Both files are general conventions described on their own official pages, not tied to a single tool[1][2]

File locations

PathScopeHow it is read
/llms.txtSite root path; also any subpath such as /docs/llms.txtAIs and agents reading site content, on demand[1]
./AGENTS.mdRepository root; large monorepos can add one per subprojectCoding agents working in the repository, reading the nearest file[2]

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

llms.txt vs AGENTS.md (official pages)
Aspectllms.txtAGENTS.md
Who reads itReaders 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 topicCoding agents: agents.md describes it as guidance for coding agents, like a README for agents
Where it livesThe site root path /llms.txt, or any subpath such as /docs/llms.txt, covering the pages under that pathThe repository root; large monorepos can add another one in each subproject
What it containsMarkdown: an H1 with the site name, a blockquote summary, H2 sections with link lists pointing to AI-friendly contentPlain Markdown with no required fields; common content is build and test commands and code style
Which file winsWhere more than one file applies, agents should use the most specific oneAgents read the nearest file in the directory tree and the closest one takes precedence

[1][2]

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 website authors: writing llms.txt

The format llmstxt.org describes is, in order: an H1 (the only required part), a blockquote summary, zero or more non-heading sections of details, and zero or more H2-delimited file lists; each list item is [name](url), optionally followed by a colon and notes. An H2 named Optional holds secondary information by convention, which agents can skip when context is tight.[1]

Below is the beginning of this site's own llms.txt at ai.nav.city, shown to illustrate those structural elements; it is this site's own example, not an official template.[1]

Example: the beginning of https://ai.nav.city/llms.txt (read on 2026-10-28)
# AI Nav City

> AI Nav City 是 AI工具导航与选型资料站:按任务与条件发现 AI 工具,每个工具列出已核验官网的用途、价格条件与来源。
> AI Nav City is an AI tool directory and selection notes site: find AI tools by task and conditions, with each tool listing its purpose, pricing conditions and sources checked against official pages.

## 中文入口

- [中文首页:AI工具导航与选型资料](https://ai.nav.city/zh/)
- [按任务选工具](https://ai.nav.city/zh/tasks/)
- [了解核验与推荐方法](https://ai.nav.city/zh/methodology/)

[1]

  • llmstxt.org says it differs from sitemap.xml: a sitemap lists all indexable pages, while llms.txt is a curated overview for AI.
  • llmstxt.org says it differs from robots.txt: robots.txt tells automated tools what access is acceptable, while llms.txt is used on demand when an agent needs information to help a user.
  • llmstxt.org also proposes providing .md versions of pages and suggests standard link relations such as rel="alternate" and rel="describedby" to help clients find them.

[1]

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.

[2]

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.

  1. llmstxt.org · The /llms.txt file, v2 – llms-txt
  2. agents.md · AGENTS.md

Found an error? Tell us →