There's a new way of building agents called harness engineering that started to work really well only in 2026. The idea is to take an LLM and wrap it with code that repeatedly calls the LLM to let it decide what to do next, should it make another tool call, take some other action, or send a message to the user? And by letting the intelligence of the LLM drive repeatedly an agentic loop, that decides what to do next. This has turned out to be an important design pattern that's working well for many different applications. If you haven't already built an agent harness before, this is worth knowing. In this set of materials, I'd like to show you the basics of agent harness engineering. And at the end of these videos, I'll also introduce a new practice-build environment from developed by DeepLearning.AI that guides you through how to build an agent harness. If you've used a coding agent before, like Claude Code or Codex or OpenCode, the practice build environment is like that, except it also comes with a guide that walks you through, step by step, as if you're using a coding agent yourself, how to actually build an application using an agent harness. And I think in addition to the videos where you'll learn the theories and the concepts, going through the practice build yourself with the DeepLearning.AI provided guide that looks at what you're doing in your coding agent and lets you code the way you would in a coding agent without writing code by hand, but in the more modern way, I think that'll give you valuable practice for doing this yourself. Let's take a look at agent harnesses. The motivating example I'm going to use in these videos is building an agent to organize a maybe messy Downloads or other folder. For example, if you have a Downloads folder with a bunch of slightly disorganized files, like a keys.txt, maybe some movie tickets, Team_offsite_agenda, some Python code, and so on, can we build an agent to help organize these files better, such as maybe have it figure out what types of files we have in the Downloads folder and automatically create a number of subdirectories and then to move all of these files into the appropriate subdirectory and to the appropriate subfolder. So in order to implement this system, we're not going to make a lot of decisions ourselves as to how to organize these files. We're going to take a frontier LLM and let it make these decisions. You're probably familiar with the process of prompting an LLM where a user might write a prompt, an LLM responds, user writes another prompt. tool response, and so on. In the way that we're going to build an agent harness, we're going to use a slightly different way of prompting an LLM. We're going to have our code write a prompt. This is actually the instructions to the agent, or maybe a system prompt, and tell it to use a set of tools, such as list the files in the directory or make a new subdirectory, and so on, to organize the files in the Downloads folder. This is an abbreviated set of instructions. In reality, we'll use a longer, more detailed set of instructions. than this. But the agent may then decide that the first thing it wants to do is list_dir(Downloads/), whereupon we will make a tool call, or call a function, that gets the list of files. And all this is then passed back to the LLM that then decides what's the next step, which is maybe to call mk_dir to create the Work subfolder, and so on, until eventually it's all done and maybe a message is sent back to the user. So, the remarkable thing this way is your main tasks are writing a clearer set of instructions, such as a system prompt to the agent, and then also providing a set of tools, and letting the agent, or letting the LLM, repeatedly decide what tool to call, what action to take next. So the key agentic loop is the following. In the very first step, there's the input prompts to the agent, and the LLM responds as follows. And based on the LLM response, we will then call the function. or call the tool to list the files in this Downloads/ folder, and that's the tool response, or the response of the function for listing the files in the directory. All of these things then become the next prompt that is then passed back to the LLM, that then gives its next response, and so on. And this keeps going until, finally, the LLM is done and maybe it sends a final response back to the user. So to illustrate this, the key agentic loop is, we'll be writing code that will prompt an LLM calls to an LLM that gives us responses. Based on these responses, we'll occasionally make a function call or tool call to a function like list_dir, mk_dir, move_file, and so on. And these function calls or tool calls will then give tool responses, which could be just a simple response indicating that the function succeeded, or maybe that it failed, or maybe a returned a list of files like we saw when we listed the files in a folder. One thing that I didn't really show in this example so far is that in some agentic loops, sometimes there'll also be a user driving the agentic loop, where the user may make specific requests passed to your code, and then your code at the appropriate time may send a response back to the user. Such as maybe this last "All done!" response could be a final response to the user to let them know we're done. So, this diagram illustrates the key concepts of the agentic loop. And to make one tweak to terminology, I used the word prompt to describe what the code passes to the LLM, but just for consistency, I'm going to call that a request. So just to summarize again, this is the overall workflow. We will be writing Code that make requests to an LLM, the LLM generates responses, and sometimes we will make tool calls because the LLM asks us to, that then gives us back tool responses. And on the previous slide, I used examples of tools to list directory, make a subfolder, and so on, but more generally, many agents will be built with tools to access the file system, such as list directories, remove dir, read files, edit files, and so on. Many agents, not all, will have the ability to save things in memory so that if you start a new session, maybe the next day, key facts are still retained. And different agents will have a huge range of other functions that they are allowed to call. And we'll see a few other examples later in these videos as well. And then occasionally, you have a user giving specific requests, and also, the code will decide when there's a response it should send back to the user. So agent harness refers to all of this that you have to build: the code, and then often the set of tools you have to build as well, so that you can accept user requests, make appropriate calls to the LLM, and coordinate all of this work to get appropriate work done, like organize a set of files, and also get appropriate responses back to the user. Until maybe early 2026, this design pattern of wrapping code around an LLM to let an LLM repeatedly decide what to do, it just didn't work that well because LLMs were not intelligent enough. But today, many applications are being built using this design pattern, and it's actually really wonderful to be able to give an LLM a set of instructions, give it a set of tools, maybe add on some other things, like guardrails, memory, and other things we'll talk about later, and get a remarkably intelligent—sometimes not entirely reliable, but remarkably intelligent—agent. To build the agent harness, we'll be using the open-source OpenWorker Harness SDK that my friend and collaborator Rohit Prasad and I co-developed. Software has always been built in layers. When technology is new, everyone builds everything by hand. As it matures, the lower layers get abstracted away, so builders can focus on user experience and business logic. We think that agents are at that point right now, and soon every modern app will have an Agent Harness. Builders should not have to build and test every piece of that harness from scratch. So we made an SDK. This will allow builders to focus on what makes their app amazing. So, with the OpenWorker Harness SDK, you'll be able to give your agent a set of tools, and then with the help of a prompt, build this agent harness to start to drive that agentic loop to build the file organizing application and lots of other things as well. Let's go see how this works in the next video.