The AI Spotlight Follow
Stanford Teaches a Whole Course on Self-Improving AI Agents. The Practical Version Is Three Agents and an Answer Key.
AI Agents

Stanford Teaches a Whole Course on Self-Improving AI Agents. The Practical Version Is Three Agents and an Answer Key.

Self-improving agents don't mean letting an AI rewrite itself until it's smart. A four-step playbook, a generator, a read-only verifier, a coach and a chosen autonomy level, shows how to build a feedback loop you can trust, with Stanford's CS329A ideas as the backbone.

Advertisement

"Self-improving AI" sounds like science fiction. It also sounds like a button: switch it on and your agent gets smarter overnight.

Neither is quite right. The real version is closer to a well-run kitchen. There's a cook, a taster who is not allowed to touch the pots, and a head chef who suggests one change to the recipe at a time. Remove any of the three and the system quietly stops improving.

This article explains that structure. It's based on a practical four-step playbook for non-researchers that distills ideas from Stanford's CS329A course, "Self-Improving AI Agents", a graduate course covering verifiers, test-time compute, reinforcement learning and agent evaluation. You don't need a PhD to use it. You need a job you can describe, a way to tell good output from bad, and some discipline about who is allowed to change what.

First, the vocabulary

A few terms trip people up, so let's pin them down.

Advertisement

An AI agent is not just a chatbot. It uses a model, tools and whatever context it has to get a job done, and it can direct its own process. A common textbook framing: an agent has a goal, interacts with an environment, collects feedback and uses that feedback to correct its next steps.

In practice, when you chat with an assistant you're talking to a "main agent" with memory, tools and a model that does the thinking. You can create sub-agents with different tools and different permissions.

A skill is a recipe you hand the agent: a reusable set of instructions, like a "draft this kind of email" routine. Skills can call agents, agents can use skills, and the skill is the guide while the agent follows it.

The two ways an agent can improve itself

Stanford's course covers two broad routes:

  1. Change the model. Fine-tune it or otherwise update its weights. That's real research and engineering, and some teams do it, but it isn't what most business owners and operators will do.
  2. Change what the model reads. Improve the inputs the agent works with. This is far simpler, and it's the approach the playbook focuses on.

Changing what the model reads can happen in three places:

  • The tools the agent has access to.
  • The context it's given.
  • The skills (instructions) it works from.

Everything below is about the second route.

Why you need verification at all

Before the four steps, one idea from the course explains why the whole thing is designed the way it is: verifiability.

Math is easy for AI to improve on because answers can be checked. If you can tell which outputs are correct, you can keep the good ones and learn from them. This applies to engineering too: code either passes the test or it doesn't. Stanford's lecture on robust verification traces the progression from early work on training verifiers to solve math word problems (an OpenAI paper from 2021) through step-by-step "process" supervision (the 2023 "Let's Verify Step by Step" paper) to ensembles of weak verifiers. The central finding of that line of work: generating a good answer and recognizing a good answer are different skills, and the gap between them is where the opportunity (and the danger) lives.

For business tasks, there is rarely a unit test. So the playbook's trick is to use the best available source of truth: you. Build a clone of yourself that answers questions the way you would, and judge it against your own past answers.

Step 1: Build the generator

The generator is the agent that does the actual job. Give it one narrow, well-defined job description. Generally, the more specific the job, the better the agent.

The example job here: answer team questions exactly the way I would. A clone is a good first project because you are the ground truth. You know instantly whether an answer sounds like you.

A good job description includes a reason behind every rule. "Always link to the admin portal's checkout page" is weaker than "Always link to the admin portal, because customers get the wrong page otherwise." Reasons let a later improver judge whether a rule still makes sense.

A shortcut: ask your assistant to interview you and write the agent file from your answers. You're giving it your voice, your judgment calls and your standard replies.

At this point you have an agent that can produce work. But an agent that can produce its own work can't necessarily tell you whether that work is any good. That's step two, and, in the words of the playbook, it's the part most people skip.

Step 2: Build the verifier

Why can't the generator check its own work? Because the student can't mark their own exam.

The course makes a related point: getting a model to critique itself can be harder than having other models critique it, because models can be overconfident, and that overconfidence can be measured. A famously funny comparison is the "World's Best Boss" mug: it's a great mug until you learn the boss bought it himself.

