AGENTS.md: the file that almost all code AIs read (and one that doesn't)

AGENTS.md unifies your project's rules for all AI tools. Learn what to include and which tool does not read it. Avoid instruction drift.

miércoles, 1 de julio de 2026 • 3 min read • Q2BSTUDIO Team

The open standard that eliminates instruction drift in AI

In the current software development ecosystem, where AI-based coding assistants have become indispensable tools, a recurring challenge arises: instruction fragmentation. Each platform —Copilot, Cursor, Cline, Devin Desktop, among others— requires its own configuration file, leading to a duplication of rules that quickly results in inconsistencies. This phenomenon, known as instruction drift, is precisely the problem solved by AGENTS.md, an open standard that allows defining a project's rules once and having most code AIs read it automatically.

AGENTS.md is a plain text file in Markdown format located at the root of the repository. No special syntax, no YAML frontmatter, no schemas to learn. It was published by OpenAI in August 2025 and handed over to the Linux Foundation for governance as an open standard. By mid-2026, it had already been adopted in over 60,000 open-source repositories. While a README explains the project to humans, AGENTS.md explains it to intelligent agents.

What few guides mention is that not all tools implement it the same way. Most —Copilot, Cursor, Devin Desktop, Aider, Kilo Code, Gemini CLI, Codex CLI, and over 30 others— read it natively from the project root. The honest exception is Cline: its native format is .clinerules/ and it does not automatically detect the root project's AGENTS.md; it does read a global file, but not the repository-specific one. Knowing these differences is key before assuming a single file covers all tools.

Writing an effective AGENTS.md requires structure and conciseness. Essential sections include: Commands (install, run, test, build), Conventions (specific rules like "named exports only, never default"), Hard Constraints (use the word "never" for emphasis), and advanced additions such as a Context Budget (telling the agent how to search before opening full files) and a Quick Routing Map that associates tasks with specific files, thus eliminating path hallucinations. It can also include a Definition of Done with the commands that must be executed before considering a task complete.

A study conducted in February 2026 by ETH Zurich (138 real GitHub tasks) revealed that hand-written context files offer a modest 4% improvement in task success, while automatically generated ones tend to worsen results. The conclusion is clear: write the file manually, keep it under 200 lines, and focus on information the agent cannot discover on its own by reading the code.

One of the lesser-known capabilities is the use of nested files: the AGENTS.md closest to the file being edited takes priority, allowing global rules to be overridden for submodules or legacy packages. OpenAI, for example, includes 88 AGENTS.md files distributed across its Codex repository. Additionally, it is important to treat this file as public: do not include secrets or real tokens, only indicate where they live.

At Q2BSTUDIO we are experts in custom application development and custom software, and we know that integrating multiple artificial intelligence tools requires coherent instruction management. That is why we offer AI consulting services for businesses, helping adopt standards like AGENTS.md so that your development teams work efficiently with AI agents. Furthermore, we combine these capabilities with AWS and Azure cloud services to deploy robust projects, and with business intelligence services based on Power BI to turn data into decisions. Cybersecurity is also a fundamental part of our solutions, ensuring that every file and every pipeline is protected.

AGENTS.md is not just another file: it is the key for AI agents to work in harmony within a project, eliminating instruction drift and freeing developers from repetitive tasks. At Q2BSTUDIO we help you implement it correctly and get the most out of artificial intelligence in your organization.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.