transcribe

Harness Engineering Explained in 20 Mins!

Aishwarya Srinivasan · 19m · transcribed Sep 2026
More from Aishwarya Srinivasan Business
𝕏 Share ▶ YouTube 📥 PDF 🤖 .md

Section Insights

# 0:00

Introduction to Harness Engineering

What is harness engineering and why is it important?

Harness engineering is a new discipline in AI that is crucial for transforming AI demos into actual products. It focuses on the environment and systems that support AI models, rather than just the models themselves.

  • Harness engineering is essential for effective AI deployment.
  • It differentiates between AI demos and real products.
  • Understanding harness engineering can enhance AI system performance.
# 3:57

Understanding Harness Engineering

What gap does harness engineering fill in AI development?

Harness engineering addresses the challenges faced by AI agents when operating autonomously over extended periods, ensuring they can make decisions without supervision.

  • Harness engineering supports autonomous AI decision-making.
  • It complements prompt and context engineering.
  • The discipline is rapidly gaining importance in AI development.
# 7:55

The Role of Codex in Harness Engineering

How does Codex exemplify harness engineering?

Codex operates within a controlled environment that allows it to execute tasks while adhering to specific permissions and feedback loops, demonstrating the principles of harness engineering.

  • Codex showcases the importance of a controlled execution environment.
  • Feedback loops are crucial for improving AI performance.
  • The harness, not just the model, determines the effectiveness of AI.
# 11:53

Key Components of Harness Engineering

What are the essential components of harness engineering?

Key components include self-checking mechanisms, guardrails for permissions, and observability to track agent actions and decisions.

  • Self-checking mechanisms help agents verify their work.
  • Guardrails ensure agents operate within safe parameters.
  • Observability is vital for understanding agent performance and failures.
# 15:50

Building a Complete Harness

How can one effectively build a harness for AI workflows?

To build a complete harness, focus on a specific workflow, incorporate automated verification, set clear permissions, and ensure comprehensive logging to track performance.

  • Start with a narrow, repetitive task for harness development.
  • Automated verification and logging are critical for success.
  • A well-defined workflow enhances reliability and reduces oversight.

Transcript

Speaker 1

0:00 The most important thing in AI right now has nothing to do with picking the right models. In fact, the teams shipping the most impressive AI systems in 2026 will tell you that model is the easy part. So in this video I want to break down one of the trending topics yet a pretty important topic, which is harness engineering. We're going to talk about what harness engineering actually is, why is it quickly becoming the discipline that separates AI demos from AI products, and how you can start practicing it this week.

Speaker 1

0:28 So here is what we're going to be covering specifically. First, what harness even is and why a model by itself, no matter how smart, is genuinely handicapped without a harness. Second, we're going to peel the onion on a product you probably use every day, the ChatGPT desktop app, and look at the actual harness sitting inside the chat. Work in codecs, because once you see it there, you'll see it everywhere. And third, we're going to go into the five components of every production grade, hardness plus a step by step roadmap in order to build one yourself.

Speaker 1

0:59 And this is not theoretical. A three person team at OpenAI started with an empty repository in late August 2025, wrote no code themselves for five months and ended up with a million lines of production code and 1,500 merged pull requests, every line generated by Codex, which is their coding agent. Now the thing that team obsessed over was not the prompt and it wasn't even the model, it is the harness. So stick with me. Now if you haven't watched my video on loop engineering and context engineering, I will link that in the description below because harness engineering builds directly on top of it.

Speaker 1

1:36 So if you haven't watched it, go watch it and come back and if you're new here. Hi there, I'm Aishwarya Srinivasan. I've spent over 10 years working in machine learning and AI. I have a Master's degree in Data Science from Columbia University and I've been a data scientist at Microsoft, Google and IBM. And, and I was also leading developer relations at one of the top AI startups, Fireworks AI. I recently quit that and now I'm building my own AI startup.

Speaker 1

1:58 I've also co founded the Gen Academy, which is an AI skill building platform which is focused on real stuff that teams are building in production. So you know that any of the things that I'm sharing with you is actually coming from an AI builder. Now let's start with where even the word harness came from because the analogy is part of the name. You know a horse is Powerful and fast. But raw power isn't useful work. Without a harness, a horse cannot really pull a cart or plow a field.

Speaker 1