A caution from the playbook's sources: self-assessment can be wildly rosy. One study the presenter cited claimed that an agent reported improvement after every one of 54 self-improvement cycles, while a majority of those changes were actually flat or worse. We could not locate that study, so treat the exact numbers as a claim. The direction matches the broader research on overconfident self-grading.

So you need a second agent whose only job is to review output. Building a verifier takes two parts.

Part one: the answer key

The answer key (also called an evaluation set) maps inputs to the output you'd want. For code, that's a pass/fail test. For knowledge work, it's more nuanced. A simple approach is a table:

Input (a question) Your actual answer
"Where do I find the checkout link for a customer?" "Check the admin portal."

For the clone example, you can pull your real team questions and your real replies from your chat history, ask the assistant to extract the 20 most common questions, then review the list yourself to confirm each answer is exactly what you would say. Save it as a single file, such as answer-key.md.

The key is a living document. Every time the agent lets you down, it's not a failure: it's a new row. The key then becomes the source of truth for grading every future change.

Part two: the verifier itself

The verifier answers one question: is this answer right or wrong? Its defining rule: it never edits anything, not the answer key, not the agent. It only reads and analyzes. It should also explain why an answer is wrong, because that explanation is the raw material for the fix.

That read-only rule isn't a nicety. It's what makes the score meaningful.

Step 3: Add the coach

Now you have a generator that does work and a verifier that grades it. Who fixes the problems? There are three tempting answers, and all of them are traps.

  • "Let the verifier fix it." Then the score stops meaning anything, because the same entity writes the fix and grades it. And an agent that can see the test and also change the work learns to pass the test rather than do the job. The verifier is trustworthy only because it's read-only and has no stake in the result.
  • "Let the generator fix itself." It would be editing itself while trying to improve itself, so you'd be chasing a moving target.
  • "Let one agent do everything." All of the above, combined.

The answer is a third agent, the coach. It reads what the verifier found, then writes a draft version of the agent file, a candidate, next to the live one. It never touches the version that's actually running. Think of it as photocopying the working recipe and changing one ingredient to see what happens.

The coach follows three rules:

  1. One change per draft. If you change eight things, you can't tell which one made the difference. Isolate the variable.
  2. Never touch the answer key or the verifier. If the coach could edit those files, the easiest way to "improve" would be to change the test.
  3. Keep a versions folder. A history of past agents lets the system learn over time and lets you roll back.

Three separate agents also allow restricted permissions. You can set it up so the coach literally cannot edit the answer key or the original generator. At scale, that permission design is a core part of building safe systems.

Then the comparison: test the coach's candidate against the specific cases the generator got wrong, and against all historical versions. If the candidate scores better, it's a real improvement.

Step 4: Pick your level of autonomy

The last decision is the one many people skip: how much freedom does the loop get? There are three levels.

Level 1: You suggest the improvement

You notice a problem and tell the assistant. It writes the rule. This works from day one and suits plenty of cases. One line the presenter uses constantly is roughly: "Based on this conversation, update the skill or agent I used so this doesn't happen again." For high-stakes work, like a clone that speaks for you, it may not be enough.

Level 2: The AI suggests, you approve

The generator, verifier and coach run on their own against your past outputs, propose an improvement and leave you the decision. The system does the work; you keep the veto. The playbook calls this the Goldilocks zone, and says most people should live here.

A lighter version: a plugin that watches your conversations and proposes improvements in real time, which you accept or reject.

Level 3: The AI improves itself without you

The loop runs automatically, cycling through generator, verifier and coach until all the evaluation criteria are met. The playbook suggests capping it at about 10 iterations to save tokens and prevent an endless loop that burns time and money.

It's tempting. It also has a warning attached. One practitioner's comment, quoted in the playbook, makes the point: it's easy to switch on auto mode, but that "doesn't absolve you of the thought behind how we want to make improvements." If the loop changes your agent automatically, you can end up no longer understanding how it works, and unpredictable outcomes follow.

Which level should you choose?

  • Level 3 works when you have an extremely verifiable pass/fail test, which is mostly technical work.
  • If you can't write an exact, measurable evaluation, you'll struggle to build level 3 in practice. Stay at level 2, where your taste is the final sign-off.
  • Level 1 is available any time; use it whenever you notice something.

