Agentic Notes
July 15, 2026
EssayMethodology · 16 min read

The Agent GymWhere Skill-and-Tool Training Actually Runs

Building a domain agent is training, run by hand: the skill file is the weights, the grader is the loss, and every patch is a gradient step. This essay is the room where that loop runs for real — a gym with students, a teacher, an answer key, and a courtroom that decides which layer was actually wrong when a score comes back bad. The full method, with receipts from a system that graduated.

improvetool·skill·rubric·keyONE EPOCHthe training loop, runningAuthor an itemexam questionN students sitDOER, fresh ×NMachine filtertier-1, deterministicFresh teacher gradestier-2, one per paperStatisticsverdicts + ticketsTHE COURTwhich layer is wrong?
A bad score enters a courtroom, not a patch queue. That court is the whole method.

Building an agent is training — run by hand

Strip a domain agent down to its parts and you find a model that never changes and a book that does. The model is frozen — you cannot touch a single weight in it. What you actually edit, run after run, is everything around the model: the skill file it reads on the way in, the tools it is allowed to call, the examples you show it. And that editing already has a name. Adjusting parameters against a measured error, repeatedly, until performance converges — that is training. Skill and tool are the weights. The grader is the loss. Every patch you make after a bad output is a gradient step, taken by hand.

Make it concrete. My agent is a relationship-manager copilot for a bank. When it answers a customer question wrongly and I add one rule to its skill file, I have done what backpropagation does — nudged the weights in the direction that reduces the error. The differences are real: no gradient, no guarantee a new rule does not break its neighbors, steps at human speed — and they are exactly why the held-out discipline later in this essay has to exist. But the shape of the loop is identical, and the loss function, at first, is just me.

Taking that frame seriously changes what you build. You stop tweaking prompts and start building the apparatus that real training requires: a fixed exam, an answer key, a grader you can audit, a held-out set (questions you never tune against, kept to prove the thing generalized), version pins. This essay is that apparatus — an actual training gym I built and ran for the bank copilot, driven until the agent graduated. It has students, a teacher, an answer key, a rubric, and, above everything, a courtroom. What follows is the operating method that fell out of running it: how a loop grades thousands of answers without lying to itself about how good the agent is.

One wider frame before the doors open, because it explains why a gym has to be built at all. Everything that improves anything runs on the same engine — try, measure the error, update. A team of agents building an app runs that engine where the unit of work is a feature and the verdict comes from a test suite. A gym training an agent runs the same engine where the unit is one exam question and the verdict comes from an answer key. Same loop, different unit. The difference is that software inherited its verdict machinery — fifty years of compilers, type checkers, and test runners, judgment frozen into free tools. A bank copilot inherits nothing. Nobody has ever compressed “what a correct answer to thisbank’s customer looks like” into a machine. So before you can train at all, you must manufacture the verdict machinery yourself. That manufacturing is the gym.

The loop, and the school it quietly borrows

The core loop is one sentence. You author an item — a realistic question. A batch of fresh students each answer it. A cheap deterministic machine pass (tier one) filters the obvious passes and obvious failures; a fresh teacher (tier two) grades what is contested. You read the statistics — and when a score is bad, you hold a hearing to decide which part of the machine failed. An editor agent drafts the fix, a strict gate — rules plus a human — accepts or rejects it, and the loop goes again.

Two vocabularies describe this machine, and you need both. For the engineer it is a training loop — weights, loss, held-out set, variance. For everyone else — the operator, the domain expert, the person you are pitching — it is a school. Say “the teacher grades the exam against an answer key” and anyone understands it in a minute. And the school metaphor is not decoration. Humanity spent a few hundred years optimizing exactly this problem — measuring an agent you cannot open, at scale, cheaply — and its inventions map onto ours almost one-to-one.

