Skip to content

What is AGENTS.md?

By the Toolbay team · Checked against the sources below on

AGENTS.md is a plain Markdown file in a code repository that tells AI coding agents how to work on it: setup and test commands, code style, and boundaries. The agents.md site calls it "a README for agents". Codex, Cursor, GitHub Copilot, Gemini CLI and many other agents read it; recent Claude Code versions read it when there is no CLAUDE.md.

Example

AGENTS.md
# AGENTS.md

## Setup commands
- Install deps: pnpm install
- Run tests: pnpm test

## Code style
- TypeScript strict mode
- Single quotes, no semicolons

Rules worth knowing

  • No frontmatter, no required sections.
  • Nested AGENTS.md files are allowed; the one closest to the edited file wins, and a direct chat instruction overrides all of them.
  • Codex reads files from the repo root down to the current folder, up to 32 KiB in total by default.

Compared with CLAUDE.md: same idea, but CLAUDE.md is Claude Code's own file. Many teams keep the rules in AGENTS.md and put @AGENTS.md in CLAUDE.md.