2:24 The harness is the piece of equipment that converts raw power into directed and useful work. The model in this case is the horse. And the harness is everything that you build around it. Now why does this even matter so much? Because a large language model on its own is much more limited object than most people realize. If you strip away the product around it, what you have is a frozen set of weight that, that maps input tokens to output tokens.

Speaker 1

2:49 That's the entire interface. It has no persistent state, so everything is gone. Once the context window closes, it cannot execute code, it cannot read a file off the disk, it cannot make an API call, and it cannot even verify a single claim that it produced. Now that interface is a pure function. Tokens in, tokens out. Everything that you experience as AI doing useful work comes from the layer which is wrapped around that model. And that layer is the harness.

Speaker 1

3:17 Concretely, it is the tools the model is allowed to call and the schemas for calling them. The information which is piped into the context before each run, the checks that it is running on the outputs, the permission boundaries of what it can touch, and the logging that records what it actually did. If I were to just simplify all of it. Harness is basically the plumbing around the model. Now harness engineering is designing that execution environment deliberately.

Speaker 1

3:42 Which tools the agent gets, where is it information coming from, how does it validate its own work? And when it stops and hands back the control to the human. Here is how it fits the terms that you already know as three layers. Prompt engineering is something that optimizes a single exchange. One instruction, one output. Context engineering manages what the model can see once what gets retrieved and what fits in that window. Neither of them addresses what happens when an agent is running autonomously for hours and and making hundreds of decisions without any supervision.

Speaker 1

4:14 Now that's the gap the harness engineering is filling. Prompt engineering is what you can say, you say to the horse. Context engineering is what you let the horse see. And harness engineering is everything else that keeps the horse riding on the track. Now the term itself is very new, and the origin story actually explains why it spread so fast. So in February 2026, Mitchell Hashimoto, the co founder of Hashicorp and the creator of Terraform Partner, published a post about AI adoption journey.

Speaker 1

4:41 And he described a stage called engineering the harness. His rule was every time an agent makes a mistake, you engineer the environment, so it cannot make that mistake. Again, it isn't a better prompt, it is actually a permanent fix. Now, six days later, OpenAI published that million lines of code Codex, write up and Anthropic followed up with a piece on building efficient harness for long running agents. And within weeks, the term was everywhere. Every single person on the Internet was talking about harness engineering.

Speaker 1

5:10 Now, if you're wondering whether this is just a model quality in disguise, there is a clean experiment on this. So One engineer took 15 different LLMs and improved the coding performance of all of them in a single afternoon without touching a single model. What changed is only the harness. It was the same weights, better environment and measurably better results. See, that's the concept. Now let's make it concrete by taking an example that's sitting on your desktop right now and finding the hardness inside it.

Speaker 1

5:39 So this is my favorite part, because now we're going to peel the Onion. So in July 2026, OpenAI merged the Codex app and the ChatGPT app into one desktop application with three experiences in it, chat work and codecs. And the detail that most people missed is that the headline shipment that day was not a new model, it was harness. The same underlying model family behaves in three completely different products depending on which of these environments it is running on.

Speaker 1

6:06 Before you start going that, hey, this is a paid video. It is not. This video is not sponsored by OpenAI or any other company. This is just me sharing my experience using all of these tools and trying to help you understand the concept in the most realistic way possible. Okay, now getting back to peeling the onion to understand harness engineering better on an app like ChatGPT, which is sitting on your laptop. So layer one, let's talk about chat.

Speaker 1

6:27 This feels like just talking to a model, but it isn't even here. There is a thin harness, a system prompt that shapes the behavior before you even type a word. The model has a set of tools that it can invoke. Things like web search when you ask a question that needs fresh information, a memory system that persists facts about your own sessions, a sandbox Python environment for any file analysis. There is image generation inbuilt into it.

Speaker 1

6:52 There are safety filters which are running on input and output. Now it is a light harness which is tuned for turn by turn conversations, which is what you do in a chat window. Now layer two is actually when you're using work mode, it is the same app just with one toggle. And now you're talking to an agent that gathers context from your files and your connected applications. It decomposes a goal into steps and runs for hours to produce finished documents, spreadsheets or presentations.

Speaker 1

7:16 Now the model's capability did not change here, but the hardness actually got heavier. Now work adds a planning loop, connectors into your actual tools, the ability to take actions across them. Then there is approval checkpoints, where it pauses before doing anything consequential and scheduled tasks that even keep running when you walk away. Now those approval checkpoints are actually a guardrail and a harness component which are placed there by an engineer who decided that the agent should stop exactly at that point.

