Skip to content

Contact LV

lv@dablock.com

Juan Lago (LV) uses your details to reply to enquiries (legitimate interest), fulfil a contract with you, or take steps you request before entering one. Privacy and your rights

AGENTS.md

A Markdown file with project instructions for coding agents

LV glossary Updated

What is AGENTS.md?

AGENTS.md is an open convention for giving coding agents project instructions in a predictable Markdown file. Teams use it to record setup commands, code conventions, checks, and work boundaries. An agent application must support the convention and load the file for its instructions to affect a task.

How it works

The application loads applicable guidance; the finished work still needs verification.
Read the diagram
  1. Project rules
  2. Host loads file
  3. Agent works
  4. Checks and review

Key takeaways

  • Use plain Markdown; AGENTS.md has no required metadata fields.

  • Confirm how your application discovers files and resolves conflicting instructions.

  • Keep repository-wide rules here and reusable task procedures in relevant skills.

  • Instructions describe expected behavior; permissions and execution controls enforce access.

▸

Illustrative example

In a hypothetical bilingual website, AGENTS.md asks an agent to preserve translated URLs, run the existing checks, and keep deployment separate from implementation. A successful task produces a local change and reports which checks ran. Writing the rule alone cannot prove the agent followed it.

What belongs in the file

Start with facts an agent cannot infer reliably: the command used by this repository, directories with special rules, source-of-truth files, and acceptance checks. Keep commands current. Link to longer project documentation when the agent needs it. A README can continue to explain the project to human readers.

Discovery and precedence depend on the application

The AGENTS.md convention describes nested project guidance. Codex has a documented implementation: it reads global guidance, then files along the path from the project root to its working directory. At each level AGENTS.override.md takes priority over AGENTS.md; later, deeper guidance can override earlier guidance. The default combined size limit is 32 KiB. These are Codex discovery rules, not promises about every agent.

Check your product and version before relying on a filename, directory scope, or reload behavior. A project file cannot grant an unavailable tool, expand filesystem access, or replace the application’s higher-priority instructions. If a chat request conflicts with project guidance, the application’s instruction hierarchy determines the result.

An annotated AGENTS.md example

This fictional repository already defines the commands below. Replace them with commands that exist in your project; a copied test command can give false confidence. The deployment rule expresses an owner preference and needs matching controls if it must be enforced.

AGENTS.md
# Project instructions

## Scope
- Keep English and Spanish page links paired.

## Checks
- Run `npm run typecheck` after code changes.
- Run `npm test` before reporting completion.
- Report any checks you could not run.

## Publishing
- Deploy only when the user explicitly requests deployment.

Scroll the table to see every column.

An annotated AGENTS.md example
PartWhy it is here
ScopeRecords a project requirement the agent must preserve during edits.
ChecksNames real checks and asks for an honest execution report.
PublishingKeeps the owner’s deployment decision explicit. The host still controls access.

AGENTS.md, skills, and MCP

Use AGENTS.md for recurring project guidance. A SKILL.md package teaches a task procedure that a supporting application can select when needed. MCP connects the application to tools and data. A repository can use all three: a rule asks for source checks, a research skill explains the method, and an MCP tool retrieves records. Their discovery and permission mechanisms remain separate.

AGENTS.md files in public repositories

Apache Airflow’s AGENTS.md documents its project-specific environment, test commands, repository structure and architecture boundaries. Temporal’s Java SDK also publishes an AGENTS.md file in its repository. These real files show why project instructions differ: the commands and boundaries belong to the repository that maintains them.

Sources and documentation