AGENTS.md
Builder Code
AGENTS.md is a markdown file placed at your repository root that tells AI development tools how your project works. Unlike tool-specific files, an AGENTS.md provides unified configuration for any AI agent.
What to know
- The AGENTS.md file is a contextual and instructional file recognized by several AI agents, as described on the official AGENTS.md site.
- Creating an AGENTS.md file is recommended for all Projects, but is especially useful for software developers who use more than one AI agent as part of their development process.
AGENTS.md overview
An AGENTS.md file eliminates repetitive prompt instructions by establishing project conventions in one central location. Agents reference these guidelines automatically, ensuring consistent code generation that follows your project standards.
Your AGENTS.md file may include:
- Essential setup commands, build steps, and development server instructions for getting the project running.
- Code style guidelines, formatting rules, and architectural patterns the project follows for consistent development.
- Testing workflows, quality checks, and merge requirements that must be completed before submitting code.
In the example above, the AGENTS.md file includes details on running the application within a development environment, testing instructions, and details for creating pull requests.
Use multiple AGENTS.md files
Just like with .builderrules files, AGENTS.md files can be replicated in multiple directories.
AGENTS.md best practices
Rules should be actionable, focused, precise, and scoped.
- Keep rules under 500 lines.
- Split large rules into multiple, composable rules.
- Provide concrete examples or referenced files.
- Avoid vague guidance. Write rules like clear internal docs.
- Make sure rules in one file don't conflict with rules in another.
For more best practices and detailed examples, visit AI instruction best practices.
Complete AGENTS.md examples
The following examples are complete AGENTS.md files.
This example comes from the AGENTS.md site.
This is WordPress's open-source AGENTS.md file.
What's next
Learn more about Configuration files in Builder, or read up on AI instruction best practices.