Table of Contents
Key Takeaway
- 📌 What it is: an AGENTS.md file is a plain Markdown file at your repo root that tells AI coding agents how your project builds, tests and behaves. It is a README for agents, not for humans.
- 🌍 The scale: the official spec site counts more than 60,000 open-source projects using one today, and more than 20 tools read it natively, from OpenAI Codex and Google Jules to Cursor, Devin, Windsurf and JetBrains Junie.
- ⚙️ What earns its bytes: real setup commands, real test commands, style rules and security notes. Agents run the commands you list, so vague prose buys you nothing.
- 🤝 One file, every tool: teams make AGENTS.md the single source of truth and give Claude Code a one-line CLAUDE.md that imports it, which kills the drift that breaks multi-agent repos.
- 🕰️ Keep it alive: stale commands are worse than none. Treat the file as living documentation the same day your build steps change.
More than 60,000 open-source projects now carry the same file in their repositories, and the number is searched live on GitHub. It is not a license file, not a config file, not another YAML tax. It is the AGENTS.md file, a plain Markdown sheet that sits next to your README and tells every AI coding agent what it needs to know before it touches a line of your project. If your repo has no AGENTS.md file, every agent you use guesses. When it guesses wrong, it installs nothing, runs the wrong test runner, or writes a pull request your team cannot merge. This guide explains what an AGENTS.md file is, exactly which agents read it, what belongs inside one, and how to keep a Claude-centric and Codex-friendly codebase working from the same source of truth.
What Is the AGENTS.md File?
An AGENTS.md file is a simple, open Markdown format for guiding coding agents. The official site at agents.md describes it as a README for agents: a dedicated, predictable place for the context and instructions AI coding agents need to work on your project. Where a README is written for humans (quick starts, project descriptions, contribution guides), the AGENTS.md file holds the extra detail that would clutter a human README: build steps, test commands, style rules and the warnings that stop an agent from making a mess.
Three properties make it different from every config you already maintain:
- No schema, no lock-in. There are no required fields and no parser to satisfy. It is just Markdown. Any section you write is a section agents can read.
- Committed to the repo. The file lives in version control beside your code, so the whole team benefits from the same standing instructions. A system prompt, by contrast, is personal and session-specific.
- Tool-agnostic by design. The name and format were chosen so that any agent builder could adopt them without paperwork. The project is now a Series of LF Projects, LLC under the Linux Foundation umbrella, and reporting in December 2025 says OpenAI contributed the format to the new Agentic AI Foundation alongside Anthropic’s MCP and Block’s goose.

