That free 2-hour Google course was spliced together: harness, eval, loop and graph

The 95 minute video going around X is a 9 minute 28 second short plus a hands-on livestream, cut into one file. The four layers inside it are real, and every one of them has a number you can check.

中文版是这篇文章的默认版本。 阅读中文版 →
This English page stays available at this URL; the Chinese version is the one we maintain first.

Through October and November the same video was reposted in four or five languages. The copy said Google had released a free two hour harness engineering course that takes you from zero to a 24/7 self-evolving agent system.

The video exists. The content is real. Free is real. The word course is not. I pulled the file down and measured it, and it runs 5711 seconds, or 1 hour 35 minutes 11 seconds. The first 9 minutes 28 seconds match, line for line, a short Google Cloud Tech published on 22 October called AI harness crash course. At minute 18 the browser tab reads Table for N, a Google Codelabs page for a hands-on session about evaluation and a self-evolving loop. Two pieces of material that were published separately, cut into one file.

That finding on its own is not worth an article. What is worth writing down is the structure the splice exposes. A harness decides what the model can see and touch. Evaluation turns the definition of good from a verbal judgement into something that runs. A loop moves the retry cycle off your desk and into the system, with brakes attached. A graph arranges several executors as a topology, and lets production failures become the next round of exam questions. Each layer answers a question the layer below it could not.

Figure 1 — what the video is made of. Blue is the 9 minute 28 second short, purple is the hands-on recording, and the five timestamps are chapters a re-poster added
tap to enlarge

1. The harness is the software around the model#

The short opens with a request nobody would call hard. Add an export button so users can download their data as CSV. The model knows how to write that code. It does not know what your project looks like, it has no permission to change a file, and it cannot run the app and click the button to see whether the download works.

You need software around the model to make those things happen, and that software is the harness. It has four plots of ground.

PlotWhat it governsWhat breaks without it
Context and memorysession, state, long-term memorythe follow-up instruction from ten minutes ago is gone
Tools and executionfunctions, MCP, sequential/parallel/loop/routeit decides to edit a file and the file never changes
Runtime and securitysandbox, injection, approval gates, privacyit reads upload your credentials and complies
Evaluationdeterministic checks, model judges, a humanit says done and nobody knows whether it is

A session is the full transcript of this thread. State is a scratchpad your application reads and writes. Long-term memory is the facts that survive the thread. Three lifetimes, three ways to misuse them. The most common mistake is stuffing into the prompt what belongs in state, then adding more instructions to compensate.

One sentence from the short is worth keeping verbatim. Those controls have to be enforced by software, and simply telling the model to be careful is not enough. A sandbox limits the blast radius of an attack, but it does not solve prompt injection by itself.

Figure 2 — four plots, four failure modes. Cannot remember, cannot act, cannot be trusted, cannot tell whether it was good
tap to enlarge

2. Evaluation is two decisions, not one#

Most teams treat evaluation as one action. It is really two choices on two axes.

The vertical axis is what you compare against. The horizontal axis is who judges. Four judges live in those four cells, with different costs and different blind spots.

Judged by codeJudged by a model
Against a reference answertext overlap, free, deterministicsemantic equivalence, one call
Against a rule seta checker function, free, deterministicrubric plus model judge, one call

The first cell is ADK’s built-in response_match_score, which is ROUGE-1 text overlap. In the lab it passed 4 of 8 tables, and it was wrong in both directions. One table fed everybody, was booked correctly, and failed because the reason sentence was worded differently. Another had a guest over budget and a guest after last orders, and passed at exactly 0.30 because enough words lined up.

The metric is not broken. It did exactly what it says. The team brought the wrong kind of metric. The correct answers for this dinner were always a set, and across the eight tables it holds 1, 2, 2, 1, 3, 3, 6 and 1 plans.

The useful part of that picture is triage. When a metric looks unreliable, first ask which axis failed. If you compare against the wrong thing, a better model will not help and you need to move down the vertical axis. If the judge itself wobbles, move left on the horizontal axis and freeze the judgement into code.