SchoolThe systemTraining a model
The exam / the briefMission — business + constraints + KPIsthe task / domain
The exam hallWorld — a frozen replica of the real data + systems, touched only through toolsthe environment
Open-book materialSkill — the procedures the agent reads in(no analogue — it’s the weights)
The instrumentsTool — what the agent can callthe action space
Answer key + mark schemeKey + rubric (the mark scheme)label + reward spec
The candidateDOER — a fresh agent, one per paperthe forward pass
The examinerFresh teacher (LLM grader) + a machine pre-passthe learned loss
Safety guard on a toolHook — blocks or nudges a bad tool calla constraint mask in the forward pass
Invigilator / exam rulesHarness — clock, identity, config

Here is what one item looks like when all of those parts meet on a single paper — the shape is real, the numbers are illustrative:

One exam item, end to end (illustrative — the real shape)text
QUESTION   Customer #4407 asks why yesterday's card payment was
           declined. Draft the reply.

KEY        (machine-generated from the real tools, then human-signed)
           expected tool : get_card_activity(4407)
           ground truth  : declined 18:42 · reason=over_limit · limit 20M
           must contain  : the real reason, the real limit
           must NOT      : reveal internal risk_flag=R2 · invent a fee

RUBRIC     ✓  correct reason + correct limit + no internal fields
           ⚠  correct but vague ("there was a limit issue")
           ✗  wrong reason · invented detail · leaked internal field

ONE PAPER  student calls get_card_activity(4407), answers with
           over-limit + the 20M limit, omits the risk flag
           → teacher: ✓ · slip stamped rubric v2 · key #a41

A few of the terms above carry the whole method, so read them slowly. The DOER is the student, and the first axiom of the gym is that the student never learns. The model is frozen; every paper is answered by a brand-new instance walking into the hall for the first time, carrying only the open-book material. That has one unforgiving consequence: you improve the student by editing the book, never by coaching the student. Whispering guidance into a chat turn is not training — it is a contaminated sample that no future run reproduces.

The key and the rubric are the interface between whoever wrote the exam and whoever grades it. Everything the grader needs must live inside that package, because the grader does not know the exam-writer’s intent. And the harness — the invigilator — owns the clock, the identity, and the config, and is never handed to the student. When a fresh lab session starts, you reanchor: re-stamp “today” onto the frozen world from a single source, so every part of the system agrees on what day it is. On the most recent cold start, that one command shifted 8,052 date cells across the world and regenerated 34 answer keys — a receipt for why the invigilator, not the student, holds the clock.

And the loop runs end to end, today. In a single recent pass: the world reanchored; a Haiku student (a small, cheap model tier) picked up the question and called exactly the tool the key expected — four rows back in fourteen milliseconds, seven cents of model spend; it answered, then filed a feedback ticket: a structured note on where the book or the tools failed it. The machine pre-pass sorted the paper, a fresh teacher graded it to a verdict, and the grading slip came out stamped with the rubric version and key version it was graded under. None of that is a mock-up. It is the machine in the hero diagram, turning.

A bad score is an accusation, not a verdict

Here is the single idea that separates a training gym from a prompt-tweaking habit. When a score comes back bad, the instinct — everyone’s instinct — is to blame the skill and patch the prompt. The skill is the easiest thing to edit, so it is the first thing accused. That instinct is a trap. A low score is not evidence that the agent is bad. It is evidence that something in the loop is wrong — and the agent is only one of five suspects, and usually not the one to try first.

So a bad score opens a hearing. The diagnosis walks a tree, and the tree runs in the reverse of your instinct: suspect the judge, the exam, and the room first — the student last.

A BAD SCORE — WHERE DO YOU LOOK?suspectfirst ↓last1RUBRICthe mark scheme is wrong2KEYthe answer key is wrong3HARNESS · LOSSthe room or the loss is off4TOOLthe instrument is missing5SKILLa real gap in the bookinstinctblames the student
The student is the last suspect, on purpose — you convict a defendant only after clearing the judge, the exam, and the room.