Speaker 1

7:44 Now hold on to that point. Just write a note and put it on your table because this is going to come back when we start talking about the five components later. Now the layer three is the Codex mode. This is the heaviest harness of the three and the most instructive one if you're technical. Codex gets a sandboxed execution environment or scoped access to a local folder where you can explicitly grant what it can touch. Before it writes a line, it reads the agents markdown file on your repository root, which is your team's accumulated instructions and conventions.

Speaker 1

8:13 It has a terminal so it can actually run your build and your test suite and observe its own failures. It produces diffs for your review in line, and it can actually review pull requests. Every capability is scoped, logged and wrapped in a feedback loop. That is exactly why the same intelligence that makes small talk in the chat tab can autonomously refactor a code base in the codecs tab. The weights of the model did not change the environment and the harness did.

Speaker 1

8:39 So when somebody asks which AI is the best, the honest answer is they're actually asking about the horse when they should be asking about the harness. A teamly weak sync is useful, but the real value is usually what happens after it. Somebody has to write the recap, turn the decisions into next steps, update people who missed it, and make sure that the important context does not disappear into everybody's memory. That is the workflow I use Granola for.

Speaker 1

9:02 Granola is an AI notepad for people in back to back meetings. It transcribes your computer's audio directly across zoom, meet, slack, and even in person conversations so there is no awkward bot joining the call. Now during the team sync I can actually take rough notes like launch slipping, design, waiting on copy, back end logged send, client Update, move deadline, etc. And after the call Granola turns those notes into clean summary with decisions, owners and action items.

Speaker 1

9:29 Then I can also ask turn this into a async team update and now I have a message that explains what changed, what is blocked, who owns the next step, and what needs attention before the next step. I can also ask what should go into Slack or what are the unresolved questions, that is what makes it really useful? The meeting doesn't just end as a call. It becomes the operating update for the team. If your team runs on syncs, standups, client calls or project reviews, Granola helps turn those conversations into clear next steps.

Speaker 1

9:55 You can try granola using the link in the description and new users get 100% off their first month. Now, if you're a software engineer or an AI engineer, or want to become one, here is a career relevant part that you need to know. When you use chat work or Codex or Claude code on the anthropic side, you are a Harness customer. Somebody else engineered that environment for you. Harness engineering is actually learning to build that layer yourself for your own agents and your own workflows.

Speaker 1

10:23 Which raises the obvious question, what is that layer actually made of? Now we're getting into the most exciting part of the video. Let's talk about the five components. Almost every production system uses some combination of all of these five, and you'll actually feel it, even if one is missing. So what are these five components? Let's start with the component one. Component one is system of record. These are basically instruction files. If you've used Claude code or cursor, you would have seen Claude markdown or agents markdown in the root of the project.

Speaker 1

10:50 This is a plain markdown file which the agent reads before working the project structure, the conventions, the build commands, and the decisions your team already made. Now the OpenAI team hit that trap directly, without answers to questions like what abstractions should I use? The agent guessed and guessed wrong repeatedly. And their conclusion was that if knowledge lives in Slack threads or Google Documents instead of the repository, the agents can't really see it, so it might as well not exist.

Speaker 1

11:17 Everything that the agent needs has to live where the agent works. Now that brings me to the second components, which is the tools. What can your agent actually do? Things like run shell commands, edit files, search the web, query a database, et cetera. Most people go into one of the two extremes. Access to everything which makes the behavior unpredictable, or access to almost nothing which makes it talk, but not really act. Now, good harness design is a small, deliberate set of tools where you can justify for each one why the agent needs it.

Speaker 1

11:47 Then we have component number three, which is the feedback loops and verifications. Now this is a big one and the part most People skip, so don't do that. An agent needs a way to check its own work without asking you in code. That machinery already exists. A linter, a type checker, or a real test suite which is running automatically after every change, so that the agent observes its own failures and fixes them before you even look at it.

Speaker 1

12:11 Now, the component four is guardrails and permissions, which is what does the agent explicitly not allowed to do? Which paths are read only, which commands require approval, and what point does it stop and ask instead of guessing? Those approval prompts in ChatGPT work are this exact component designed at OpenAI scale. Every serious agent tool exposes those settings and most people never touch them. So you need to set them deliberately. Then the component 5 is actually observability and memory.

Speaker 1

