AGENTS.md: a new standard to teach AI coding agents what humans know

Illustration of AGENTS.md file guiding AI coding assistant in GitHub project

A single Markdown file is taking over GitHub: AGENTS.md, an open format adopted by 20k+ projects, gives AI dev tools the context they need without cluttering README files. Here’s why coders are embracing it.

Every time you ask an AI agent to refactor code or fix a bug, it wastes cycles rediscovering how to run tests or which linter to use. What if you could hand the agent a playbook? That’s the idea behind AGENTS.md. The simple Markdown format, now used by over 20 thousand open‑source projects, provides a predictable location for build commands, code style conventions and test instructions to help AI coding agents work like a seasoned contributor. The file’s rise to the front page of Hacker News shows developers are eager to tame AI assistants without burdening human colleagues.

Why separate human and agent docs?

Readme files are designed for humans: quick start instructions, project descriptions and contribution guidelines. Stuffing them with lengthy build steps and obscure linter flags makes them unwieldy. AGENTS.md deliberately keeps this extra context separate, giving agents a clear, predictable place to look without confusing newcomers. By isolating machine‑oriented instructions – such as test commands, code‑style preferences and security considerations – teams can maintain concise READMEs while ensuring AI agents have the details they need.

How AGENTS.md works

An AGENTS.md is just Markdown. You can add any headings you want; popular sections include:

  • Project overview – a brief description of what the repo does.

  • Setup commands – installation steps like pnpm install, starting the dev server or running tests.

  • Code style – guidance on strict mode, single quotes or functional patterns.

  • Testing instructions – how to run the test suite, filter tests and interpret results.

  • PR conventions – commit message formats, lint steps and pre‑merge checks.

  • Security considerations – notes on sensitive files or secrets.

Developers can create a single AGENTS.md at the repo root or multiple AGENTS.md files in sub‑projects of a monorepo. Agents automatically pick the closest file in the directory tree. The format emerged from collaboration among major AI tooling vendors – OpenAI Codex, Google’s Jules, Cursor and other – ensuring broad compatibility. There are no required fields; if two AGENTS.md files conflict, the closest one wins, and explicit chat prompts always override the file. Agents may execute test commands and fix failures before finishing tasks when instructions are provided.

Why developers love it

  • Reduced friction for AI agents – A well‑structured AGENTS.md means less time spent in trial and error. Agents know exactly how to install dependencies, run tests and adhere to style guidelines.

  • Cleaner READMEs – Human contributors see only the essentials, while machine‑specific details live elsewhere.

  • Cross‑tool support – One file works across Codex, Amp, Jules, Cursor, Factory, RooCode and other agents.

  • Community momentum – With thousands of repos already adopting the format and major AI agents parsing it, adding AGENTS.md has become a low‑effort way to future‑proof a project.

The bigger picture: humans guiding AI

AGENTS.md exemplifies a trend toward agentic software, where developers explicitly program the context in which AI tools operate. Rather than letting a model hallucinate build steps, teams are codifying knowledge that would normally be shared informally. As AI agents become collaborators, having a machine‑readable manual improves reliability and prevents accidents like running the wrong test suite or wiping a database. The format’s simplicity also ensures it can evolve organically as developers contribute examples and improvements.

FAQs

Is AGENTS.md mandatory? No. It’s just Markdown; you can omit it, and the agent falls back to heuristics.

Can I list secrets in AGENTS.md? No – treat it like your README. Security considerations should explain what not to touch; never include keys or passwords.

What happens if there are multiple AGENTS.md files? Agents choose the closest file in the directory tree; nested files override top‑level ones.

Do human collaborators read AGENTS.md? Yes, and they can, but the file is written for machines. Keep your README friendly for humans.

FAQ's

Share Post:
Facebook
Twitter
LinkedIn
This Week’s
Related Posts