Figure 3 — two axes, four judges. Blur them and you fix the wrong layer
tap to enlarge

3. Building a judge that calls no model#

Writing the definition of good as code is simpler than it sounds. This function walks the table person by person and returns a score plus the reasons.

def ate_detail(person_id, rest, chosen_min):
    p = PEOPLE[person_id]
    if p.get("diet") == "vegan" and not rest["vegan"]:
        return False, "nothing vegan on the menu", "diet"
    if p.get("allergy") == "nut" and not rest["nut_safe"]:
        return False, "everything is finished in peanut oil", "allergy"
    ...
    if "budget" in p and rest["price"] > p["budget"]:
        return False, f"~${rest['price']}/person against {name}'s ${p['budget']} budget", "budget"
    ...                                    # walk, then timing
    return True, "ate", ""

There is no model call anywhere in it. Same input, same verdict, same two sentences of why. It does not drift when the model updates, it costs nothing to run, and it cannot invent an excuse. Over eight tables and 36 seats, six seats go hungry.

Wiring it in as an ADK custom metric has one trap worth knowing before you start. ADK does not apply your threshold to a custom metric, so PASSED or FAILED is whatever your function returns.

def _status(score, threshold):
    # ADK does not apply your threshold here. This line is the verdict.
    return EvalStatus.PASSED if score >= threshold else EvalStatus.FAILED

Put one answer in front of three judges and they disagree. For table p1 the comparator said PASS at 0.30, the checker said FAIL at 0.60, and the model judge said FAIL and named the guest who arrives after last orders. One counts letters, the other counts seats.

Press the button again and the comparator card does not move, the checker card does not move, and the model may. That may is the moment its blind spot stops being a footnote.

Figure 4 — the judge that walks the table. Hard constraints on the left, six checks in the middle, verdict and reasons on the right
tap to enlarge

4. A loop is only useful if it stops#

Loop engineering can be defined in one sentence. Replace yourself as the person who pastes output, edits the prompt and tries again, with a system that retries until it passes.

It has four named ways to break. Runaway, where there is no exit condition and the tokens being burned are money. Unverified autonomy, where the agent reuses its own judgement from the previous round. An uncheckable goal, where make the summary better cannot be judged. Complexity, where one loop is asked for a fifty page PDF with charts.

The first one has a concrete fix in ADK 2. A Workflow gives you the back edge, but it does not give you an iteration cap, so you keep it yourself. The router carries four belts.

def router(last_score: float):
    if last_score >= world.THRESHOLD:        # ship on pass
        yield Event(route="ship")
    elif ep["round"] >= MAX_ROUNDS:          # round budget, 4 by default
        yield Event(route="ship")            # stopping is also a decision
    elif last_score <= ep["best"] and ep["flat"] >= 1:
        yield Event(route="ship")            # two flat rounds and stop
    else:
        yield Event(route="improve")
# publish() truncates a runaway rewrite at 2400 characters

Worst case is four rounds, two model calls each, eight calls and a hard ceiling. The measured round went from 0.60 to 1.00 and shipped in about five seconds.

The second failure deserves its own paragraph. When the same session does the work and then grades it, the context already holds its own assumptions, so it confirms them. Use a supervisor session without that memory, or better, use a deterministic function. If code can judge it, do not let a model judge it.

Figure 5 — one cycle and four belts. A ReAct round on the left, role separation, stop rules and failure modes on the right
tap to enlarge

5. A graph fixes topology#

Someone about to run a marathon asks an agent how to run the race. The first attempt is one agent and one enormous prompt. The answer is confident and very specific, and every number in it is invented, because there is no weather API and no course data.

The fix is not a better prompt. The fix is structure. Nodes are agents or deterministic functions, edges are control flow, and predictable work goes into functions while judgement goes to the model.

Three primitives cover most of it. Fan-out runs independent fetches in parallel. Join waits for the slowest and bundles the outputs into a dictionary keyed by node name, so nobody has to write a merger. A router dispatches on a condition, and the choice between an if statement and a model call is decidable, closed set with the signal in the data versus open set with the signal buried in language.

