AGENTS.md Specification

The open standard for guiding AI coding agents, now governed by the Agentic AI Foundation.

What Is AGENTS.md?

AGENTS.md is a simple, open format for guiding AI coding agents. Think of it as a README for agents: a dedicated, predictable place to provide context and instructions to help AI coding agents work effectively on your project.

History and Governance

  • August 2025: Released by OpenAI as an open standard
  • December 2025: Donated to the Agentic AI Foundation (AAIF) under the Linux Foundation
  • Adoption: Over 60,000 open source projects

The AAIF was co-founded by Anthropic, Block, and OpenAI, with platinum members including AWS, Bloomberg, Cloudflare, Google, and Microsoft.

Why AGENTS.md?

FileAudiencePurpose
README.mdHumansQuick starts, project descriptions, contribution guidelines
AGENTS.mdAI AgentsBuild steps, tests, conventions, development environment details

AGENTS.md separates agent-specific guidance from human-focused documentation. It contains detailed context that might clutter a README or isn’t relevant to human contributors.

Format and Structure

  • Format: Standard Markdown with no required fields
  • Location: Root of repository (or nested within subdirectories for monorepos)
  • Precedence: The closest AGENTS.md to edited files takes precedence; user prompts override all

Common Sections

Recommended topics to include:

SectionDescription
Project overviewWhat the project does and key architecture
Setup/build commandsHow to install dependencies and build
Test instructionsHow to run tests
Code styleFormatting, linting, conventions
Security considerationsSensitive files, environment variables
Development environmentTools, versions, configurations
PR/commit guidelinesCommit message format, branch naming

Example

# AGENTS.md

## Setup commands
- Install deps: `pnpm install`
- Start dev server: `pnpm dev`
- Run tests: `pnpm test`

## Code style
- TypeScript strict mode
- Single quotes, no semicolons
- Use Prettier for formatting

## Testing
- Run `pnpm test` before committing
- Coverage threshold: 80%

## Security
- Never commit `.env` files
- Use environment variables for secrets

Key Features

Cross-Platform Compatibility

Your single AGENTS.md file works across multiple agent platforms:

Agent/ToolVendor
CodexOpenAI
JulesGoogle
CursorCursor
VS Code CopilotGitHub/Microsoft
DevinCognition
AmpSourcegraph
FactoryFactory
Gemini CLIGoogle

Monorepo Support

For monorepos, place AGENTS.md files at multiple levels:

project/
├── AGENTS.md              # Root-level instructions
├── packages/
│   ├── frontend/
│   │   └── AGENTS.md      # Frontend-specific instructions
│   └── backend/
│       └── AGENTS.md      # Backend-specific instructions

Agents automatically read the nearest file in the directory tree, so the closest one takes precedence.

Automatic Execution

Agents attempt to execute listed commands and fix failures automatically. This makes AGENTS.md a powerful way to ensure consistent development practices.

AGENTS.md vs CLAUDE.md

Some projects use CLAUDE.md specifically for Claude Code. The relationship:

FileScopeRecommendation
AGENTS.mdAll AI coding agentsUse for universal agent instructions
CLAUDE.mdClaude Code onlyUse for Claude-specific configurations

You can use both files if you need platform-specific instructions alongside universal ones.

AGENTS.md is one of several standards now governed by the Agentic AI Foundation:

StandardPurposeOriginal Author
AGENTS.mdProject guidance for coding agentsOpenAI
MCPModel Context Protocol for tool integrationAnthropic
GooseOpen source agent frameworkBlock

Best Practices

  1. Keep it focused - Include only information relevant to AI agents
  2. Be specific - Provide exact commands, not vague descriptions
  3. Update regularly - Keep instructions current with project changes
  4. Test commands - Ensure all listed commands actually work
  5. Consider security - Document what agents should NOT access

Further Reading


Note: AGENTS.md provides guidance to AI agents, but agents may not follow all instructions perfectly. Always review agent-generated changes before committing.