llms.txt vs AGENTS.md

Both are Markdown files meant for AI, and both sit at a root. They answer different questions for different readers: one describes a website, the other explains how to work on a codebase.

Last updated

llms.txt is for websites. AGENTS.md is for code repositories. In the words of the llms.txt proposal at llmstxt.org, llms.txt is a way “to provide information to help agents use a website”. agents.md calls AGENTS.md “a README for agents: a dedicated, predictable place to provide the context and instructions to help AI coding agents work on your project.”

llms.txtAGENTS.md
ForAI tools and agents reading a websiteAI coding agents working in a code repository
Where/llms.txt at the site root, or under a path such as /docs/llms.txtThe repository root, plus one inside any package; agents read the nearest file
What goes in itA title, a short summary and lists of links to the pages that matterSetup and test commands, code style, testing, security notes, pull request rules
FormatMarkdown with a fixed shape (H1, summary, H2 link lists)Plain Markdown, any headings
Who reads itOptional: each AI company decides; Google Search ignores itCoding tools that support it, such as Codex, Jules, Cursor, Gemini CLI and GitHub Copilot’s coding agent, among others listed on agents.md
StatusA proposal (V2, August 2026)An open format stewarded by the Agentic AI Foundation under the Linux Foundation

Which one do you need?

  • You run a website and don’t ship code in public: only llms.txt is relevant, and it is optional. The honest answer on whether you need one covers when it helps.
  • You maintain a code project: AGENTS.md helps the coding agents your contributors use. llms.txt is not needed for the repository itself.
  • You publish developer documentation: both can make sense. AGENTS.md in the repository for people changing the code, and llms.txt on the docs site for tools answering questions about it.

Can one file do both jobs?

No. They are found in different places by different tools: a coding agent looks for AGENTS.md in the folder it is working in, while an AI tool reading your site asks for /llms.txt on your domain. Some coding tools also read their own file names, such as Claude Code’s CLAUDE.md; AGENTS.md is the shared name many tools agreed on.

To make the website file, use the llms.txt generator and check the result with the validator. The llms.txt format guide covers the fixed shape.

Frequently asked questions

Is AGENTS.md a replacement for llms.txt?

No. AGENTS.md guides coding agents inside a code repository; llms.txt describes a website. A project can use both.

Where do I put AGENTS.md?

At the root of the repository, and optionally one inside each package; agents read the nearest file in the folder tree (agents.md).

Does AGENTS.md help my website rank?

No. It lives in a code repository, not on your site. Neither file is a search ranking signal.