The cost accounting is the counterintuitive part. Three parallel fetches, one join and one strategist is still exactly one LLM call. A graph does not cost by node count, it costs by how many nodes need to reason.

Whether to draw one at all has two questions. Can you draw the workflow before the input arrives, and does the shape itself depend on the input. If neither holds, do not draw.

Figure 6 — three primitives. Parallel fetches on the left, join waits for the slowest, a closed set router dispatches on the right
tap to enlarge

6. Self-evolution is failure becoming an exam question#

The last layer closes the previous three into a circle. Production traffic splits into two pipes, one for looking and one for learning. Cloud Trace answers whether things are fine right now, and BigQuery rows with one event each answer what we should learn.

Then three steps. harvest.py re-grades every row with the same everyone_ate function, needs no golden answer, and mints the failures as eval cases. GEPA, behind adk optimize, reads the reasons on those failures and writes a new instruction. A human re-runs the exam on the holdout with that instruction before anything ships.

GEPA does not climb a score, it reads reasons. One real run made 150 metric calls in under seven minutes and produced a 2445 character instruction containing a last-orders rule the draft never had. Two runs produced completely different wording that scored alike. It finds the rules, not the sentences.

The gate is not optional. One recorded result moved the holdout from 3 of 8 to 6 of 8 while hungry seats went from 6 to 9. Pass counts and hungry seats answer different questions, and a few ruined tables can be worse than many slightly broken ones.

The counterexample sits in the same material. Swap the judge for a function that reads a star rating and never reads the party, and the same eight answers become 8 of 8 with 15 of 36 seats hungry. A proxy metric is not always wrong. It is wrong where you are not looking.

A loop will push up whatever number you hand it, which makes the real question something other than how to get the loop running.

Figure 7 — the flywheel. Two telemetry pipes and only one feeds the exam, with a human gate on the last turn
tap to enlarge

7. The numbers, and where each one comes from#

NumberWhat it meansSource
5711 secondsactual length, 1:35:11measured, yt-dlp metadata
9 minutes 28 secondslength of the short inside the splicemeasured, transcript comparison
4 of 8tables the comparator passedcodelab record
0.30 and 0.60two judges on one answercodelab record
3 of 8 to 6 of 8holdout passes after optimisationcodelab record
6 to 9hungry seats after optimisation, worsecodelab record
8 of 8 and 15passes and hungry seats under a gameable judgecodelab record
150metric calls in one adk optimize runcodelab record

Every lab number comes from that codelab page, not from my machine. The two length figures are the exception, and you can reproduce both in a minute.

8. Three things you can check yourself#

First, measure it. Read the X video metadata with yt-dlp and look at duration. Then pull a frame at minute 18 with ffmpeg and read the browser tab.

Second, compare the words. Transcribe the first 9 minutes 28 seconds and put them next to the Google Cloud Tech short. The opening line, by the end of this crash course video you will understand all the components of an AI harness, is the same sentence.

Third, run a minimal judge. No cloud project needed. Write a pure function, feed it three answers you already know, and check that a plan feeding half the party scores 0.5 and fails, that two different valid plans both score 1 and pass, and that an answer missing a field always fails. Using a judge you never tested is the most common mistake at this step.

9. Questions I cannot answer yet#

How far self-evolution should go. In the lab it touches exactly one artifact, the instruction, while the model, the tools and the graph stay still. The Harness² paper pushes it to the whole harness, at the cost of several extra runs per task and a stronger model doing the editing. Nobody has published a rule for when that trade pays.

Which job standards can be written as checkable rules. A dinner works because every guest has one hard constraint. A strategy document, an architecture review, a piece of customer correspondence, and the answer for each is unclear. Until that is solved, eval engineering stops at tasks whose answers can be enumerated.

Who pays for the runaway. Four rounds is an engineering decision, not a technical one. It assumes you will pay for eight model calls on a run nobody watched. That assumption prices out differently for a solo developer, a team and a large company.

References#

Search 50 essays

Browse all writing