Skip to content
Anttivuoriainen.com

Blog

From prompts to loops: how we learned to instruct AI agents

Instructing AI has moved from wording a prompt, to curating context, to engineering the loop the agent runs in. Some of these are real terms; some are barely a year old.

8 min read
On this page

A couple of years ago, getting good work out of an AI model was mostly about finding the right words. You'd reword the question, add "think step by step," promise it a tip, and watch the answer improve. That skill had a name, prompt engineering, and for a while it really was the job.

It still matters, but the wording stopped being the hard part. As the models got more capable and started running as agents that act on their own, the interesting problem moved somewhere else: not what you say in one message, but the whole system the model is working inside. The way we instruct AI has been climbing a ladder, from the prompt, to the context, to the loop the agent runs in. Some of the rungs on that ladder are solid, established ideas. Some are terms barely a year old that people are still arguing about. I'll try to be clear about which is which, because a lot of writing about it blurs the two on purpose.

Prompt engineering: still the foundation

Prompt engineering is the one term here that's genuinely settled. Anthropic, OpenAI, and Google all document it, and there's a popular short course by that name. At its core it's unglamorous: write clear, specific instructions, show a few examples of what you want, ask the model to reason step by step, tell it what role to play, specify the format. None of that is a trick. It's the practice that made the GPT-3 generation usable at all, back when the surprising discovery was that a model could do a task just from a few examples in the prompt, with no retraining.

What's changed is the framing. For a capable model handed a clear task, the exact phrasing matters less than it used to. Anthropic now describes prompt engineering as one piece of something broader. So it's worth learning, and most people still under-invest in writing a clear instruction. It's just not where the hard problems live anymore.

Context engineering: the newer framing

The broader thing has a name too: context engineering. The idea is that good output depends less on one clever sentence and more on everything that lands in the model's limited context window. The instructions, yes, but also the documents you retrieve for it, the tools you give it, the earlier turns of the conversation, the memory it carries between sessions. Curating all of that is the real work.

This one is newer, and I want to date it precisely rather than present it as a long-standing discipline. It crystallised in the middle of 2025. Shopify's CEO Tobi Lütke posted that he preferred "context engineering" because it described the actual skill better, Andrej Karpathy amplified it a few days later, and Anthropic later wrote it up properly, calling it "the natural progression of prompt engineering." So it's more than a buzzword now, but it's about a year old, and a fair amount of the "prompt engineering is dead" coverage piled on top of it is hype sitting on a genuinely useful reframe.

The harness and the loop

Now the part that's easiest to oversell, so I'll be careful.

Underneath every AI agent there's a plain loop. The model thinks, calls a tool, sees the result, decides what to do next, and goes round again until the job is done or it hits a limit. That's it. The pattern was formalised by a 2022 research paper called ReAct and popularised by Anthropic's 2024 essay "Building Effective Agents," which defines an agent as, roughly, a model using tools in a loop based on what it gets back from the environment.

Wrapped around that loop is the harness, sometimes called the scaffold: the tool definitions, the sandbox the code runs in, the permissions, the orchestration that routes everything. The harness concept is solid and load-bearing. It's the standard explanation for something that surprises people, which is that the same model can score very differently on the same benchmark depending only on the system built around it. Evaluation groups like METR are explicit that you have to give a model a good harness before you can fairly measure what it can do.

Here's where the vocabulary gets shaky. "Harness engineering" and especially "loop engineering" are not textbook terms. "Harness engineering" was pushed into use in early 2026, mainly by OpenAI's Codex team and the writer Addy Osmani, around the idea that the engineer's real job is building the environment the agent works in rather than writing the code itself. "Loop engineering" is newer still and more fragile: Osmani coined it in a post around June 2026, crediting a couple of practitioners, and most of its use so far is in blog posts framing it as the "new meta." So treat these two the way I'd treat them myself: they aren't settled terms yet, but they name something real. The thing they point at, designing the system that runs the agent instead of prompting it by hand each step, is genuine, even if the labels are a year from proving they'll stick.

What this does to the human's job

Follow the ladder up and you arrive at a change in what the person is actually for. Once an agent can write and run its own work, the bottleneck stops being production and becomes two other things: saying clearly what you want, and checking whether what came back is right.

Anthropic's own engineers have started describing themselves as managers of AI agents. One estimated their work had shifted to something like 70% reviewing and revising rather than writing new code. The split they describe is that the person decides what to build and whether it's any good, and the agent decides how. I recognise this from my own use. I use these tools as a researcher, not a developer, and the work that's left for me is deciding what's worth doing and noticing when the answer is confidently wrong. Which is the same thing I wrote about vibe coding: knowing the syntax matters less now, and what matters is knowing what to ask for and recognising when the answer is wrong.

I'd flag, though, that "manager of AI agents" is 2025–26 industry language, not a job title anyone's hiring for yet. It's a useful description of a real shift, not a settled role.

What this means for jobs

This is where I want to refuse both of the easy stories.

Against the "AI replaces the developers" version: the best evidence I've seen says expertise gets more valuable, not less. Anthropic's own analysis found that the more domain knowledge a person brought to a session, the more the agent got done per instruction, and that verifying the work is now the centre of the job rather than an afterthought.

Against the "pure productivity miracle" version: in a careful randomised trial, METR found that experienced open-source developers were actually 19% slower using early-2025 AI tools, even though they felt about 20% faster. The authors themselves caution it might not generalise, but it's a real result, and it should puncture the more breathless claims. And the labour data isn't all reassuring either. Researchers at Stanford found entry-level hiring in the most AI-exposed jobs already measurably down.

So the landing point is somewhere in the middle, and a bit uncomfortable: this looks like augmentation with an uneven redistribution. The work shifts towards direction and verification rather than disappearing, but the people who gain and the people who lose aren't the same people.

The shape of it

Strip away the labels and the shift is simple to state. Instructing AI has moved from choosing words, to curating context, to building the system the model runs inside. And the person has moved with it, from the one writing the work to the one directing and checking it. Two of the four terms I've used here might not survive the year. The underlying change almost certainly will.

If you want one place to start, Anthropic's piece on context engineering for agents is the clearest primary source on how the thinking has moved past the prompt.


Sources

Related posts