AI Onboarding Guide

Track 3

Advanced

The model is fixed. Everything you can still change is code you write. This track is about that code: the harness, the loop, the orchestration, and proving any of it got better.

9 sections 30 to 40 hours Prerequisite: intermediate track
A note on how new this is

Sections 1, 2 and 6 cover terms that are roughly a year old and still settling. People use them inconsistently, and some of what is written about them is marketing. Where that is the case, this page says so and points at the primary source. Prefer the primary source.

1

Harness engineering

Everything that is not the model, which is everything you can still change.
Advanced

The harness is everything that is not the model: the prompts, the tool definitions, the policy for what enters the context, the step and cost limits, the sandbox, the retries, the subagents, the recovery path when a run dies. Addy Osmani's formulation is that a harness is every piece of code, configuration and execution logic that is not the model itself. The shorthand doing the rounds is agent = model + harness.

This matters because the model is the part you cannot change. You did not train it and you will not retrain it. So all of your engineering leverage sits in the harness, and the quality difference between two teams using the identical model is almost entirely here.

The design principle worth keeping

Every component in a harness encodes an assumption about something the model cannot do on its own. That makes the harness a list of workarounds with an expiry date. When a new model lands, go back and delete the scaffolding it no longer needs, because that scaffolding is now costing you context and constraining a model that has outgrown it. Harnesses rot in the direction of too much, never too little.

2

Loop engineering

Stop being the thing that prompts the agent.
Advanced

Loop engineering is the step after harness engineering. The harness is the static scaffolding. The loop is the runtime cycle, and the move is to stop being the person who prompts the agent and instead design the system that prompts it: find work, assign it, check the result, record what happened, decide what comes next.

LangChain's framing is a useful ladder, because it separates things that get conflated.

LoopWhat cyclesWho closes it
Agent loopModel calls tools until the task is doneThe stop condition
Verification loopOutput scored against a rubric, failures sent back with feedbackA grader, not the author
Event-driven loopA schedule, webhook or new document triggers a runThe outside world
Hill-climbing loopProduction traces are analysed and the harness is improvedYou, or an analysis agent
Two rules that save you

Separate the generator from the grader. Agents grade their own work generously. A separate evaluator with its own context and rubric consistently beats self-assessment. Put a hard ceiling on everything: steps, wall clock, spend. A loop without a ceiling is an outage waiting for a quiet weekend.

3

Agents that run for hours

Put the state on disk and let the context window become disposable.
Advanced

A task that needs four hours of work does not fit in one context window, and no window size fixes that. The answer is to stop treating the context as the place where state lives. State goes on disk: a plan file, progress notes, commits, a feature list. The context becomes a scratch space you are willing to throw away.

Once that is true, a full context reset stops being a failure and becomes a normal operation. The harness tears the session down and rebuilds it from the written record, and the agent picks up where the last one stopped. This is the single biggest idea on this track.

What to write down

The plan, with items marked done. What was tried and failed, so the next session does not repeat it. Decisions and why. Where the work currently stands and the exact next action. If a new session cannot resume from your notes alone, the notes are not finished, and the test is easy: start a fresh session and see whether it can.

4

Multi-agent orchestration

Buying context capacity, and what it costs you in tokens.
Advanced

Several agents, each with its own context and job, coordinated by a lead. The real reason to do this is not that many agents are smarter than one. It is that context is finite, so giving each subtask a clean window of its own buys capacity that a single agent cannot have.

It costs a lot of tokens, which is the honest trade. Reach for it when subtasks are genuinely independent and the work is read-heavy, such as searching a large codebase or reviewing a change along several dimensions at once. Avoid it when the subtasks need to agree with each other, because keeping several agents consistent is harder than doing the work once.

The pattern that works

A lead decomposes and delegates. Workers get narrow briefs and return findings rather than raw material. A separate verifier checks the result against a rubric. Keep every worker's brief self-contained, because a worker cannot see what the lead knows, and the brief is the only context it will ever have.

5

GraphRAG

For questions whose answer sits inside no single chunk.
Advanced

Ordinary retrieval cannot answer a question whose answer is not contained in any single chunk. "What are the recurring themes across these two hundred incident reports" is not findable by similarity search, because the answer exists only in the aggregate.

GraphRAG builds a knowledge graph from your text first: it extracts entities and relationships, clusters them into communities, and writes a summary of each community. A question can then be answered from the summaries for a broad question or by walking the graph for a specific one.

