Foundations
What an AI coding agent actually is, the loop it runs, and the one mental model that makes every tool make sense. No building yet — just the ideas everything else stands on.
If you only take one track seriously, make it this one. Everything else — Claude Code, Codex, Cursor, MCP, evals — is a variation on the ideas here. Get these right and new tools stop being intimidating; they’re just different dialects of the same language.
An agent is not autocomplete
There are three very different things people lump together as “AI coding,” and confusing them is the first thing that trips people up:
- Autocomplete (old Copilot, Cursor Tab) finishes the line you’re typing. You’re still driving every keystroke.
- A chatbot (ChatGPT in a browser) answers questions. You copy code back and forth by hand.
- An agent (Claude Code, Codex, Cursor’s agent mode) is given a goal and acts on your actual files — it reads the repo, writes changes, runs commands, reads the errors, and tries again.
That third one is the shift. You stop being the typist and become the director: you set the goal, give context, review the work, and decide what ships. The skill you’re learning here isn’t “how to code faster” — it’s how to direct a capable, tireless, occasionally-overconfident junior who works at machine speed.
The loop every agent runs
Under the hood, every agent is running the same loop, over and over:
plan → act → observe → repeat
- Plan — figure out what to do next.
- Act — edit a file, run a command, call a tool.
- Observe — read the result: the test output, the error, the file that changed.
- Repeat — use what it observed to decide the next move.
When an agent feels like magic, it’s because this loop is tight and well-fed. When it feels dumb — going in circles, “fixing” things that weren’t broken — it’s almost always because the loop is starved of context or feedback. Your whole job as the director is to keep that loop fed: a clear goal, the right context, and a way for the agent to see whether its last move worked.
The single biggest lever a beginner has is not a better prompt — it’s giving the agent a way to check its own work. An agent that can run the tests and see them fail will fix itself. One that can’t will confidently hand you broken code.
The one mental model: the model vs the harness
Here’s the idea that makes the whole landscape click.
- The model is the brain — Claude, GPT, etc. It’s what actually reasons and writes.
- The harness is everything around it — the tool that feeds the model your files, runs its commands, manages permissions, remembers context. Claude Code, Codex, Cursor, and opencode are all harnesses.
The same model can live in many harnesses, and one harness (like opencode) can run many models. So “which is best” is really two questions: which brain and which cockpit. Once you see this, switching tools stops being scary — you’re keeping the skill (directing the loop) and just changing the cockpit. That’s why this whole hub teaches the pattern first, then each tool’s dialect.
Read Anthropic’s Building Effective Agents alongside this lesson — it’s the reference for how agents and workflows actually differ, and it’ll pay off in every track after this.
Getting set up (safely)
You don’t need much to start, but you do need to not shoot yourself in the foot:
- A terminal. You’ll live in it more than you expect. On a Mac, that’s Terminal or iTerm. You need Node.js and git installed.
- Access to a model. Either an API key or a subscription, depending on the tool. Claude Code works with a Claude subscription; Codex with a ChatGPT login or an API key; opencode with a key from any provider.
- Version control from minute one.
git initbefore you build anything. This is your undo button when the agent makes a mess — and it will, sometimes. Being able togit resetto a known-good state is what lets you say “just try it.” - Never commit secrets. API keys go in a
.envfile that git ignores — never pasted into code the agent might commit. Leaked keys are the most common expensive beginner mistake.
What “good” looks like
By the end of this track you should be able to explain, without notes:
- the difference between autocomplete, a chatbot, and an agent;
- the plan → act → observe → repeat loop, and what “starving” it means;
- why the model and the harness are separate things;
- why version control and a
.envfile are non-negotiable before you build.
That’s the foundation. In Track 1 you’ll pick one tool and put all of it to work — shipping the same starter project so you can feel the pattern before you commit to a favorite.