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.txt | AGENTS.md | |
|---|---|---|
| For | AI tools and agents reading a website | AI coding agents working in a code repository |
| Where | /llms.txt at the site root, or under a path such as /docs/llms.txt | The repository root, plus one inside any package; agents read the nearest file |
| What goes in it | A title, a short summary and lists of links to the pages that matter | Setup and test commands, code style, testing, security notes, pull request rules |
| Format | Markdown with a fixed shape (H1, summary, H2 link lists) | Plain Markdown, any headings |
| Who reads it | Optional: each AI company decides; Google Search ignores it | Coding tools that support it, such as Codex, Jules, Cursor, Gemini CLI and GitHub Copilot’s coding agent, among others listed on agents.md |
| Status | A 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.