The mental model

Zoom out and the whole system is four pieces:

  1. Generator: a clear job description with a reason behind every rule.
  2. Verifier: an independent, read-only agent that checks work against an answer key.
  3. Coach: an agent that proposes one improvement at a time in a separate candidate file.
  4. Level: your decision on how much autonomy to grant.

The takeaway line from the playbook is worth remembering: self-improving AI doesn't mean letting AI rewrite itself until it's magically smarter. It means building a feedback loop where the intelligence is in how you design the system, including which decisions you leave to AI and which you keep.

A worked example you can try this week

Say you run a small agency and your team keeps asking you the same questions.

  1. Generator: Ask your assistant to interview you for 15 minutes, then write a "me" agent that answers internal questions in your voice.
  2. Answer key: Export 20 real questions and your real replies from your team chat. Edit until each answer is exactly what you'd say. Add the tricky ones, the ones where a wrong answer would cost money.
  3. Verifier: A separate read-only agent that takes a question, the generator's answer and your reply, and says "match / mismatch" with a reason.
  4. Coach: A third agent that reads the mismatches and drafts a new version of the generator's file with exactly one change, saved beside the original and in a versions folder.
  5. Level: Start at level 2. Each week, review the coach's proposed change and either approve or discard it.
  6. Maintain the key: Every time the clone gets something wrong in real life, add a row.

After a month you'll have an agent that has measurably improved against a fixed standard, a paper trail of every change, and a veto over all of it.

Why this matters

Most "agent" failures in the real world aren't about intelligence. They're about drift and unverifiable change: a prompt gets tweaked, something improves, something else breaks, and nobody can say which edit did what. The generator–verifier–coach split brings basic engineering hygiene to that mess: a fixed test, one change at a time, a version history and a role separation so nobody grades their own work.

It also reflects a broader trend in the research. Stanford's course frames verification as the enabling ingredient for test-time scaling and reinforcement learning, and the same logic applies to your business agent: improvement is limited by how well you can measure.

Counterpoints and risks

  • Your answer key can be wrong or too small. Twenty examples cover the common cases, not the rare ones, and a biased key trains a biased agent.
  • The verifier can be wrong too. If it's an AI judge, it can be inconsistent or fooled. Spot-check its verdicts.
  • Overfitting to the key. An agent tuned only on the answer key may do worse on new questions. Keep some examples held out.
  • Automation can hide complexity. Level 3 loops can produce changes nobody understands.
  • Extra agents cost tokens. Three agents and many iterations add up; cap loops and track spend.
  • Clones speak for you. Review anything sensitive before the agent answers on your behalf.
  • Simplicity is a feature. For a basic task, level 1 may be all you need.

FAQ

What is Stanford's CS329A?

A graduate course, "Self-Improving AI Agents," covering self-improvement techniques for language models such as verifiers and test-time compute scaling, then tools, code, memory, planning and evaluation for agents. The 2025 offering ran in the autumn quarter.

Do I need to fine-tune a model to build a self-improving agent?

No. The approach here changes what the model reads (tools, context and skills), not its weights.

Why three agents instead of one?

Separating roles prevents an agent from grading its own work, gaming the test or changing the test. It also lets you restrict permissions.

How many iterations should an automatic loop run?

The playbook suggests capping at about 10 to control cost and avoid infinite loops. Pick a limit that fits your budget.

Which autonomy level is best?

For most people and most non-technical work, level 2: AI proposes, you approve.

The bottom line

The idea behind self-improving agents is old and simple: measure, change one thing, measure again. What's new is that an AI can run most of the loop for you, which makes the guardrails matter more, not less.

Build the generator. Give it a verifier that can't edit anything. Let a coach propose single changes in a draft file. And choose, deliberately, how much of the loop you're willing to hand over. For most work, that choice is "propose, and let me decide."

Sources

Five AI Agents Want to Work While You're Away. A Same-Job Showdown Found a Surprising Tie.Up next · 11 min readFive AI Agents Want to Work While You're Away. A Same-Job Showdown Found a Surprising Tie.ChatGPT Dots, Meta Muse, Claude Duet, Grok Bot and the free open-source Hermes Agent all promise an assistant with its own computer. Here's what each costs, where each breaks, and what happened when Grok Bot and Hermes got the same three business jobs.Keep reading →