
Tutorial · Track 03: AI & AI Agents · 12 min read
I keep telling people an agent is nine lines of code. They keep not believing me. Let me show you.
A tutorial on what AI agents actually are, why they are surprisingly useful for non-technical people, and the deeply unglamorous secret of how they work. Includes one mediocre joke about for loops and one strong opinion about whiteboards.
Written by
Anders Lindholm
Editor-in-Chief, Vogue and Code. Fifteen years across Stripe, Klarna, and Lovable. Has spent a suspicious amount of the past eighteen months yelling at his terminal in a friendly way.
An agent is nine lines of code. I am sorry. I do not make the rules.
Right. Let us start with the part that will annoy you. The phrase “AI agent” has been used so loudly, so often, and by so many people trying to sell you something that it has acquired a mystical quality. People talk about agents the way medieval people talked about angels. Agents are going to take your job. Agents are going to run your company. Agents are going to do everything from book your flights to architect your wedding.
An agent is a for loop. It is a for loop that calls a language model and lets the language model push some buttons in between calls. That is the entire technical innovation. I have been writing software for fifteen years and I promise you this is what the industry got excited about. We can be embarrassed about it together.
The reason it matters — and it does matter, despite being conceptually unremarkable — is that the buttons turn out to be everything. Let me show you what the loop actually looks like.
Figure 1 · The Entire Innovation
What is happening inside an agent.
The whole loop. You give the LLM a prompt. It decides whether to call a tool. The tool runs. The result goes back into the LLM. It decides again. This repeats until the LLM decides it is done. Then you get the final answer.
The whiteboard problem (or, why an LLM on its own is not enough).
There is a classic technical interview where the candidate is asked to write a working program on a whiteboard. No computer. No internet. No compiler to catch your mistakes. Just you, the whiteboard, and the marker. I have done this. It is genuinely one of the most cognitively unpleasant experiences in modern professional life. You have to remember every detail of the language, every detail of the standard library, and you have to get it right the first time because the marker does not forgive.
Asking a language model to write a working program with nothing but a chat window is exactly the same thing. The LLM has to remember everything, has to invent the program out of pure recall, has to hope it does not hallucinate a function that does not exist or get a syntax detail wrong. It can do this surprisingly well. But it is still doing whiteboard programming, and whiteboard programming is hard.
An agent is the same LLM, given access to a real computer. It can run code and see if it works. It can search the documentation when it is uncertain. It can read files in your project. It can patch its own mistakes when the tests fail. The difference between the LLM-on-a-whiteboard and the LLM-with-tools is the difference between a stressed interview candidate and that same person sitting at their desk on a Tuesday afternoon. The skill is the same. The performance is dramatically better.
Figure 2 · The Difference In Practice
Whiteboard LLM vs. Agent LLM.
Same underlying model. Same training data. Same intelligence. The thing that changes is whether the model is allowed to use a computer like a human programmer would.
The unglamorous list of tools that makes the whole thing work.
If an agent is the for loop, the tools are the buttons. The list of buttons is shockingly short. I will list them here, mostly to demonstrate that there is no magic. These are the same primitives any working programmer has had since approximately 1973.
- bash — runs any shell command. This is the single most important tool. Everything else is, in some sense, a special case of this one.
- patch — edits a file. Specifically, it applies a small change to an existing file rather than rewriting the whole thing. This is what lets agents work on real codebases without destroying everything.
- grep / find / cat — the classic Unix navigation tools. The agent uses them to read your project the way a programmer would: search for a function name, find the file it lives in, read the surrounding context.
- web_search / web_fetch — lets the agent look something up online. Crucial when working with a library whose documentation is newer than the model’s training data.
- todo — a notebook the agent uses to keep track of multi-step tasks. Sounds silly. Is not. The difference between agents that lose their place mid-task and agents that finish what they started is often just this.
- codereview — a self-check tool. The agent reviews its own changes before declaring itself finished. Catches roughly half of the obvious mistakes.
That is it. There is no secret thirteenth tool. Every serious agent you have heard about — Claude Code, Cursor agents, Sketch.dev, GitHub Copilot Workspace — runs on some variation of this list. The fancy names are just different combinations of the same primitives, wired up with different defaults.
“The agent is a for loop. The tools are the same Unix utilities I learned in 2009. The reason this works is that the LLMs finally got good enough to drive the loop. That is the whole story.”
Anders Lindholm
Why this should matter to you, specifically.
If you are not a programmer — and most readers here are not — the agent revolution looks like it is something happening to other people. It is not. It is happening to you, and you should know what shape it takes, because the practical consequences for what you can build by yourself are larger than the discourse suggests.
Three years ago, building a working web app required either learning to code yourself (months to years of investment) or paying a developer (thousands of pounds and the social cost of explaining what you wanted three times). Agents change this equation in a specific way. You can now describe a small useful thing in plain English to an agent — “build me a tool that takes a list of customer emails and groups them by sentiment” — and have working code thirty minutes later. The code will not always be perfect. It will sometimes be wrong. It will occasionally require you to push back and ask for a different approach. But it will exist, and most of the time it will run, and you will have written it without writing a line of it yourself.
That is not nothing. It is a structural shift in who gets to build software. I cannot overstate how much I think this changes the kind of person who ends up shipping useful products in the next decade. The constraint used to be the ability to write code. The constraint is now the ability to know what to build. Those are very different constraints. They favour very different people. They favour, in particular, the people Vogue and Code is written for.
How to actually start using one this week.
There are roughly three tiers of agent tooling available right now, and you should pick the one that matches where you actually are.
If you have never written code: Start with a chat-based agent like Claude or ChatGPT in its agent or “artifacts” mode. Describe what you want. Ask it to build a small thing. Iterate by asking for fixes. You will not be running the code locally yourself. The agent runs it for you in a sandbox and shows you the result. This is the easiest entry point and it is more capable than most people realise.
If you have written a tiny bit of code: Install Claude Code or Cursor on your laptop. These run an agent against the files on your actual computer. You can give them a folder and tell them to build something useful. You will need to be comfortable opening a terminal and following installation instructions. The reward is dramatically more capable agents than the chat interfaces.
If you are already a working developer: You already know which tools to look at. Go run Claude Code with the “dangerously skip permissions” flag on a project you do not care about, prompt it with something you have been putting off, and watch what it does. It is the most enjoyable I have had with my computer in three years. Possibly five.
In all three cases, the same principle holds. Pick something specific you want to build. Describe it concretely. Be willing to push back when the first version is wrong. Iterate. The skill you are building is not coding. The skill you are building is precise communication about what you want, which is the more durable skill anyway.
A short list of things you should not do (learned the hard way).
I will end with the warnings, because the warnings are real and the discourse around agents tends to either pretend they do not matter or treat them as proof the technology is useless. Both framings are wrong.
Do not let an agent run on your machine with sensitive credentials. Agents can and will execute commands that touch the file system. If your laptop has production database passwords sitting in a config file, an agent that gets confused enough or prompted weirdly enough could end up reading them, sending them somewhere, or running a command against the wrong environment. Use containers or sandboxes when you can. Use throwaway accounts when you cannot.
Do not skip the review. Agents are good. They are not infallible. The code they produce often works but sometimes contains subtle errors that a careful read would catch. The seductive thing about agents is that the output reads as confident, which makes it easy to accept without thinking. Do the thinking. Read what the agent wrote. Ask it to explain anything you do not understand. Treat its output the way you would treat a junior developer’s first PR — with appreciation for the work and the assumption that it needs review.
Do not assume the agent knows what it is doing. The agent knows what the LLM behind it knows, plus what it has read in the current session. It does not know your business, your users, your past decisions, or the unwritten constraints in your head. If you do not tell it those things, it cannot use them. The agents that produce the best output are not the ones running on the most expensive models. They are the ones being talked to by humans who took the time to explain the problem clearly. That part is on you. It is also, perhaps not coincidentally, the part of the work that has always mattered most.
Reader Questions
FAQ — questions I get asked about agents almost every week.
Is an agent the same as ChatGPT?
No, but the difference is fuzzy now. Plain ChatGPT was a chat window. ChatGPT in “agent mode” with code execution and web browsing turned on is, by any honest definition, an agent. The same goes for Claude. The distinction is whether the model can call tools, not what brand name is on the chat window.
Do I need to know how to code to use one?
No, increasingly not. The chat-based agents now run code on your behalf in a sandbox. You describe what you want, the agent writes and runs the code, you see the result. You never touch a terminal. This is the easiest entry point and it is genuinely useful for small projects.
How much does it cost to use one?
The chat-based agents cost roughly £20 a month if you have a paid subscription. Developer-focused agents like Claude Code or Cursor cost more for heavy use — somewhere between £20 and £200 a month depending on how much you use them. For most beginners and hobbyists, the chat-based tier is plenty.
Why does an agent take so long compared to plain ChatGPT?
Because it is doing more. A plain ChatGPT response is one prompt, one answer. An agent might run twenty intermediate steps — reading files, running tests, searching the web, fixing its own mistakes — before declaring itself finished. That takes minutes, not seconds. The trade-off is that the final result is genuinely working code, not just a draft you have to debug yourself.
Can an agent really do whatever I ask?
Within limits. Agents are great at well-defined, smallish tasks — building a tool, writing a script, modifying an existing project. They struggle with very large open-ended tasks (“build me Facebook”), with things that require deep knowledge of your specific business, and with anything that demands genuine novel research. Frame the task carefully and they perform much better.
What is the biggest mistake beginners make with agents?
Asking for too much at once. People give an agent a one-line prompt expecting a polished product. The agent then makes a hundred assumptions about what was meant, and most of those assumptions are wrong. The fix is simple: describe what you want in more detail. Include constraints, examples, edge cases. The more specific you are, the better the output. This is exactly the same skill as briefing a freelancer well.
Is the code an agent produces safe to use in production?
It depends on what you mean by production. For internal tools, scripts, prototypes, and personal projects: usually yes, with a review. For systems handling sensitive data, payments, or anything safety-critical: not without significant security review by someone qualified. The agent will not know the security context you operate in unless you tell it, and it can introduce vulnerabilities even when the surface-level code looks correct.
Will agents replace programmers entirely?
No. They will replace specific kinds of work that programmers used to do, which is a different claim. The work that involves clear thinking, system design, understanding users, weighing trade-offs, and judging quality — that work is not going anywhere. The work that involved typing out boilerplate code is. Programmers will be fine. Some kinds of programming jobs will not be.
How do I know when the agent is wrong?
By running what it produced and seeing if the result matches what you wanted. The honest answer is that you cannot always tell from the code itself. The fastest reality check is empirical: did the thing it built actually do the thing? If yes, the agent was probably right. If no, you have a starting point for the next round of feedback.
What is the most useful agent for beginners right now?
For absolute beginners, I genuinely recommend Claude or ChatGPT’s built-in agent modes. Free tiers exist for both. They run in a browser. No installation. You can be productive within ten minutes. For people slightly further along, Claude Code is excellent. The bar to entry has come down sharply in the past twelve months.
Can I trust an agent with my personal data?
Trust the agent only as much as you trust the company running it. Major providers (Anthropic, OpenAI, Google) have reasonable data handling policies for paid tiers. Read them before pasting anything truly sensitive. For personal information about other people, be conservative — the agent has no concept of GDPR.
Where does this all go next?
The next eighteen months will be about agents working more autonomously over longer time horizons. Today an agent finishes a task in minutes and hands you the result. Soon, agents will run for hours on multi-step projects with periodic check-ins. The technology is moving in that direction fast. The thing that will not change is that you still need to know what you want built, and you still need to verify it works. Those two human roles are durable.
A Closing Note
If this is the first piece you have read here, welcome.
Vogue and Code exists to translate the things the technology industry usually keeps behind a wall of jargon into language anyone can use to build. We do not assume you have a computer science degree. We do not assume you have any background at all. We do assume you are smart, that you want to make things, and that you have been told by enough people that you cannot. You can. The tools are finally on your side. Start with something small. Build it badly. Build it better. Then write to us about what you made.
Vogue and Code is editorially independent. We do not run paid placements or sponsored coverage. Tools mentioned in this tutorial reflect the editor’s honest current recommendations, not commercial relationships.
