Agent instructions file
A text file in your project that the agent's harness loads at the start of every session, so the agent knows from the start what it always needs to know: rules, facts about the data and how to check its work.
Each harness looks for its own name: Claude Code reads CLAUDE.md, and Codex, Antigravity and many others read AGENTS.md. Claude Code can also read a project's AGENTS.md. It's plain Markdown, in the project folder.
Example, for a data project:
# Sales
- One row of `pedidos.csv` is an order, not a customer.
- "Repeat customer" = a customer with 2 or more orders in the period.
- Blanks in `total` are cancelled orders: leave them out and say how many there were.
- Before reporting a percentage, print the numerator and the denominator.What it doesn't do: it enforces nothing. The model reads it as context and almost always follows it, but it may not. Anything that must never happen belongs in the harness's permissions.
A sign it's missing something: if you correct the agent twice for the same thing, that correction goes in the file.
Learn more
Related terms
- Context window
Everything a language model has in front of it at a given moment: your instruction, the files it has read and the results of its tools. What isn't in the context, the model can't use.
- Agent harness
The program that wraps a language model and makes it an agent: it gives the model tools, asks for your permission, keeps the session and decides what goes into its context.
- AI agent
A program that pairs a language model with tools, such as terminal commands and files, to carry out a task in several steps: it reads its context, acts, looks at the result and repeats.
- Grain (of a table)
What one row of a table stands for: a person, a transaction, a planet, a person per language. Counting rows counts what you want only if you know the grain.