Software Factories at enterprise scale: A federated platform for agentic developmentDownload the free Whitepaper

AGENTS.md

What Is AGENTS.md?

In short

AGENTS.md is a Markdown file placed in a code repository to give AI coding agents project-specific instructions: how to build and test the project, its conventions, and anything an agent should know before changing code. It has no required sections and no schema, and agents read the file closest to the code they are editing.

Updated 16 October 20264 min read

Frequently asked questions#

Does Claude Code read AGENTS.md?
No. Claude Code reads CLAUDE.md as its native project instruction file. Anthropic documents a simple way to keep the two together: a CLAUDE.md file can import AGENTS.md with @AGENTS.md, so Claude Code and tools that support AGENTS.md can work from the same shared instructions. Claude-specific guidance can then sit underneath the import. A symlink can do the same job when no Claude-specific instructions are needed, although Windows requires Developer Mode for that approach.
AGENTS.md vs CLAUDE.md: what is the difference?
They solve a similar problem, but they are not the same format. AGENTS.md is an open convention centred on a filename and repository-level precedence. CLAUDE.md is Claude Code's own instruction system and supports additional features such as managed policy, user, project and local scopes, imports, path-scoped rules, and organisation-wide deployment. GitHub Copilot's coding agent can read CLAUDE.md and GEMINI.md as well as AGENTS.md, so teams using several coding agents do not necessarily need to maintain completely separate copies of the same guidance.
Where do you put an AGENTS.md file, and should it be committed?
The usual place is the root of the repository, committed alongside the code so every contributor and every agent gets the same project instructions. In a monorepo, additional files can live inside individual packages or services when those areas need more specific guidance. The file closest to the code being edited is generally the one that carries the most specific rules. Personal preferences are better kept in local or user-scoped configuration rather than committed to the repository, because they are not part of the shared way the project is supposed to be built, tested, or reviewed.
What should go in an AGENTS.md file?
Put in the commands the agent cannot reliably guess and the rules it would otherwise be likely to break: how to build, how to run tests, how to lint, which directories are off limits, which security constraints apply, and the conventions reviewers actually enforce. The file should be specific enough to prevent avoidable mistakes without becoming a second copy of the repository documentation. Keeping it short is not just a style preference. Every instruction is loaded into context, which means a long file costs tokens continuously and makes the important lines harder to find.

Sources

  1. AGENTS.md — project site and FAQagents.md
  2. AGENTS.md — project repositorygithub.com
  3. OpenAI — Custom instructions with AGENTS.md, Codex documentationlearn.chatgpt.com
  4. GitHub — Add repository instructions in your IDEdocs.github.com
  5. Cursor — Rulescursor.com
  6. Anthropic — How Claude remembers your projectcode.claude.com
  7. The Linux Foundation — Formation of the Agentic AI Foundation, 9 December 2025linuxfoundation.org

Train your engineers

See the service →