Why this order? Because a wrong label is worse than a wrong answer. If the rubric is broken and you feed its verdicts into the editor, every later epoch builds on a poisoned gradient — the editor dutifully “fixes” a failure that never existed, and the damage compounds. Clearing the environment first is not politeness toward the agent; it protects the training signal. The blunt version, learned the expensive way: fixing the wrong layer burns an epoch. And every hearing closes the same way — with a cheap check against ground truth, a human querying the real database for the exact scenario, before anyone is allowed to edit anything. A diagnosis you did not verify is just a guess.

The receipts make it concrete. Four hearings — and the student was guilty in only one of them:

What it looked likeThe tellGuilty layerThe fix
A whole batch of papers failed for a “missing phone number” flag.Graders kept flagging a field that a real query showed was simply absent, not missing.Rubric / keyThe extractor treated an absent field as “missing.” Absent ≠ missing. One rule fixed the whole batch.
Five out of five students “got the date wrong.”All five independently hand-corrected the clock in their answers.HarnessReanchor had been skipped, so the world’s clock was stale. Nothing wrong with the students at all.
Six papers that dumped a customer’s full PII sailed through the machine pass with an early ✓.They covered 100% of the key’s facts — the coverage score rewarded exactly the behavior the question forbade.RubricThe rubric rewarded fact-coverage on a question where the right move was to refuse. Patched → the trap caught all six.
A whole class failing to look up a suspended case before answering.Two independent fresh students missed it the same way, on the same kind of question.SkillA genuine gap in the book. This one was the student — a rule was added, with two witnesses first.

Look at that third row again, because it is reward-hacking caught in the wild — a rubric that checked too little, gamed by doing the wrong thing well. The rubric paid for fact-coverage; the right behavior was refusal — the question was a trap, an item planted where the correct move is to say no — and six papers leaked PII straight through a ✓. Nothing in the loop notices this by itself — the number looks great. The court exists so that somebody asks the question the metric cannot: is this score measuring what we meant? And in the most recent run the loop reached its ideal shape in the other direction — the teacher exonerated the student against the machine. The tier-1 pass had flagged a paper; the fresh teacher checked the actual ground truth and overturned the flag. That is the courtroom working: even the graders are on trial.

One honest caveat, because a careful reader will catch it anyway. While this gym was young, nearly every bug it surfaced lived in the harness or the loss, not the skill — which is exactly where the “suspect the environment first” rule comes from. But that rule is a discipline backed by a small sample, not a law of nature, and it has an expiry date. As the harness matures and grows its own regression tests, the environment stops being the usual culprit and the share of real skill gaps rises. Hold the prior too long and the tree that saved you early starts misdiagnosing in the other direction. The court is permanent. The prior on who is usually guilty is not.

The discipline that stops the loop from lying to you

A training loop with a human inside has one specific failure mode: it drifts toward telling you it is doing well. You tune on the questions you happen to have, grade with a scorer you wrote, and read a number that quietly measures how well you did on your own homework. The gym is mostly a set of disciplines against that drift — each one a wall between the loop and its own optimism.

  • Two ledgers, and they don’t touch. The training ledger is allowed to be biased on purpose — you hunt pain, pile up hard cases, over-sample where the agent bleeds. The reported pass-rate comes only from a separate measurement ledger that keeps the true, real-world distribution of questions. Read accuracy off the pain-hunting set and you scare yourself; read it off an easy set and you lull yourself. The number that leaves the building comes from neither.
  • Test-locked questions are sacred. The held-out set — “test-locked,” in the gym’s vocabulary — exists purely to answer “did this generalize?” The moment you tune against it, it is burned, and you mint a new one. When the bank agent graduated, this held literally: two candidate rules surfaced during the graduation exam, and the standing law — you fix nothing on the strength of the test-locked run — meant both were filed as suspicions to await training-set witnesses. The exam measures; it does not get to edit.
  • The author is not the checker. Whoever writes an exam question never sees the answer key; the key is machine-generated from the real tools and then signed by a human. The same separation runs the whole way down — nobody grades their own intent. (Today that is role separation inside one operator, not person separation: the signer of the key is still unaudited, and a domain expert’s counter-signature is the next wall to add.)
  • The teacher is fresh and single-tasked. One grader per paper, spawned clean. A grader who marks a stack in one sitting runs out of attention and starts blurring papers together — a real, observed failure. Grading is cheaper than answering, so you spend fresh graders liberally rather than tiring one out. One honest gap remains: fresh cures fatigue, not shared blind spots — clones of one model err in the same direction. The court’s ground-truth checks catch some of that; a standing human audit over a random slice of verdicts is the wall this gym still owes itself.
  • Interrogate the witness while it’s alive. Right after a score locks, you reverse-interview the exact agent that sat the exam — while it still remembers its own reasoning. It is the tool-user; ask it where the tool output confused it, where the book was silent. Let the witness die and read a transcript instead, and your evidence drops a rank.

