How to Train AI Agents: The Rules File Method That Works

Airun Company · August 25, 2026 · 5 min read

How to train AI agents sounds technical, but the method that works is closer to onboarding a new hire than to machine learning. You write down how the job should be done, show a few examples of it done right, and correct the work weekly until it sticks. I have trained seven of them for my company, and every single one followed the same path: rules file, examples, test batch, weekly review. No code, no data science, no prompt engineering course.

Why the rules file beats the perfect prompt

A prompt is a request. A rules file is a job description. The difference shows up the first time the task varies. A prompt handles the variation you wrote for. A rules file handles the variation you did not write for, because it tells the agent what to do when it is unsure. That single paragraph, the what to do when confused part, is what separates agents that work from agents that stall.

The anatomy of a good rules file

Write it like you are handing the job to a capable stranger with no context. That is literally what you are doing. Every assumption you leave out, the agent will guess, and the guesses get expensive in review time.

Examples do the heavy lifting

Three past jobs done right teach more than any description. If you want a newsletter, include three newsletters you loved, with a note on why each one worked. The agent will match the pattern, not the words. Keep the examples current too. When the business changes, the examples change, and the output follows.

The test batch

Run the agent on three real tasks with real data and read the results like a new hire's first week. Fix the file, not the output. The rule is simple: if a result is wrong, the instruction is wrong, and the fix belongs in the file. After three rounds of fix the file and rerun, most agents reach good enough to hand real work.

The weekly review habit

Twenty minutes a week. That is the whole training program after the first month. The review is where training actually happens, because every correction you make becomes a rule for next time. Skip it for two weeks and the drift comes back, and the agent quietly gets worse while you blame the technology.

How to fix drift when it shows up

Drift always shows up the same way: the output starts generic, the tone goes flat, and the details get vague. The fix is never more prompting. It is rereading the rules file as a stranger and finding what you stopped saying. Usually the drift started because you changed the business and never changed the file. Update the file, update the examples, and the output follows within a batch or two.

Where the method lives

I put the whole method, including the exact rules file template and the review log format, in the book so you do not have to learn it the slow way. The files themselves are free in the starter kit, ready to adapt to your first task. The training takes a weekend of setup and twenty minutes a week after that, and the compound effect is real: every agent you add makes the next one faster to train.

The training schedule, week by week

Week one is the heaviest: write the file, gather the examples, run the test batch, and fix what comes back. Week two is the review rhythm: the file is mostly right and the fixes are small. By week four the review is a formality and the output is consistent. The schedule matters less than the rhythm, and the rhythm is one lane, one file, one review, forever. The training never really ends, because the business changes and the file changes with it, and that is the point: the file is the living training document.

When to retrain

Retrain the agent when the output starts drifting or the business changes lanes: a new product, a new tone, a new audience. The retrain is not a rewrite, it is an update: refresh the examples, check the never list, and rerun the test batch. The drift almost always traces to a stale file, and the fix is the file, not the model. The pattern is the same every time, which is why the training method above is the only one you need.

Set it up the right way

The book walks through the full system: 4 files, the org chart, the failure modes, and a 30-day blueprint. $29, plain English, 30-day refund.

Get the book, $29

Or the AI influencer team playbook, $19

Free AI guide →