
The Map (Prompt, Context, Harness, Loop and Graph Engineering)
Everyone says “AI agent”, but what is actually inside one? In this first lecture of the Harness Engineering series, we draw the map before we write any code.
You’ll learn the five terms people mix up all the time: prompt engineering, context engineering, harness engineering, loop engineering and graph engineering. We see how each one sits inside the next, so the next time someone throws these words around, you know exactly what they mean.
This is the foundation for the whole series. From lecture 2 onward, we build a real coding agent called Zill, from scratch, in plain Python.
The Loop (Building Zill, Part 1)
Every coding agent in the world runs on one tiny loop: think, act, look at the result, think again. In this lecture we open the harness and build that loop ourselves.
You’ll learn how the ReAct loop works and how it differs from the bigger loops people design around agents. You’ll build the provider, the one file that talks to the model, and the loop that keeps the conversation going. We also look at the philosophy behind Zill: a small engine, with the quality coming from detailed skill files.
By the end, Zill can speak.
Tools, Safety and Where Commands Run (Building Zill, Part 2)
A model alone can only write text. The moment you give it tools, it can touch your files and run commands, and that is when safety starts to matter.
In this lecture we build Zill’s hands and its conscience. You’ll build the tools that read, write and run, a permission gate that checks every single action, and a jail that keeps the agent inside one folder. You’ll also learn how to choose where commands actually run: on your machine, over SSH, or in a sandbox.
By the end, Zill can act, and act safely.
Context and Compaction (Building Zill, Part 3)
A model can only hold so much in its head, and on a long task the context fills up. What happens then? Most courses never tell you. This might be the most important lecture in the series.
We start with what really goes into the context on every call, and which parts are never touched. Then we open up how real harnesses handle a full window: where they cut, what they keep, and what happens when compaction itself fails. Finally, we build compaction into Zill.
By the end, Zill can keep working long after its window would have overflowed.
Memory, Skills, Sessions and Sub-agents (Building Zill, Part 4)
How does an agent remember things, load know-how only when it needs it, survive a crash, and hand work to a helper? That’s all in this lecture.
You’ll build a memory file that lasts between sessions, skills that load on demand, sessions saved to disk so a crashed run can resume exactly where it stopped, and sub-agents that take on part of a task. We also fix a subtle bug where a helper’s log can hijack a resumed session.
By the end, Zill remembers, recovers and delegates.
Harness, Fleet and Client (Building Zill, Part 5, the Finale)
The final lecture. We take every file we’ve built and tie them together into one class, so a harness becomes a real object you can create.
You’ll build the Harness class, a fleet that runs many agents on many projects at once (and why the worker limit protects your API, not your CPU), and a client with two front doors: interactive, and headless for scripts. We also look at three ways to put an agent behind a website. Then comes the crash test: we kill Zill in the middle of a task, and watch it come back and finish the job.
By the end, you have a finished coding agent that you understand line by line.
Learn how AI coding agents really work by building one yourself.
Tools like Claude Code and Cursor can feel like magic. They are not. Underneath is a small, understandable idea called a harness: the code around a language model that lets it act, remember, stay safe and finish a job. In this course you build a complete harness from scratch, in plain Python, with no frameworks and no third-party packages.
Your agent is called Zill. You start with the core idea and end with a working command-line coding agent.
What you will build:
The model client, with a single doorway to the API, retries and a neutral message format
The agent loop, the heartbeat that asks the model, runs tools and feeds results back
Six real tools (read, write, edit, run commands, list, search) that run locally, in a sandbox or over SSH
A permission gate with safe, read-only and yolo modes, plus a path jail that keeps the agent inside one folder
Context compaction, so long tasks fit inside a token budget
Long-term memory, skills and crash-proof sessions you can kill and resume
Sub-agents that take on a task with a clean context and report back
A fleet runner for parallel agents, and a command-line front door
Why this course is different: every lecture adds one small file, explains the design rules behind it, and ends with a demo you can run and test. You see why each part exists, not just how to copy it.
Who it is for: developers who want to understand agents instead of treating them as a black box.
What you need: basic Python and a model API key. A free key is enough to follow along.
By the end you will have a working agent you understand line by line, and the confidence to extend it.