The cost is real. You are running extraction over your whole corpus, and re-running it as the corpus changes. Justify it with a question that ordinary retrieval provably cannot answer, and keep that question as your test.

6

Recursive language models

Give the model a REPL instead of a bigger window.
Advanced

A different answer to the long-input problem. Rather than enlarging the window or retrieving a slice, leave the input where it is and give the model a programming environment instead. The prompt sits in a Python session as a variable. The model writes code to inspect it, slice it and search it, and calls fresh copies of a model on individual pieces when it needs to read one properly.

No single call ever sees the whole input, so no single call overflows. The context window stops being a wall and becomes something the model navigates with code. Note what this inverts: retrieval decides what the model may see before it has seen anything, while here the model decides for itself what to look at next.

Status

This is recent research rather than settled practice, from Alex Zhang and Omar Khattab at MIT CSAIL. Treat it as a direction worth understanding, not a pattern to adopt on Monday. The relationship to retrieval is the interesting question, and it is open.

  • PrimaryRecursive Language Models Alex Zhang and Omar Khattab, October 2025. The original write-up, and the clearest explanation.
  • PaperarXiv:2512.24601 The paper, with Alex L. Zhang, Tim Kraska and Omar Khattab.
7

Tools at scale

When the tool definitions themselves become the context problem.
Advanced

Tool definitions are not free. Connect a handful of MCP servers and you can spend tens of thousands of tokens on tool descriptions before the conversation begins, every single call. At that point the tooling is the context problem.

The fix is to stop pushing every definition into the window. Expose tools as code the model can discover and call, load definitions on demand, and let it pass data between tools without routing every intermediate result through the context. A tool that returns a ten thousand row result set should hand back a handle, not ten thousand rows.

  • PrimaryCode execution with MCP Anthropic. Presenting servers as code to cut the token cost of tool definitions.
  • PrimaryAdvanced tool use Anthropic. Tool search, programmatic calling, and passing results between tools.
  • PrimaryAgent Skills Anthropic. Packaging procedural knowledge so it loads when relevant instead of sitting in every prompt.
8

Evals that resist gaming

Contamination, eval awareness, and infrastructure noise.
Advanced

Any eval used as a target gets optimised against, including by the model. Three failure modes are worth knowing by name, because you will hit all of them.

  • Contamination. Your test cases end up in training data, or in a prompt, or in the repository the agent can read. The score goes up and nothing improved.
  • Eval awareness. A model can recognise that it is being tested and behave differently from how it behaves in production. Anthropic has published measurements of exactly this.
  • Infrastructure noise. Flaky tests, network timeouts and container limits move agent scores by amounts large enough to swamp the difference you are trying to detect. Measure your own variance before you believe a gap.
What to do about it

Hold a private set back and never let it near a prompt or a repository. Re-run the same configuration several times and report the spread, not a single number. Grade with a rubric and a separate model rather than string equality. Refresh cases regularly, and when a number jumps, look for the bug before you celebrate.

9

Training and post-training

The shape of the pipeline, and what fine-tuning cannot change.
Advanced

Most of us will never train a base model, and that is fine. What is worth understanding is the shape of the pipeline, because it explains model behaviour you otherwise have to treat as magic: why a model is helpful rather than merely a text predictor, why it refuses some things, why it is confidently wrong in a particular style, and what fine-tuning can and cannot change.

Karpathy's GPT-2 reproduction is the honest version of this. It is four hours and it is a real training run, with the data handling, the hyperparameters and the debugging left in rather than tidied away.

Finish line

Six things that should be true before you call this done.
  • You have taken an agent that failed on a long task and fixed it by changing the harness, with a before and after you can show.
  • Your agent's state lives on disk, and a fresh session can resume from it. You have tested that by killing one.
  • You have a verification loop where the grader is not the generator.
  • Every loop you own has a hard ceiling on steps, time and spend.
  • You have measured your eval's run-to-run variance and know which score differences are real.
  • You can explain where recursive language models and GraphRAG each beat ordinary retrieval, and where they are not worth the cost.
After this

There is no track four. From here the work is reading primary sources as they appear and writing things down for the next person. The Anthropic engineering blog and the AI Engineer talks are the two feeds worth following.

Maintained by the AI team. Corrections and additions are welcome as pull requests.