ChatGPT

AGENTS.md

A plain Markdown file in a project that Codex reads before it starts, holding standing instructions like which tests to run and which conventions to follow.

Rules that travel with the project Your personal file, the project file, and a folder file are read in order, and the closest one wins before Codex starts. Your home file personal habits Project root team rules Subfolder specific rules Codex starts already briefed The closest file wins.

AGENTS.md is the onboarding note for Codex. Put your project's working agreements in it: the test command, the package manager, when to ask before adding a dependency, how things are named. Codex reads it before every task.

Files can sit at several levels. One in your Codex home folder carries your personal preferences everywhere; one in the project root sets the project rules; files deeper in the folder tree add specific rules for that part. The closer file wins. In the CLI, /init writes a first draft.

Often confused with: Custom instructions. Custom instructions are for ChatGPT in general; AGENTS.md is a file in a codebase, for Codex only, and it travels with the project.

See it in a lesson: Codex

Further reading

← All terms

Rollo AI AcademyWant your whole team speaking this language?Knowing the words is a start. Rollo Academy gets teams genuinely working with AI, through hands-on, in-company training built around your own work.Discover Rollo Academy →