12:39 Observability is a record of everything that the agent did, every tool call, every decision, every error. And memory carries useful state across different sessions because the model itself cannot carry anything. Now, when a run goes wrong, and it will, trust me, the record is the only way to reconstruct what happened instead of guessing. So that's pretty much the autonomy of how a harness is built. We have the system of record, we have the tools, we have the feedback loops and verifications, we have the guardrails and permissions, and we have the observability and memory.

Speaker 1

13:09 Now let's come to the practitioner's point, which is how do you actually go and build one? So here is how you do it. So step one, you need to create your system of records this week, and let me be explicit about what that means in each tool, because the file already has a home wherever you work. If you're using Codex, Whether that's a CLI or the Codex tab inside the ChatGPT desktop app, the file is called Agents MD at your repository's root, and Codex picks it up automatically.

Speaker 1

13:33 Now, if you're using Claude code, it's called Claude MD and you can actually run the init command to have it generate a starter for you. If you're using cursor, that also reads the agents markdown. Now, whichever you're in, write down four things. How the project is structured, how to run it, how to test it, and your top five convictions. Keep it under a page, then adopt Hashimoto's discipline. As a personal rule, when the agent makes the same mistake twice, you do not explain it in the chat.

Speaker 1

14:00 You write the fix into the file permanently. Hashimoto has said that almost every line in the agents markdown of his own project came from the Past agent failure and once the rule is in, the mistake essentially never reoccurs. That habit is harness engineering in a miniature and it compounds, trust me on it. Now step two, you need to learn how to build your own verification loop in Python that's a linter like rough and a handful of real tests.

Speaker 1

14:24 Same idea in JavaScript for the standard tooling, you need to configure your agent to run those checks after every single change. And in Claude code you can actually wire this up with the hooks so that the checks automatically fire instead of relying on the agents to remember it. Now, if your agent is not writing code, the principle still holds. Define what correct output looks like, write a script or a checklist that validates it, and make that check part of every single run.

Speaker 1

14:50 The goal is this agents should discover its own mistakes before you do. Now step three, you need to be deliberate about the tools that it is using. So before building anything which is custom, spend a week working inside one serious existing harness, either a cloud code or codecs and actually study how it behaves. When does it ask for permission? How does it use your instruction file? How does it run your tests? And you learn more from watching a well built harness than from any of the YouTube tutorials, even this one.

Speaker 1

15:19 So while you're watching this, it's great, but you need to start playing with the actual harness. Then what you do is extend it. Connect your agent to one real system that you use every day using mcp, which is Model Context Protocol. Again, I've actually recorded a video about it, so you're not familiar with Model context protocol. Go check that video in the description below. And for every single tool connection, ask the harness question, what's the worst thing the agent could do with this access?

Speaker 1

15:43 And have I done anything to prevent it? Then step four, read your failures. Turn on whatever logging your agent tool provides and when a run goes wrong, read through what the agent did step by step. Sure, it might sound tedious, but it is the single highest leverage habit in this entire video. Every failed run tells you exactly which piece of the harness to build next. Is it a missing instruction? Is it a missing check? Or a tool that it should not have had access to?

Speaker 1

16:09 Your harness roadmap is written in your failure logs. Then step five Build a complete harness for one narrow workflow. This is your graduation project. Pick one repetitive, well defined task that you're going to be doing every single week and build the full loop around it, which has an instruction file, a small set of tools, an automated verification, a clear set of permissions and logging. It should have one workflow end to end, which is running reliably without you babysitting it.

Speaker 1

16:38 Now do that once and you'll understand the discipline at a level that no blog post can ever teach you. And if you would rather go through this live with me instead of building your own, I have actually something interesting for you. I'm hosting a completely free Loop and Harness Engineering masterclass. It's going to be 90 minutes and it's going to be live on Zoom and we'll exactly do this hands on. You'll watch Real Agent loop run, you'll see its tool, the memory, the stop rules, the self checks, and then watch us assemble a working harness live component by component.

Speaker 1

17:07 About 2,000 people have already registered and it's a completely free masterclass. So what are you waiting for? That link is also in the description below, so definitely go check it out. I know we covered a lot of things here, so let me just bring this together. See, in 2026 or in 2027, the model is increasingly becoming the commodity in the stack. Everybody has access to roughly the same frontier intelligence, especially with the open source model. I hope you have seen and tested out Kimik 3.

Speaker 1

