Skip to content
Agent Friendly Code

llms.txt vs AGENTS.md: what each file is for

llms.txt is a Markdown file at a website's root that tells a language model where the useful pages are. AGENTS.md is a Markdown file in a code repository that coding agents load before they change anything. Different readers: someone's model reading your docs, and an agent working in your code.

What is llms.txt?

A proposal by Jeremy Howard (llmstxt.org, September 2024) for a /llms.txt Markdown file that gives websites LLM-friendly content. It sits at the site root, or at a path within it covering the pages below. Its spec notes it is used most for software documentation, where coding agents follow it to API references and tutorials.

  1. An H1 with the project or site name: the only required section.
  2. A blockquote with a short summary.
  3. Optional paragraphs of detail, without headings.
  4. H2 sections of link lists: [name](url): notes.
  5. An optional ## Optional section for links a reader can skip.

The same proposal suggests serving a Markdown copy of each page at its URL plus .md.

llms.txt vs AGENTS.md: what's the difference?

llms.txt and AGENTS.md compared
llms.txtAGENTS.md
Lives athttps://your-site/llms.txtThe repo root, and optionally each package
ReaderA model or tool fetching your websiteA coding agent working in a checkout of the repo
ContentA curated index of links to your docsCommands, layout, conventions and traps for changing the code
FormatMarkdown with a fixed order: H1, summary, link listsPlain Markdown, no required fields
Specllmstxt.orgagents.md
Loaded howFetched over HTTP when a tool decides toRead automatically by most coding agents before they work

Do coding agents read llms.txt in a GitHub repo?

Not as an instruction file. None of the agents we checked (Claude Code, Codex, Cursor, Copilot, Gemini CLI, OpenCode, Devin, Aider, Kiro, Antigravity) document reading an llms.txt from your repository. Their docs name the files they load (AGENTS.md, CLAUDE.md, GEMINI.md, rule directories), and llms.txt isn't one.

An agent may still open it like any other file, or fetch a library's llms.txt from the web when looking up docs. To have an agent in your repo use it, give its path and purpose in AGENTS.md.

Where does llms.txt go in a GitHub repo?

In the folder your docs site serves at its root (public/, static/), so the build publishes it at /llms.txt. A copy at the repo root is served by nothing; GitHub just shows it as a file.

A docs site that ships llms.txt, beside the repo's AGENTS.md

AGENTS.md                # for agents changing this code
docs/
  static/
    llms.txt             # served at https://docs.example.com/llms.txt
  src/...

How many popular repos ship an llms.txt?

We read the whole file tree of 388 GitHub repos on our board on 2026-11-16. 16 contain an llms.txt or llms-full.txt somewhere; 4 of them keep one at the repo root, the rest in subfolders, mostly a docs site's public/ or static/. 218 have an AGENTS.md.

So projects that write an llms.txt mostly treat it as part of their website, which it is.

When is each one worth writing?

  • Write AGENTS.md if anyone works on the repo with a coding agent. The agent reads it first, and it pays back on every task.
  • Write llms.txt if you publish docs other people's agents read (a library, an API, a CLI). It helps a model find the right page without crawling the site.
  • A library with a docs site wants both. An app with no public docs needs only AGENTS.md.
  • Don't copy one into the other. llms.txt lists links for users of your software; AGENTS.md tells contributors' agents how to build and test it.

llms.txt vs MCP?

llms.txt is a static file a model can fetch. MCP (Model Context Protocol) is an open standard for connecting AI applications to external systems, such as data sources and tools, to query or act through. A docs MCP server can answer searches; an llms.txt only points to pages.

Questions people ask

Is llms.txt a standard?
It is a proposal published at llmstxt.org, not a standards-body standard. Some documentation sites publish one, but no tool requires it or AGENTS.md.
Does Claude Code read llms.txt?
Its memory docs don't list it among the files it loads. A CLAUDE.md can import any file with @path, so @docs/static/llms.txt would load it, at a context cost every session.
Should I put llms.txt in the root of my repo?
Only if your website is served from the repo root, as on some static hosts. Otherwise put it where your docs site serves files at its root.
Can AGENTS.md replace llms.txt?
No. AGENTS.md is read from a checkout of your repo; a model reading your documentation website never sees it.
What is llms-full.txt?
A name some sites use for one file holding their full docs as Markdown. The llms.txt proposal doesn't define it.

From the docs: llmstxt.org (new tab) · agents.md (new tab) · modelcontextprotocol.io/intro (new tab) · code.claude.com/memory (new tab) · learn.chatgpt.com/agents-md (new tab)

Check your AGENTS.md · AGENTS.md examples · What each agent reads · One file for every agent · All guides