What is AGENTS.md?
AGENTS.md is a Markdown file you place in your repository to give AI coding agents the context they need to work effectively on your project. Think of it as a README — but written for agents instead of humans. It provides a single, predictable place where agents can find:- Build and test commands
- Code style conventions
- Project structure overviews
- Security considerations
- PR and commit guidelines
AGENTS.md is plain Markdown. There are no required fields, no schemas to learn, and no tooling to install. If you know how to write a README, you already know how to write an AGENTS.md.
The problem it solves
AI coding agents are increasingly capable of writing, testing, and submitting code — but they often lack the project-specific context that a human contributor picks up over time. Without clear guidance, agents may:- Run the wrong build or test commands
- Ignore established code style conventions
- Miss security-sensitive areas of the codebase
- Write commit messages or PRs in the wrong format
How it differs from README.md
README.md is written for humans — it explains what a project does and how to get started. AGENTS.md is written for agents — it explains how to work on the project.
README.md
- Project overview for new contributors
- Installation and usage instructions
- License and contribution links
- Human-readable prose
AGENTS.md
- Build, test, and lint commands
- Code style and formatting rules
- Commit and PR conventions
- Security gotchas and deployment steps
How it works
When an agent starts working in your repository, it reads theAGENTS.md file before taking action. The agent uses that file to:
- Understand the project structure and tech stack
- Know which commands to run for building, testing, and linting
- Follow the project’s code style and conventions
- Apply any special instructions for commits, PRs, or security
Who supports it
AGENTS.md is used by over 60,000 open-source projects and is supported by more than 20 AI coding agents and tools.Codex
OpenAI’s coding agent
Cursor
AI-powered code editor
GitHub Copilot
GitHub’s AI pair programmer
Gemini CLI
Google’s CLI coding agent
Aider
Open-source terminal agent
opencode
Open-source CLI agent
Get started
Adding AGENTS.md to your project takes less than five minutes.Quickstart
Create your first AGENTS.md file and start guiding agents in minutes.
What to include
Learn which sections matter most and what agents actually use.
