Transcript of NEW Deepseek Agent Harness EXPLAINED (deep dive)
Stephen G. Pope
0:00So today I want to talk about the Deep0:02Seek Harness. Why it's interesting to0:04investigate this particular tool right0:07now. It just came out. It's crazy that0:09it has that many stars on it already.0:1112,000 commits. Dang. It is an advanced0:13topic, but I'm going to approach it from0:15a very simple point of view so that we0:17can not only learn about the deepse0:20harness and why it's cool, but we can0:21also use it as a refresher to kind of go0:23over coding agents as a whole. So this0:25is really for anybody that's using you0:27know cloud code or codeex or cursor and0:29wants to know kind of more of the0:30details of how these things work and0:32then anybody that wants to build an0:34agent for their own AI products. For a0:36lot of people what vibe coding did is it0:38gave them access to build SAS products0:39and software that they had never been0:41able to do and by default they go0:43towards building things that they've0:44already experienced a lot of like they0:46just build normal apps and normal SAS0:47apps. But I think where the future of AI0:49development is going is being able to0:51build agents into your products. So what0:53is the Deep Seek harness? The Deep Seek0:55harness is very much like other0:57harnesses, right? So at the most basic0:58level, you know, all the the different1:00harnesses that we've been exposed to,1:02Claude Code and Hermes and now the Deep1:05Seek harness or shockwave, they all kind1:07of follow this basic model. The agent1:09loop works like this. You give it a1:12question. If you're writing code or1:13whatever that is, then it needs to make1:14different tool calls. It needs to read1:16files. It needs to write files. And then1:18it runs those. The agent gets a result.1:20And then it comes back into the model1:21again. It evaluates what it learned from1:23those tool calls. If it needs to make1:25more of them, it can make more of them,1:26right? It just goes in that loop until1:27it's done and then it pops back out and1:29it answers that question. So, this is1:31how all of the agent loops work. And1:33I'll even show you something that might1:35look a little overwhelming to look at in1:37the beginning cuz it just looks like1:38it's a big JSON with all this1:39information, but I'm going to break it1:40down because when we look at what an1:42agent really is, it's the model, right?1:44We're we're sending the model a question1:45and then it has different tool calls.1:47So, if we look at an actual API call,1:49which is what happens right here. So,1:50right, so we send a message. This is1:52where an actual API call is made to1:55Anthropic or to OpenAI. And then all of1:58this other stuff here is really2:00happening on our computer. So the agent2:02itself is a collection of what drives2:04this loop which is on our computer.2:06That's the agent and then this model.2:08When you actually look at what this2:10model is is getting, it's pretty2:12interesting. So this is an API call that2:14we send to the model. This is for cloud2:16opus. And what you see here is that2:19we're basically sending one call to the2:23agent that includes a system prompt.2:25This is like the basic instructions for2:27the identity of this agent. And then we2:29also pass it tools and then we also send2:32it messages. So in this particular2:33example, we're creating two different2:35tools called get weather and search2:38flights. And so when we call this LLM,2:40we're basically saying, hey, here's a2:41system prompt and here's the tools that2:43you have access to. And then also the2:46messages that have happened in this2:48conversation. The conversation is really2:50more transactional than you think. This2:52first message comes into the model and2:54something happens like it it goes2:56through and it uses the tool calls and2:57then it responds back to you. But then2:59the next time you go and you make it the3:01next request, it's really building off3:03of that previous conversation, but we're3:05still just sending single API calls to3:07the LLM. This is the first question that3:09we send to the agent. I'm going to Tokyo3:12next week. And then the assistant3:13answers, "Nice. Anything you'd like help3:15planning?" And then the user's like,3:16"Yeah, well, what's the weather right3:17now?" Right? When you define these3:19agents and you give them tools and you3:22start to have a conversation with it,3:23the conversation is really saved and is3:26continually sent back to the model over3:28and over and over. And then this3:30conversation just gets longer and3:31longer. And then you can see here that3:33the agent is using different tools. And3:34so when I have a conversation with3:35claude code, that's the same thing3:36that's happening there. And it's3:38important just to understand that on a3:39fundamental level and that most3:41harnesses are all doing that same thing3:42because they're all calling these these3:44same APIs like Enthropic or OpenAI.3:46Okay. And so what an agent loop really3:49becomes is the model. It's the LLM that3:51you're picking and it's also the tool3:53registry. So the tools that you give the3:55agent access to, right? And so we can3:57see that in that API call. We defined3:59these two tools. Okay. And then the4:02prompt assembly, that system prompt.4:04Here's that system prompt. This is all4:05really what a coding agent is. It's4:07defining these tools and cloud code4:09creates a bunch of different tools for4:10itself to like look at the files, GP the4:12files, look through the files, search4:14the files, modify the files, right? It's4:16creating those tools for itself and then4:17it creates a big long system prompt in4:19order to facilitate and help people4:21through their coding projects, right?4:23Like it sets up, hey, you're a master4:24coder and you can do this, this, this,4:25and this, right? And then uh the4:27session, right? So, it's the agent's4:29responsibility to remember these4:31messages in its own session so that4:33every time you call the LLM back and4:35forth, you're giving it a longer and4:37longer conversation to then respond to4:39the most recent message, basically. If4:41you're enjoying this video, make sure to4:42like and subscribe. It tells me what4:44type of content you want more of. So,4:45now that we kind of get the the basics4:47of the coding agent, we reviewed that,4:49how it works, the LLMs. Now, let's talk4:51about how is it that the Deep Sea4:54Carness is different from all the others4:56if they're all doing it this way. And it4:57really kind of comes down to this4:59concept here, which is code versus5:02config. Forcel's Eve project I believe5:04also does this. I haven't investigated5:06it deeply, but up until now, most of the5:08harnesses are keeping all of this5:10configuration that defines how it works,5:13what tools it has in code. So in5:16Shockwave here, this is the app that I'm5:18in right now. It has an AI agent. It has5:20tools. So if I say, what tools do you5:23have? All of those tools, all of the5:26definitions, all of the system prompts,5:28like the entire system prompt that we5:30send this agent is all defined in code,5:32which isn't necessarily a bad thing. And5:34if I come here to the system prompt,5:35right, this is how the system prompt for5:37a shockwave conversation is constructed,5:40right? We've got the solemn MD, right?5:41So you guys are maybe getting familiar5:43with like the soul, right? Like these5:45are in all the agents, they have the5:47solemn MD, all that kind of stuff. And5:48so you can see how I'm building this5:50system prompt. This happens all in code.5:52all of the tools, the system prompt. And5:55so the agent technically could modify5:57itself, but it would have to go into the5:59code. It would have to modify it. If I6:01were to tell Shockwave right now, I6:02said, "Hey, I need you to make a6:03modification to Shockwave." Like, it6:05could download the source code and it6:06can make the modifications, but it6:08wouldn't be able to go through and6:09rebuild itself and redeploy itself,6:12right? Because it's code, there's some6:13sort of process that takes the code and6:15converts it into a program. So like if6:17you're building a Next.js JS application6:19for a website. It's like you build it6:21and then there's a usually a deployment6:23process. The point is is that that code6:25must be built and deployed. So the agent6:28is going to have a hard time modifying6:30itself. Whereas what DeepS did is they6:33took all of that configuration, what the6:35agent is, the system prompt, the model,6:38the actual loop, it's all configuration.6:40And what that allows you to do is that6:42the the agent can actually modify6:43itself. It can go in and it can change6:45the configuration because it's not code.6:47Code is running, but what is guiding the6:49code is all configuration. So there's a6:51difference between tools and skills. We6:54all know that agents can create skills,6:56right? If you've used Hermes or if6:58you've used Shockwave or any of these7:00tools, you can say, "Hey, make me a7:01skill that does X, Y, and Z." And then7:03the agent will now have that ability. In7:05reality, tools and skills are not equal.7:09Tools are functions or code or abilities7:12that are given to an agent. The agent7:14isn't actually running. It's just like a7:16tool that's available to it. And when it7:18calls it, it's actually running code.7:20The computer is doing the work. It's7:22very deterministic.7:24So like if I say, hey, what's the7:25weather for today? Like it's going to7:27have a very straight path. It's going to7:28have a very programmatic way of figuring7:30that out. It's just going to call an API7:31call. The weather is what the weather is7:33and it's going to return that back to7:34the agent. But a skill is actually being7:36executed by the agent. the agent is7:38actually having to like think about it.7:40It's running scripts. It's actually7:42thinking. It's using tokens. The agent7:44is actually doing the work when you use7:45a skill versus the computer doing the7:48work. So, if the agent is able to create7:50its own tools and install those in its7:53own loop on the fly and modify itself,7:56it can modify the way the harness works.7:59It can modify the tools. It can modify8:01and create its own tools. And so it has8:03the ability to actually modify itself8:05and reboot without having to rebuild8:08itself. But I have two different8:09projects here. One is a AI SDK hello8:12world. So if I look at the AI SDK here,8:14we have a agent that was defined and8:17there are some configurations here like8:20what model it is, the provider, the base8:22URL to access the the provider and then8:26like the system prompt. So we have some8:28configuration here, but the majority of8:30what defines the agent in the AI SDK is8:34code. So you see all this different code8:36here. We've defined two different tools,8:38list directory and read file, right? So8:40we define these in code. So once you8:43boot this engine up and you start it,8:44this code is brought into memory and it8:46can't change. Okay? And that goes for8:49everything here. Now, if we go into the8:51DeepSseek harness, we're going to see8:53that everything is actually a settings8:55file like this configuration file. And8:57so, instead of, you know, us writing9:00code that is then launched that the9:02agent is then running, instead, you9:05know, the agent runs and it looks for9:08configuration to define how it's going9:11to work. And when this configuration9:13changes, it automatically reloads that9:16and the agent just continues working. It9:18can just define its own tools. It can9:19redefine itself. It can reconfigure9:21itself. And as it changes these files,9:24the agent just reloads them and it9:26continues working from there. Here is a9:28webbased version of the harness. Like9:30when you deploy the deepse harness, you9:33can deploy it as a SDK and you use this9:37if you want to, you know, build it into9:39your own app. If you wanted to use the9:42Deep Sea Carness in your own like9:44desktop application like I'm doing here9:46in Shockwave, you could do that by using9:48the SDK and you just interface with the9:51SDK and you start to build that out. But9:53it also comes with a web portal that you9:55can also just launch. It's a web- based9:57interface that's dropped on top of the9:59Deep Sea Caress. And so we can actually10:01use this and have it create its own10:02tools. So if I come over to new session10:05list what tools you have currently.10:10So, it's going to give us all the the10:11tools that it has, all the basic ones10:13that you'd expect. Bash, read, write,10:15edit files. It's also got some web10:17research built in. And these are all10:19definable, right? So, these are all10:20configuration files. So, all of the10:23tools that are in here now were set up10:25through configuration files. But now10:27let's say I wanted to say create a new10:30tool that will allow us to flip a coin10:36and return heads or tails. So this is10:40actually going to be able to create its10:42own tool and then launch the tool, allow10:44you to use it all without having to10:46rebuild any code or restart anything,10:49which is the real big takeaway about why10:51this is different. And so what this10:52really allows you to end up doing is10:54that it allows your agent to modify10:56itself instead of the agent having to10:59modify its own code then going through a11:00build process which it might not be able11:03to to do all on its own, right? Cuz like11:05like for instance like when I build11:07Shockwave like let's say I create a new11:08version of Shockwave, if I modify how11:10the agent itself works, I have to go11:12through a whole build process. I have to11:15create a whole new release which allows11:17it to go to GitHub and it uploads the11:19binary file so that people can download11:21shockwave and then deploy it check for11:23updates all that kind of stuff right so11:25it's a whole process to update the agent11:27whereas with deepseeek the agent can11:28modify itself because it's just11:30configuration files so now it has the11:32tool so list the new tool and how to use11:36it and even the code behind it so here's11:41the new tool This is the definition of11:45it. And so here's the actual code. And11:47so here's what I mean by the difference11:49between a skill and a tool, right? So if11:52you told Shockwave to create a new11:55ability, say, "Hey, I need you to be11:57able to flip a coin and give me a random12:00answer back and one way or the other, it12:03would create a skill and then in that12:06skill, it might create some code that it12:08could call." Right? So, it's a little12:10bit different though because the agent12:11itself is going to be thinking, I need12:14to flip a coin. So, I'm going to load12:15the skill12:17and then let's see what's in the skill.12:20Oh, okay. There's this script I can run.12:22And then it's going to run the script.12:23It's like the LLM is doing this as12:26opposed to the LLM just saying, "Hey,12:28flip the coin12:30and it calling the code directly and12:32then getting back the answer and12:34responding." It's a random event, right?12:35A coin flip is 5050. And so you it12:37actually has code in here to make sure12:38that it's you know a 50/50 split heads12:41or tails that kind of thing. And now12:43what's kind of interesting too is that12:44not only is the agent able to create its12:49own tools, but it can actually modify12:51the web interface itself that it is12:53using. What types of modifications12:57could you make to the sidebar directly13:01without having to restart directly to13:05the configuration? Good question. The13:07answer is substantial because the13:08sidebar is most slot rich parts of the13:11guey. Everything below is live. To keep13:14it simple, I'm doing a demo what would13:18be one thing we can change on the UI to13:23show how the agent can modify its own UI13:30live.13:32Okay, so it looks like it's going to add13:33a button to the sidebar footer. So now13:37it's asking for approval. Just to kind13:40of explain, you know, in Shockwave,13:42everything that you see here, the13:43sidebar, the navigation, the text editor13:45here, the agent on the side, this is all13:47defined by code. Whereas the deep sea13:49harness is all configuration, even the13:52UI. Okay, cool. There it is. But let's13:55see. Now I can Oh, so it gave me tails.14:00Okay, cool. Every time you click it, it14:02basically runs it. See? Tails, heads,14:04tails, tails, tails.14:07So, you can see what I'm trying to get14:08at here is that not only did we create14:11the new tool for the agent on the fly,14:16but we also were able to update the UI14:19itself. You know, all sorts of different14:20things are implications from that, which14:23are cool. When you build your software,14:26you can build out an agent that is able14:28to modify itself versus you having to14:30come up with every single thing that the14:33agent can do. I will admit like in terms14:35of like practical applications, I'm14:37having to think through like what that14:38means and what you'd want it to do cuz14:40right, you could think like maybe you14:42don't want it to do certain things like14:44that. like the implications and like how14:46this is used I think is still kind of up14:48in the air but it's one major step14:50forward in terms of allowing the agent14:52to completely modify itself and recreate14:55itself in its own recursive loop without14:57having to actually have an outside party15:01rebuild the code and retest it and do15:03all that sort of thing. Now, you've15:05probably noticed the endless stream of15:06new AI content that keeps you15:08overwhelmed. If you want to step off15:09that treadmill and learn to build with15:11someone that didn't just pick up Claude15:13code last week, someone who's been15:14coding for over 30 years, the AI15:16Architects is for you. It's a community15:18of builders shipping real things. We do15:20a weekly roundtable like a think tank. I15:22do live builds in there and there's a15:24course that walks you through everything15:25end to end. I'd love to see you inside15:27the community. I hope you enjoyed this15:28video and I'll see you on the next
3,194 words · 439 lines







