// guide

Give your AI agent the note it needs, before it starts

An AI agent is an AI that can open your project’s files, change them and check its own work. It’s skilled but arrives knowing nothing about your business, so you give it a short note first: a Markdown file called AGENTS.md that says why you’re building this, what it must do, how it’s built and where things go. The wizard on this page writes that file for you by asking plain questions.

By Published Last updated 10 min read

Skip to the wizard Start with the basics

First, the words

Every abbreviation on this page is explained here, so you never have to guess. Come back to this list whenever a word trips you up; the glossary has more.

AI
Artificial intelligence. Here: software you talk to in normal sentences, such as ChatGPT, Claude or Gemini.
LLM
Large language model. The "brain" inside those AI tools. It has read a huge amount of text and predicts good answers.
Agent
An AI that doesn't just answer but does: it opens files, makes changes, runs them and checks the result, step by step.
Prompt
What you type to the AI: your question or instruction.
Context
Everything the AI knows about your situation when it answers. If it isn't in the context, the AI doesn't know it.
Markdown (.md)
Plain text with a few simple marks: # for a heading, - for a bullet, **bold** for bold. Files that end in .md are Markdown. Any text editor can open them.
AGENTS.md
A Markdown file with instructions for AI agents, placed in the top folder of a project. Many AI tools look for it and read it first.
CLAUDE.md
The same idea, under the name that Claude Code (Anthropic's agent) looks for.
Repository (repo)
The folder that holds a whole software project, usually with its full change history.
Git
The most common tool for keeping that change history, so every change can be seen and undone.
PR
Pull request. A proposed change that someone reviews before it's accepted into the project.
API
Application programming interface. A doorway that lets one program talk to another, for example your website asking a payment service to charge a card.
KPI
Key performance indicator. A number that shows whether something is working, such as "orders per week".
MVP
Minimum viable product. The smallest version worth putting in front of real people.
MCP
Model Context Protocol. A standard way to plug an AI into other tools, such as your calendar or documents. You don't need it to start.

Why use an agent, in six baby steps

  1. You probably already use a chat AI. You ask a question, it answers, you copy the answer somewhere, try it, come back with the error, and repeat. You are the hands.
  2. An agent is the same AI, given hands. It can open the files of your project, change them, run them and see whether it worked, without you copying anything back and forth.
  3. So you describe the job once. "Add an order form to the website." The agent makes a plan, does the work in small steps, tests it, and tells you what it changed.
  4. The catch: it starts out knowing nothing about you. Think of a skilled temp worker who arrives at your shop every morning with no memory of yesterday. Brilliant, but they don't know your customers, your rules or why the shop exists.
  5. So you leave a note on the desk. That note is the context file. The agent reads it at the start of every session, before it touches anything.
  6. You stay the boss. The note also says how much it may do on its own and what it must ask first. You check the result, just as you would with a new employee.
Chat AI AI agent
What it does Answers in a chat window Works inside your project’s files
Who does the copying and testing You The agent
Good for Questions, drafts, explanations Building and changing real things
What it needs from you A clear question A clear job and a context file

When an agent isn’t worth it: a one-off question, a single email, or anything you’d finish yourself in two minutes. Agents pay off when a job has many steps or touches many files.

The whole process in one flowchart

Follow the arrows from the top. “Yes” goes down to the next box; “No” sends you to the side. Print it or keep it open next to your agent.

  1. 1

    You have a job for AI.

  2. 2

    Does the job have several steps, or change the files of a project?

    A website, an app, a folder of documents.

    No

    Use a normal chat AI. Done.

  3. 3

    Does the project's top folder have an AGENTS.md or CLAUDE.md?

    No

    Write one with the wizard below (about 10 minutes), save it there, then carry on with step 4.

  4. 4

    Open the agent in the project's top folder.

  5. 5

    Send the first message: "Read the file and tell me what you understood. Don't change anything yet."

  6. 6

    Did it understand your project and rules correctly?

    No

    Fix the file, not the chat. Then back to step 5.

  7. 7

    Give it one small job: "Add a pickup-date field to the order form."

  8. 8

    Check the result yourself. Is it right?

    No

    Say what's wrong. Same mistake twice? Add one line to the file. Then back to step 7.

  9. 9

    Keep it: save a restore point. Next small job? Back to step 7.

Why the note matters so much

An agent can’t ask around the office. A human developer who’s unsure walks over and asks. An agent fills the gap with a guess, and the guess is usually the most common answer on the internet, not the right answer for you.

Here is the same request, without and with a context file, for a fictional bakery:

Without context

"Add online ordering."

The agent builds a full web shop with delivery, user accounts and a card payment page. Looks impressive. But the bakery only does pickup, takes payment in the shop, and needs orders by 2 pm the day before. Most of it gets thrown away.

With context

"Add online ordering." The agent first reads AGENTS.md: pickup only, pay in shop, order by 2 pm the day before, no accounts.

It builds one simple form with a pickup date that can't be today, and asks before adding anything that costs money. Small, correct, and done.

Same agent, same request. The only difference is the note.

The four kinds of context

A good note answers four questions: why, what, how and where. The first two are business knowledge only you have. The last two are technical, and if you’re not a developer you can let the agent fill them in and check them. Each example below is for the same fictional bakery; copy the shape, not the content.

1. Why are we building this? (business context)

This tells the agent what “good” means, so it makes the trade-offs you would. Include the goal, how you’ll know it worked, and what matters most when two things clash.

markdown
## Why we're building this
Maple Street Bakery (fictional) is a small neighborhood bakery.
Customers phone in orders, and calls interrupt baking all morning.

Goal: let customers order cakes and bread online for pickup.
We know it works when: half of pre-orders come in online
instead of by phone, within three months.

When choices clash, in this order:
1. Customer privacy and safety
2. Easy to use on a phone, for older customers too
3. Cheap to run
4. Extra features (wait, unless they're free and simple)

2. What must it do? (functional context)

This describes the behavior: who uses it, what they can do, the rules, and what could go wrong. The “must never” list is the most valuable part, because no agent can guess your red lines.

markdown
## What it must do
- Customers pick items, a pickup date and a pickup time.
- Orders close at 2 pm the day before pickup.
- The owner gets each order by email.

## It must never
- Take card payments online (customers pay in the shop).
- Allow pickup on Mondays (we're closed).
- Ask for more than name, phone number and email.

## Things that could go wrong
- An item sells out: show "sold out" instead of hiding it.
- A customer orders 40 loaves: ask them to call us instead.

3. How is it built? (technical approach)

This keeps the agent from mixing styles and tools. If you don’t know, say so, and ask it to choose something common and explain the choice in plain words.

markdown
## How it's built
I'm not a developer. Suggest common, well-supported tools,
explain each choice in one plain sentence, and wait for my
OK before setting anything up.
- Prefer free or low-cost services.
- Ask before adding anything with a monthly fee.

A developer would write the actual tools here, such as “React front end, C# API, PostgreSQL database”, plus the commands to build and test.

4. Where do things go? (project map)

This saves the agent from searching through everything and stops it editing what it shouldn’t. For a new project, ask the agent to write this section once the first version exists.

markdown
## Where things are
- `site/` the pages customers see
- `site/menu.json` items and prices (the owner edits this)
- `docs/` notes and decisions
- `old-site/` the previous website: don't change anything here

How the pieces fit together

For most small projects, one file is enough. Put all four parts in a single AGENTS.md in the project’s top folder. When it grows past a couple of pages, move the long parts into their own files and link to them:

text
my-bakery-site/
├── AGENTS.md          ← the agent reads this first
├── docs/
│   ├── why.md         ← business context
│   └── what.md        ← what it must and must never do
└── site/
markdown
# AGENTS.md
Read these before starting any new feature:
- docs/why.md: goals and what matters most
- docs/what.md: rules, limits and edge cases

The wizard: write your file in six steps

Answer in plain words; the file builds itself below the questions as you type. Every question has an example. Skip anything you don’t know. Nothing you type leaves your browser. It’s also on a page of its own, the AGENTS.md generator, handy to bookmark or share.

Step 1 of 6

Your project

What are you making, and for whom? One or two plain sentences is enough.

Where are you starting?

AGENTS.md builds as you type

# AGENTS.md

Instructions for AI agents working on this project. Read this whole file before you start.

## About this project
(Not filled in yet. Describe the project in one sentence.)
This is a new project; nothing has been built yet.

## Why we are building this
(Not filled in yet. Say what should change for the business.)

## What it must do
(Not filled in yet. List the main things people can do with it.)

## It must never
(Not filled in yet. List your red lines.)

## How it is built
I'm not a developer. Suggest common, well-supported tools, explain each choice in one plain sentence,
and wait for my OK before setting anything up. Prefer free or low-cost services.

## Where things are
Nothing yet. Once the first version exists, write a short list of the main folders and what is in each, and ask me to check it.

## How much you may do on your own
- Planning what to build: suggest what to do and wait for my OK before doing it.
- Writing and changing code: go ahead, then show me the result to check before we keep it.
- Testing that it works: go ahead on your own and tell me afterwards what you did.
- Adding new tools or services: suggest what to do and wait for my OK before doing it.
- Putting it live for customers: suggest what to do and wait for my OK before doing it.
- Changing or deleting real data: don't do this yourself. Explain the steps and I'll do it.

## House rules
- Explain things in plain language. I'm not a developer: define any technical word the first time you use it.
- Work in small steps. Finish and show me one piece before starting the next.
- Ask before adding anything that costs money or needs a new account.
- Never put passwords, keys, card numbers or personal data in files or messages.
- Save a restore point (a git commit) before big changes, so we can undo them.
- When you're unsure, ask me. Don't guess. List anything you assumed.
- When you finish, tell me what you changed and how I can check it myself.

Put the file in place, step by step

  1. Download the file from the wizard, or copy it into a new text file named exactly AGENTS.md (or CLAUDE.md for Claude Code): capital letters, ending in .md.
  2. Save it in the top folder of your project, the folder that holds everything else. Not in a subfolder.
  3. Using Claude Code and other tools too? Keep the note as AGENTS.md and add a CLAUDE.md next to it containing one line: @AGENTS.md. Then both names point to one note. The project rules guide lists the file name each tool reads.
  4. Open your agent in that folder and send the first message the wizard gave you. It asks the agent to read the file and repeat back what it understood, so you can catch misunderstandings before any work starts.
  5. Fix the file, not the chat. When the agent gets something wrong twice, add one clear line to the file. The chat is forgotten; the file is read every time.

Never put secrets in this file. No passwords, card numbers or keys to online services. The file is sent to the AI and is often shared with other people along with the project.

Common mistakes, and the fix

Mistake Vague Clear
Goals nobody can check “Make the site better.” “Half of pre-orders online within three months.”
No red lines (nothing) “Never take card payments online.”
Forgetting what goes wrong “Customers can order.” “Sold-out items show ‘sold out’.”
Generic advice “Write good code.” “Ask before adding anything with a monthly fee.”
A note that’s out of date Still says “no delivery” after you started delivering Update the file the day the rule changes
A file that’s too long Ten pages of history Two pages, with links to the rest

Start small. One page with your why and your “must never” list already makes a big difference. Add the rest when the agent shows you what it’s missing.

Frequently asked questions

Do I need to be a developer to write a context file?

No. The most valuable parts, why you're building it and what it must and must never do, are business knowledge only you have. The technical parts can be left for the agent to fill in; the wizard has an "I don't know, let the AI suggest" choice for exactly that.

Is AGENTS.md the same as CLAUDE.md?

They do the same job. AGENTS.md is an open format that many AI coding tools read; CLAUDE.md is the name Claude Code looks for. If you use Claude Code, a CLAUDE.md can contain the single line @AGENTS.md so you keep one file. The guide to project rules lists which file each tool reads.

How long should the file be?

Short: one to two printed pages is plenty. Agents read it at the start of every session, and a long file costs more and is followed less carefully. Link to longer documents instead of pasting them in.

Can the AI write the context file for me?

It can draft the technical parts (how it's built, where things go) by reading an existing project, and you check them. The why and the what-must-never-happen should come from you, because the AI can only guess at your goals and your red lines.

Does the wizard send what I type anywhere?

No. It runs entirely in your browser. Nothing is sent to a server or saved; close the page and it's gone, so copy or download your file first.

How often should I update it?

Whenever something important changes: a new goal, a new rule, or a mistake the agent keeps repeating. One clear new line in the file usually fixes a repeated mistake.

Sources

  1. AGENTS.md: a simple, open format for guiding coding agents
  2. Claude Code Docs: memory and CLAUDE.md