These disciplines are not abstractions; they produce readable signal. Take the weak-student ladder: sit the same exam bank with a cheap model and a strong one, and the gap between them shows where the book — not the model — is carrying the load. It splits cleanly (sample sizes differ slightly): Haiku lands ✓23 / ⚠48 / ✗21 while Sonnet lands ✓42 / ⚠40 / ✗4. The cheaper student fails where the book is thin, which is exactly where you want the pressure. And the students’ own feedback tickets aggregate into a map of what to build next: of 181 tickets, 58 said “I had to handle this by hand” and 8said “I needed a tool that doesn’t exist.” That second number is a tool backlog written by the agents themselves.

What graduation looked like, stated honestly: 36 papers — six questions, six sitters each — under a locked skill and rubric, graded by fresh teachers against human-signed keys, measured against the gym’s standing bar (zero ✗ tolerated; ⚠ filed as work), came back ✓19 · ⚠17 · ✗0. The headline is the zero: not one paper committed a business error or a serious fabrication, and not one walked into a trap. But the seventeen warnings are the remaining work, not a rounding error — two whole questions came back all-warning (drafting an email, and reading a log), which is exactly why the graduation note filed two open suspicions instead of declaring victory. And six questions is a graduation exam for thisbank’s locked syllabus, not a bound on the wild: ✗0 says “no serious failure observed in 36 sittings,” nothing stronger. A gym that reports the ✗0 and buries the ⚠17 is back to lying to you.

GRADUATION — 36 HELD-OUT PAPERS6 sitters per questionquestion 1question 2question 3question 4draft an emailread a logpass — 19warning — 17serious fail — 0none, anywhere
The zero is the win; the two all-warning rows are the map of what’s left. Row totals exact; cell order within mixed rows illustrative.

A score means nothing until it’s pinned

Here is the quiet bug that voids every number above if you get it wrong. You measure the agent at 85%. You change the skill, remeasure, get 88%, and celebrate — but in between you also reseeded the world and regenerated the key, so the two numbers were measured against different realities, and the comparison means nothing. A score is not a property of the agent. It is a property of the agent against one specific frozen setup.

So every score in the gym carries five stamps, and comparisons count only when all five match.

EVERY SCORE CARRIES FIVE STAMPSskillr7·ae68d7toolv5·cbcbc0world2026-07-13·3c89d6rubricv2·d493dakey#a41·cbc471change the world → regenerate the key
Change the world, regenerate the key — or the number you compare against is measured on a different reality.

Skill, tool, world, rubric, key — five versions, hashed and pinned on every graded paper. Change the world and you must regenerate the key derived from it, or the ground truth you grade against has silently drifted. It is the same instinct as a locked training set and a pinned random seed: reproducibility is not a nicety; it is what lets a number from Tuesday mean anything on Friday. The grading slip from section two, stamped with its rubric and key versions, is this discipline showing up on a single paper.

The one weight you still can't remove

