AGENTS.md
A plain Markdown file at the root of a repo that tells any coding agent how to build, test and work in the project.
Install
-
Any repo
touch AGENTS.mdNo tool to install. Write normal Markdown; there are no required fields.
-
Rename an old AGENT.md
mv AGENT.md AGENTS.md && ln -s AGENTS.md AGENT.mdMigration tip from agents.md; the symlink keeps tools that read the old name working.
Think of it as a README written for agents: setup commands, how to run tests, code style, PR rules. It is stewarded by the Agentic AI Foundation under the Linux Foundation. The agents.md site lists Codex, Cursor, Gemini CLI, Jules, VS Code, Zed, Devin, Windsurf and others as supporting it.
When to use it
- More than one coding agent touches your repo and you want one set of instructions.
- You want tests and lint to run before an agent calls a task done. List the commands and agents will try them.
- A monorepo: put an
AGENTS.mdin each package. The closest one to the edited file wins.
How the big three read it (from their docs, 2026-09-25)
- Codex reads
~/.codex/AGENTS.mdfirst, then everyAGENTS.mdfrom the Git root down to the current directory, joined in order.AGENTS.override.mdtakes priority in a folder. The combined text stops at 32 KiB by default (project_doc_max_bytes). - Claude Code (v2.1.277+) reads
AGENTS.mdonly when there’s noCLAUDE.mdorCLAUDE.local.mdin the working directory or above. If you have both, put@AGENTS.mdin yourCLAUDE.mdto import it. - Gemini CLI, per the agents.md FAQ, needs
"context": {"fileName": "AGENTS.md"}in its settings.
Before you rely on it
Agents run the commands you list, so treat AGENTS.md like a script: review changes to it
in pull requests, especially in repos that take outside contributions.
- Works with
- Codex, Claude Code, Cursor, Gemini, Any agent
- Categories
- Agent building, Cross-platform portability
- License
- MIT
- Cost
- Free