How Coding Agents Read Your AGENTS.md File
Each tool discovers the AGENTS.md file on its own, but the pattern has converged. When a run starts, the agent walks from the project root down to the directory it is working in and assembles an instruction chain along the way. Codex, the tool that popularized the format, checks for a personal defaults file at ~/.codex/AGENTS.md, then reads at most one instruction file per directory from the root to your current folder. Files closer to your working directory come later in the chain and win, which is how a monorepo lets the web frontend follow different rules from the build scripts. A file named AGENTS.override.md replaces the AGENTS.md file in its own directory when you need a true exception.
Support across the ecosystem is now broad enough that one file covers most stacks. The official compatibility roster includes OpenAI Codex, Google Jules, Google Gemini CLI, GitHub Copilot’s coding agent, Cursor, Devin from Cognition, Windsurf, Amp, Aider, goose, opencode, Zed, Warp, VS Code, JetBrains Junie, Factory, RooCode, Kilo Code, Phoenix, Semgrep, Ona, Augment Code and UiPath’s autopilot agents. Two useful fallback rules round it out: opencode falls back to reading CLAUDE.md when a repo has no AGENTS.md, and since version 2.1.277 (released September 18, 2026) Claude Code reads an AGENTS.md file when the project has no CLAUDE.md at all, a behavior you can change under Project Instructions in its config, though the support is not yet enabled on Bedrock, Vertex or Foundry deployments.
Two other tools read the file through explicit configuration, and both are one-liners. Aider loads conventions with read: AGENTS.md in .aider.conf.yml. Gemini CLI uses {"context": {"fileName": "AGENTS.md"}} inside .gemini/settings.json. Neither asks you to learn a new format; both simply point at the shared sheet.
What Goes in an AGENTS.md File
The official getting-started guide keeps the bar deliberately low: create the file at the repository root, cover what matters, and add extra instructions as needed. The popular section choices it lists are project overview, build and test commands, code style, testing instructions and security considerations. The strongest entries are executable and specific, because agents do not paraphrase your intentions; they run your commands. The official documentation states plainly that an agent will attempt to execute the testing commands you list and fix failures before finishing a task.
The spec site’s own sample shows the shape. A strong AGENTS.md file names the package manager and the commands that install dependencies, starts the dev server and runs tests. It tells the agent where the CI plan lives, how to focus on a single test, and that the whole suite must be green before a merge. It names the lint command to run after moving files. It sets the pull request title format. Nothing in there is poetry. Every line is something the agent can act on, verified against the repository it describes.
Real repositories back this up. The official examples gallery links the AGENTS.md files of OpenAI’s Codex (a general-purpose CLI tooling repository), Apache Airflow’s workflow platform and Temporal’s Java SDK. Large teams use the file for the same reason documentation drifts otherwise: the agent reads one consistent instruction source at the start of every session instead of inferring project rules from folder names.
AGENTS.md vs CLAUDE.md: Which Instruction File Wins?
The comparison that matters in 2026 is the AGENTS.md file against CLAUDE.md, Claude Code’s native instruction file. The mechanics are simple to state. Claude Code has always read CLAUDE.md natively and ignores other instruction files unless you bridge them. Codex, Cursor, Copilot’s coding agent, Aider, Gemini CLI and the wider open-standard camp read AGENTS.md natively and do not read CLAUDE.md at all. That asymmetry, one open format most tools share and one closed format only Claude reads, is exactly why the decision rule exists.
- Only Claude Code? Keep just CLAUDE.md. Nothing else in your stack reads AGENTS.md, so a second file buys you nothing.
- Codex, Cursor, Copilot or the open camp, with no Claude in the loop? Write the AGENTS.md file and stop. That is the whole assignment.
- Mixed stack, Claude plus anything else? Make the AGENTS.md file the single source of truth, then add a one-line CLAUDE.md that imports it:
@AGENTS.md, or a CLAUDE.md that simply says to strictly follow the rules in ./AGENTS.md. Claude-specific notes can follow the import line. - Big monorepo with mixed tools? Keep a root AGENTS.md file, the bridging CLAUDE.md, and per-package AGENTS.md files where subprojects genuinely differ. The chain wins where it is closest.
One more wrinkle is worth knowing before you restructure anything: Codex applies a default size cap (configurable) of about 32 KiB on instruction files, so a 9,000-word manifesto can silently truncate on one tool while loading fine in another. Brevity is not just a virtue here; it is the difference between instructions loading everywhere and loading somewhere.
Mistakes That Turn an AGENTS.md File Into Noise
The fastest way to waste the format is to write for a committee instead of for an agent. These are the failure patterns that show up again and again:
- Vague vibes instead of commands. “Follow best practices” tells an agent nothing. “Run pnpm test before every commit and fix failures until green” gives it something to do.
- Stale commands. An AGENTS.md file that names a package manager the repo no longer uses will send every session into recovery. Treat the file as living documentation, the official FAQ’s own advice.
- Contradictions with the README. If the README says npm and the AGENTS.md file says pnpm, agents will split. One of the two files is lying, and the agent cannot tell which.
- Secrets and tokens. The file is committed to the repo. Credentials belong in your environment, never in standing instructions.
- Tool config drift. If your team edits CLAUDE.md separately from the AGENTS.md file, the bridge rots. Edit the source of truth and keep the import line the only content of the secondary file.
- One giant file for a monorepo. When subprojects have real differences, nested AGENTS.md files closer to the code beat a sprawling common file, and closest wins is already the resolution rule.
Migrating an existing convention file is a two-command affair documented on the official site: rename the file and leave a symbolic link behind for tools that still look for the old name. The site’s own example migrates AGENT.md to AGENTS.md exactly that way.
Why an Open Standard Won This Fast
The instruction-file space in 2025 looked like it would fragment for good: every tool shipped its own conventions file, and multi-tool teams maintained one per agent. The convergence happened because the format solved a coordination problem at the right layer. The name was neutral, the format demanded nothing, and the adoption path required no code changes from any vendor. Once Codex popularized the mechanics and the roster of compatible tools grew, the network effects did the rest: agents read the same file, teams stopped rewriting instructions per tool, and the file became the natural seat for the rules an organization actually cares about, including its security considerations and testing gates. Where a team stacks deeper machinery on top, such as the training and retrieval layers we compared in fine-tuning versus RAG versus prompting, a settled AGENTS.md file keeps every layer pointed at the same project rules.
So where does a coding agent end and a plain chatbot begin? The instructions file exists precisely because agents act: they run commands, edit files and open pull requests, while a chatbot waits for the next turn. If you are still calibrating that difference, our guide to the gap between an AI agent and a chatbot is the short version, and the AI glossary covers the vocabulary the instruction sheets assume. The point for this file is narrow: the more an agent can do without a human in the loop, the more the AGENTS.md file carries the weight a human reviewer used to carry.
Setting Up an AGENTS.md File Today: A Short Order of Work
Getting the file into your repo does not require a migration project. The official FAQ notes that most coding agents will even scaffold a first draft for you if you ask, which is the fastest honest start: let the agent propose a file from what it can see, then correct it. After that, work in this order:
- Start with commands that already pass. Only write the install, build, test and lint commands that currently succeed in your repo. An instruction file is a promise; broken promises compound.
- Verify with a second tool. Read your file through two different agents (for example Codex and Cursor). If both load it and follow it, the file is really portable. If only one does, you have written a tool config with the wrong name.
- Add the warnings you keep repeating. Every line you find yourself typing in code review or in chat belongs in the file instead: the folder nobody touches, the migration nobody runs, the test everybody forgets.
- Bridge Claude, then delete the copy. If a full CLAUDE.md already exists, move its still-true lines into the AGENTS.md file, leave the one-line import behind, and retire the rest rather than maintaining both.
For teams that work with agents daily, the practical takeaway is smaller than usual. This is one file, in one format, with no migration risk beyond a symlink, and the tools that power your day already read it. The 60,000-project count is not a hype statistic; it is a count of repositories where an agent starts every session already knowing the rules. If an AI coding agent is about to touch your repository, that is the standard to meet. Write the AGENTS.md file, keep it true, and let every tool that opens your repo read the same page.
FAQ
What is an AGENTS.md file in a repository?
It is a plain Markdown file at your repo root that gives AI coding agents the standing instructions they need: build and test commands, code style, testing workflow and security considerations. The official spec calls it a README for agents. It has no required schema, and any tool in the compatible roster can read the same file.
Which tools read an AGENTS.md file?
More than 20 tools read it natively, including OpenAI Codex, Google Jules, Gemini CLI, GitHub Copilot’s coding agent, Cursor, Devin, Windsurf, Amp, Aider, goose, opencode, Zed, Warp, VS Code and JetBrains Junie. Since version 2.1.277 from September 18, 2026, Claude Code also reads it when a project has no CLAUDE.md, and opencode falls back to CLAUDE.md when the repo has no AGENTS.md.
Does an agent run the commands listed in an AGENTS.md file?
Yes. Per the official FAQ, if you list testing commands the agent will attempt to execute the relevant checks and fix failures before finishing the task. That is why strong files use real, currently working commands instead of prose.
Can different folders have their own AGENTS.md file?
Yes. Codex walks from the repo root to your current directory and merges at most one instruction file per directory, with the file closest to your code winning. A root file holds the shared rules and subdirectory files hold the exceptions, and an AGENTS.override.md in a folder replaces the AGENTS.md file there entirely.
How do I keep Claude Code and other agents in sync?
Make the AGENTS.md file the single source of truth and give Claude Code a one-line CLAUDE.md that imports it, @AGENTS.md, optionally followed by Claude-specific notes. From version 2.1.277, Claude Code also falls back to the AGENTS.md file automatically in projects with no CLAUDE.md, so even teams that never write a bridge file converge on one instruction source.
Does the AGENTS.md file have a size limit?
The open format itself has no limit, but Codex applies a configurable default cap of about 32 KiB on instruction files. A file that only works on one tool defeats the purpose of a shared standard, so keep the file lean and put depth in your nested files where it is closest to the code that needs it.
- agents.md
- github.com/openai/codex — OpenAI’s Codex
External sources linked in this article, in order of first mention. Spotted an error or a broken link? Tell us.
Cite this pagePublished Dec 2, 2026
Agron, E. (2026, December 2). AGENTS.md File: Write It Once and 20+ Coding Agents Follow Your Rules. WorldNgayon. https://worldngayon.com/agents-md-file/
Agron, Edmon. “AGENTS.md File: Write It Once and 20+ Coding Agents Follow Your Rules.” WorldNgayon, 2 Dec. 2026, worldngayon.com/agents-md-file/.
Agron, Edmon. “AGENTS.md File: Write It Once and 20+ Coding Agents Follow Your Rules.” WorldNgayon, December 2, 2026. https://worldngayon.com/agents-md-file/.
Agron, E. (2026) ‘AGENTS.md File: Write It Once and 20+ Coding Agents Follow Your Rules’, WorldNgayon, 2 December. Available at: https://worldngayon.com/agents-md-file/.
E. Agron, “AGENTS.md File: Write It Once and 20+ Coding Agents Follow Your Rules,” WorldNgayon, Dec. 2, 2026. [Online]. Available: https://worldngayon.com/agents-md-file/
@online{agron2026agentsmd,
author = {Agron, Edmon},
title = {{AGENTS.md File: Write It Once and 20+ Coding Agents Follow Your Rules}},
year = {2026},
date = {2026-12-02},
organization = {WorldNgayon},
url = {https://worldngayon.com/agents-md-file/},
urldate = {}
}TY - ELEC AU - Agron, Edmon TI - AGENTS.md File: Write It Once and 20+ Coding Agents Follow Your Rules T2 - WorldNgayon PY - 2026 DA - 2026/12/02/ UR - https://worldngayon.com/agents-md-file/ Y2 - ER -
Cite the version you read; the page may be updated. Zotero and Mendeley can also import this page directly.