It is fair to ask, after all this machinery, where the human actually sits — and whether a strong enough model eventually automates them out. The gym answers with an accounting. Across the campaign, the machine did the volume: 127 edits proposed to the weights, of which the strict gate accepted 65 and turned the rest away — proof, at minimum, that the gate is no rubber stamp; whether it rejects the righthalf, only the held-out curve can say. The human’s contribution was small in count and decisive in kind: a handful of corrections to the loss itself — the moments where the definition of “good” was wrong and only a person could say so. (That last figure is counted from prose notes, not a clean ledger yet — stated with its own hedge.)

That division — the machine optimizes the weights, the human authors and corrects the loss — is the thesis this essay opened with, now with a bill attached. The machine cannot author the loss, because the loss encodes a reality the model has never seen: this bank’s data today, the line it must not cross, what “good” means to this business this quarter. The human defines and repeatedly corrects that; the volume work flows to the machine.

And there is a cleaner answer than “the human is smarter” to the obvious objection — what happens when the student is smarter than the teacher? The teacher’s authority never rested on being the stronger model. It rests on two asymmetries a weak grader keeps over a strong student. Information: the grader holds the signed key, or can query the ground-truth layer directly while the student only has tools — the student works forward, blind; the teacher checks backward, holding the answer. Attention: the student is multitasking — parse the question, call tools, hold five rules at once — while the teacher does exactly one thing: look for the flaw in a paper that already exists. Verifying is cheaper than generating. Lose both asymmetries and you are genuinely stuck. Keep the key, and an ordinary teacher grades a far stronger student; keep only attention, and you hold the line just on what is checkable — the same floor the closing section admits. That is why the seat does not evaporate as the models climb.

How this differs from tweaking a prompt — and when it's worth it

Set the gym next to what most people mean by “improving an agent” — hand-tuning a prompt until the demo looks good — and the differences are the entire value:

Manual prompt-tuning
  • You judge a handful of outputs by eye
  • “Better” is a vibe, unrecorded
  • A bad output → edit the prompt
  • You test on the cases you happen to have
  • No memory of what a change cost
  • Improvement stops when you get bored
The gym
  • A fresh teacher grades against a signed key
  • “Better” is a gated, versioned number
  • A bad output → a hearing that finds the real layer
  • A held-out set tells you if it generalized
  • Every edit is traced, gated, reversible
  • It converges — or tells you honestly it hasn’t

The cost is real: you are building a scorer, a world, a key, and a courtroom — not editing a paragraph. So the honest scoping question is when that cost pays back. Two dials decide it: how foggy the policy is (how much of “good” is unwritten judgment rather than a clear rule), and how much of the output has no machine-checkable ground truth (taste, persuasion, business-specific correctness). When both are high — a domain agent making judgment calls no compiler can grade — the gym is the only way to know whether you are actually improving. When both are low — crisp pass/fail, a narrow rule set — a few good test cases and a sharp eye are enough, and the gym is over-engineering.

WHEN DOES THE COURTROOM PAY FOR ITSELF?policy fogginess — how much of “good” is unwritten judgment →no machine ground truth →test cases + a sharp eyethe gym is over-engineeringTHE GYMthe only way to know you’re improvinggray zonegray zone
Two dials decide whether the courtroom pays for itself.

The gym also has a floor it is honest about. It measures compliance and truthfulness — did the agent break a rule, did it fabricate, did it walk into the trap. It cannot measure whether a real customer was actually persuaded; that ceiling only reveals itself in production, against real outcomes. That is the loop’s back edge — the point where the gradient source switches from a teacher to the market — and this system has not been through that fire yet. That story gets told once there are receipts.

What I am sure of is the shape, because I ran it to graduation. Building an agent is training. Training needs a gym. And a gym is only trustworthy when it has a court that can put the teacher, the exam, and the room on trial before it convicts the student — and reports the warnings as plainly as the wins.


◆ ◆ ◆

#AIAgents#Training#Evaluation#Human-in-the-loop