> ## Documentation Index
> Fetch the complete documentation index at: https://docs.llmeasy.ru/llms.txt
> Use this file to discover all available pages before exploring further.

# What is AGENTS.md in Codex CLI?

> Learn what AGENTS.md does in Codex CLI, how instruction hierarchy works, what to include, and common mistakes.

## Short answer

`AGENTS.md` is a project instruction file for Codex. It tells Codex about repository structure, commands, tests, coding style, commit rules, and collaboration preferences.

It is for stable project rules, not one-time tasks. Put one-time requirements in the current conversation.

## What to include

* How to install dependencies, start the project, and run tests
* Common validation commands
* Coding style and naming conventions
* Directories that should not be changed casually
* Required checks before finishing
* Team preferences for communication and output

## What not to include

* API Keys, tokens, passwords, or private credentials
* Temporary task instructions
* Long product background stories
* Generic prompts unrelated to the repository
* Outdated commands and paths

## Suggested structure

```md theme={null}
# Project instructions

## Build and test
- Run `npm test` before finishing behavior changes.
- Run `npm run lint` after editing TypeScript files.

## Style
- Keep diffs small and focused.
- Match existing component patterns.

## Safety
- Do not edit files outside this repository.
- Do not commit secrets.
```

## Common mistakes

* Turning `AGENTS.md` into a very long universal prompt.
* Writing secrets into the file.
* Forgetting to update it when project commands change.
* Mixing `AGENTS.md` with user-level `config.toml`.
* Assuming rules remove the need to review diffs and tests.

## About LLMEasy

If a team uses LLMEasy to unify model routing, `AGENTS.md` still matters. The API layer handles model requests and usage records. `AGENTS.md` handles project context and execution norms.

Use both to reduce configuration confusion and collaboration cost.

## Related docs

* [What is Codex CLI?](/en/faq/codex/what-is-codex-cli)
* [How to configure Codex CLI config.toml](/en/faq/codex/config-toml)
* [What are Codex CLI sandbox and approval modes?](/en/faq/codex/sandbox-approval)
* [What is CLAUDE.md in Claude Code?](/en/faq/claude-code/claude-md)

## References

* [Codex AGENTS.md guide](https://developers.openai.com/codex/guides/agents-md)
* [Codex best practices](https://developers.openai.com/codex/learn/best-practices)
* [OpenAI Codex discussions](https://github.com/openai/codex/discussions)