17:32 Now what you actually compete on is the environment that you build around it, which is the instruction files, the feedback loops, the permission, the observability. That is harness engineering and that is increasingly becoming the moat for most of the companies. You don't get a better agent by finding a better model, you get a better agent by building it with a better harness. So at the end of the day, yes, it is all about software engineering and it is all about engineering and plumbing the things around a model.

Speaker 1

17:59 And here is what I want you to do after watching this video. First, go check out some of the additional resources that I've provided. Below, go register for that Loop and Harness Engineering masterclass, which is free. There's also going to be a handout that I'll put in the description below which will help you build your first project around harness engineering. If you feel that you're very confident after watching this video, definitely go check it out. And if this video got you fired up about actually building Agent Ki systems, here is how you go deeper.

Speaker 1

18:23 As I told you, I'm co founding the Gen Academy with my friend Arvind Narayan Murthy, who's also a machine learning practitioner and we have a six week long Mastering Agent AI certification. Our goal with that is very simple. We want to empower the next generation of AI builders and teach you the skills that only 0.1% of the people out there have. It's going to be deeply technical, it's going to be very hands on. But for the projects we actually have two different tracks.

Speaker 1

18:47 So either you can choose no code low code tools or you can use code heavy tools to do the same projects. But every single single week you are going to be building projects. Our May cohort and August cohort was sold out within weeks and our next cohort is starting in October. So if you are interested, definitely go check it out. That's also going to be in the description below. You know, we actually pioneered education partnerships for cohort based learning with partners like Nvidia, OpenAI, Pinecone, Replit, Eleven Labs, Llama Index and many more.

Speaker 1

19:13 As part of the educational partnership, we are actually getting free tools for our professional enroll into the cohort and we bring in AI experts from their team so that you're not just learning from us, you're learning from other AI experts as well from the industry. Now if you find this video useful, you know what to do. Subscribe and press that Bell icon. I regularly post about AI and machine learning. Free resources, educational explainers like this one.

Speaker 1

19:34 I share career tips and also my journey in the US as an immigrant building a career in AI. And if you have any questions, please feel free to drop that in the comments below. I try to read as many comments as possible and I do respond to most of them. Okay, I'll see you on the next one. Until then, happy building.

Summary

Harness engineering is emerging as a critical discipline in AI development, distinguishing successful AI products from mere demos. It involves creating a structured environment around AI models, enabling them to perform effectively in real-world applications. This video outlines the concept of harness engineering, its importance, and practical steps for implementation.

- Harness engineering transforms AI models from theoretical constructs into practical tools by designing the surrounding execution environment.
- The term "harness" is analogous to how a harness enables a horse to perform useful work, emphasizing that models alone are insufficient without a structured environment.
- Key components of harness engineering include:
1. **System of Record**: Instruction files that guide the agent's operations.
2. **Tools**: A deliberate selection of capabilities the agent can utilize.
3. **Feedback Loops and Verifications**: Mechanisms for the agent to check its own work.
4. **Guardrails and Permissions**: Restrictions on what the agent can do to prevent errors.
5. **Observability and Memory**: Logging actions and maintaining state across sessions.
- Successful AI applications like ChatGPT leverage different harnesses for various modes (chat, work, Codex) without changing the underlying model.
- Practitioners are encouraged to build their own harnesses by starting with a system of records, creating verification loops, and learning from failures.
- The future of AI competitiveness lies in the quality of the harness rather than the model itself, making harness engineering a vital skill for AI developers.

Questions Answered

What is harness engineering and why is it important?

Harness engineering is a new discipline in AI that is crucial for transforming AI demos into actual products. It focuses on the environment and systems that support AI models, rather than just the models themselves.

What gap does harness engineering fill in AI development?

Harness engineering addresses the challenges faced by AI agents when operating autonomously over extended periods, ensuring they can make decisions without supervision.

How does Codex exemplify harness engineering?

Codex operates within a controlled environment that allows it to execute tasks while adhering to specific permissions and feedback loops, demonstrating the principles of harness engineering.

What are the essential components of harness engineering?

Key components include self-checking mechanisms, guardrails for permissions, and observability to track agent actions and decisions.

How can one effectively build a harness for AI workflows?

To build a complete harness, focus on a specific workflow, incorporate automated verification, set clear permissions, and ensure comprehensive logging to track performance.

© transcribe · For agents Built with care and craft by Gokul Rajaram