AI GLOSSARY · AGENTS AND AGENT TOOLING

AGENTS.md

Markdown version · Wikidata Q136229882

Definition

AGENTS.md is an open, plain Markdown format for giving instructions to AI coding agents. It sits in a repository like a README written for agents, holding build steps, tests and conventions.

Also called: agents md, agents md file, agents.md codex.

In plain language

AGENTS.md is a plain text file you put in a software project to tell AI coding tools how the project works: how to build it, how to run the tests, what style to follow. The agents.md site describes it as a README for agents. The same file can be read by several different tools, so a team does not keep one note per tool. A large project can have more than one file, and the one closest to the code being edited takes precedence. The limit is that each tool decides how it loads the file, and the text only guides the agent, so it is not a security control.

Technical definition

AGENTS.md has no required fields: it is standard Markdown placed at the repository root, with optional copies in subdirectories. According to agents.md, the closest file to the edited file wins and an explicit user prompt overrides everything. Tools differ in how they load it. Codex checks AGENTS.override.md, then AGENTS.md, then names in project_doc_fallback_filenames, takes at most one file per directory, concatenates them from the root down, and stops adding files at project_doc_max_bytes, which defaults to 32 KiB. Claude Code reads a root AGENTS.md only when no CLAUDE.md or CLAUDE.local.md applies, or through an @AGENTS.md import from CLAUDE.md. agents.md says the format is maintained by the Agentic AI Foundation under the Linux Foundation.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Guide · Illustrative, not executed

    Codex AGENTS.md setup: file locations and layering

    What you see
    Where Codex finds AGENTS.md files, how global and project layers combine, and how to confirm which instructions load in a session.
    Why it exercises the concept
    Codex is a tool that documents AGENTS.md loading in detail, so this guide shows the format working as specified.
  2. Guide · Illustrative, not executed

    Make Claude Code read AGENTS.md: import and verify

    What you see
    Claude Code reads AGENTS.md only when no CLAUDE.md is in or above the working directory. The guide shows an @AGENTS.md import to share one file, then a check with /memory.
    Why it exercises the concept
    It covers the main way the format and a vendor-specific file collide, and how to resolve it.
  3. Skill by Skill Almanac · Illustrative, not executed

    rules-to-skills-migration 45/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    Move editor rule files to AGENTS.md plus portable skills without losing how each rule was switched on.
    Why it exercises the concept
    It treats AGENTS.md as the shared destination for rules that began in one editor's own format.
  4. Coding tool · Illustrative, not executed

    Codex

    What to try
    codex
    What you see
    Codex CLI starts. According to the Codex documentation, it then looks for AGENTS.override.md and AGENTS.md from the project root down to the current directory.
    Why it exercises the concept
    Codex is one of the agents the agents.md site lists as reading the format.

How it shows up when you use agents

AGENTS.md is the instruction file that more than one coding agent can read. If you use Codex, it is the file Codex looks for. If you use Claude Code, the file matters when your repository already has one, because Claude Code reads it only under a specific condition. The general idea is covered under agent instruction file; this entry is about the AGENTS.md format itself.

What breaks when it is misunderstood:

  • Missing instructions. A team adds AGENTS.md and a CLAUDE.md that says something else. Claude Code then reads CLAUDE.md files only, and the AGENTS.md rules do not load. An @AGENTS.md line inside CLAUDE.md imports it.
  • Silent truncation. Codex stops adding files once the combined size reaches its limit. Keep files short and place specialised rules in subdirectories.
  • Over-trust. The text is guidance for the model. Anything that must be enforced belongs in permissions or a sandbox.

A next action: put build and test commands first, run your agent, and ask it which instruction files it loaded. The Codex AGENTS.md setup guide shows how to check this in Codex, and CLAUDE.md vs AGENTS.md covers both tools together. Keep the file within the context window budget your tool allows.

Common confusions

  • AGENTS.md versus README. A README is written for people. AGENTS.md is a README for agents, with the commands and conventions that would clutter the human version.
  • AGENTS.md versus CLAUDE.md. AGENTS.md is an open format. CLAUDE.md is Claude Code's own file, loaded first when it exists.
  • AGENTS.md versus AGENTS.override.md. In Codex, an override file in the same directory takes precedence over AGENTS.md. It suits temporary or specialised rules.
  • Myth: all agents load it the same way. The agents.md page lists many agents, but each decides how it discovers, orders and limits the files.

Terms that mention AGENTS.md

10 terms mention this one

Guides that mention AGENTS.md

Show all 12 guides

More in Agents and agent tooling

Next steps

  1. Codex AGENTS.md setup: file locations and layering The long-form guide.
  2. rules-to-skills-migration A skill that exercises it.
  3. CLAUDE.md Related term.
  4. Coding agent Related term.
  5. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-24. Wikipedia is never the only source.

Review record

Last verified

Drafted by claude-sonnet-5-5; sources and example targets checked by claude-haiku-5-5 source check; claude-sonnet-5-5 editor pass on 2026-11-24. Last verified .

This entry is still in review, so it is not listed in search engines yet.

Change log (2)
  • : First version.
  • : Verifier pass: applied defect-list corrections.