Skip to content
BENIBIX Learn

Agent Instruction File

AI🛠️ Working with AIAI-Assisted Coding

Also known as AGENTS.md, Agent Rules File, Project Instructions File

A file with the house rules for AI agents in your code.

Think of it like

Think of it like a note on the fridge for a babysitter. It lists the house rules.

Example

Emma's project has a file with four house rules, from running the tests to leaving one folder alone. Her agent follows them in every task. Some tools call it AGENTS.md, and others CLAUDE.md.

Why it matters

You stop typing the same rules in every chat. The agent reads them from the file each time.

Definition

An agent instruction file is a text file in a project that tells AI coding agents how to work there. It lists things like how to run the tests, which style to follow and which folders not to touch. The agent reads it at the start of each task, so you do not have to repeat yourself. It is usually written in Markdown and kept with the code. Several tools have their own name for the file, and one shared name is catching on.

Example code

markdown
# Project notes for agents

- Run `npm test` before you say a task is done.
- Use two spaces, not tabs.
- Never edit files in `generated/`.
- Ask before adding a new library.
Four house rules. The agent reads them at the start of every task.
The agent reads the rules file first, in every task. So the rules hold each time.

Common mistake

Letting it grow huge. A long file costs tokens on every task and buries the rules that matter.

Key takeaways

  1. 1
    House rules. How to work here.
  2. 2
    Read every task. No need to repeat.
  3. 3
    Keep it short. Only what matters.

Compare

Learn it properly