Stop Treating AI Agents Like One-Off Tasks—Build This 9-Part Loop

Eric Siu explains why AI agents need continuous loops, not one-off tasks. A loop observes reality, evaluates progress, learns, and decides when to stop or escalate. He outlines a 9-part checklist including target state, current state, evaluation rubric, and human gates, with examples from SEO, sales outreach, and content creation.
Chapters
Everyone's talking about AI loops, but 99% of people are thinking about it the wrong way. And in fact, I was thinking about it the wrong way. I've seen people writing articles that get millions of views. I don't think they actually understand what loops are either. Even though you have the founders of NVIDIA or OpenClaw or Claude Code, they're all talking about loops. And so I'm like, what the heck does that even mean? And so there are important nuances to understand here. I thought initially that a loop was just maybe spamming the /goal command, but There are important nuances. I'm going to go over them in this video. And once you understand how this works, it's going to change how you think about how to work in general. I'm going to talk about the differences between them and then how it's going to unlock everything. I'm also going to show you how I'm thinking about the loops as well from a business growth, revenue generating standpoint. So let's get into it. So first, let's kind of define the core thesis here. So AI agents do tasks, whereas AI loops, they run parts of your business. A loop is a stateful control system. So what does that mean? It means it observes reality, it evaluates progress, it handles record traces, It learns and then it stops or escalates. So you can see there's a little more complexity in there, right? So the important thing to understand is this is not a retry. It's not a cron job. It's not a /goal command. It's not even a scheduled prompt. And ultimately what a loop is, is it provides a lot more control in terms of what you're trying to do. So again, let's reinforce this again. Agents do tasks, right? So a goal is bound in execution. It starts, runs, and returns an artifact. And loops run parts of your business. So we literally, we have a loop right now that is focused on AEO. It's focused on SEO generation. And so literally every single week, what happens is It will look at opportunities to keep, consolidate, delete content. It'll also look at my content ingester. It'll look at YouTube content or podcast content like this one, and it'll figure out what other content we should be creating based off that and based on what my goals are, right? And that's cool. You can have that repeat. I mean, that you can have it repeat like a routine, or you can have it repeat like a loop inside of Claude Code. But that's different than the loop that we're talking about here, right? You can even say that You can run that as a timed slash goal command. And so that's what I was struggling with. And then I realized there was one key difference. I had talked about a couple other things over here, but there's one key difference that we're going to get to. Scheduled prompt, it runs on a clock, right? So we didn't define what a scheduled prompt is. So no state model, there's no eval, there's no learning. And eval is just basically defining what the definition of done or what success looks like. A retry means it tries again after a failure. It's useful, but it's not that operating system that you're looking for because you want You want a machine that compounds. And a slash goal is good. It's getting us toward that recursive self-improvement eventually. That's an important step, but it's not automatically a loop, right? So what you're looking for, again, what I mentioned, is that loop is ultimately control. To me, the key thing to call out here is when you look at an agent, okay, sure, it's a prompt or like a slash goal, right? And you have tools in there, you have different connectors, you can connect like your Gong, Your CRM, you can connect your analytics, you have different artifacts that are in there. Okay, so this is great for bounded execution. I think a lot of us are using agents in this way. Now, loops. Now these are the current, the, the important pieces of a loop. And I actually think there's only one piece here that, that sticks out to me. And then maybe this piece actually helped me unlock it. And I actually was clarifying with my agent recently. I was just saying like, hey, is it, is this the important piece actually? And it said, in fact, yes, it is. For loop, you, you have target state, you have observe current state, you have evaluate gap, you have act and record trace, and then learn, stop, or escalate. So this is great for a repeatable operating leverage. Every day I'm asking, my agent? How do I gain more leverage? How do I gain more leverage? How do I compound a lot faster for myself, for my learnings, but also for my business as well? And so really what, what, what this loop does is it's going to look over time to see, hey, what actually happened before and how do we compound on top of it? So you actually have to have lessons. There's going to be learnings here, right? So you can see learn, stop, or escalate. So you've got to define— you still need to do evals, right? You still need to define kind of what definition of success looks like. And it continues to work in this way. But you're observing the current state, like what is the target state? Like where do we want to get to? You know, 50 milliseconds per page. across the entire website. Okay, what are we currently at? Maybe we're at 100 milliseconds across the entire website right now. So that is what the gap is. So then after that, okay, so we've, we've acted and recorded what this looks like. So the gap is, is, is 50 milliseconds across the board. Then, then we start to, we start to act, right? We start to act. Okay, is it getting better? Is it getting better over time? Then we learn, we stop or escalate. If we've got actually hit the— if we've hit the target, then great, we're done. But if we keep missing it over and over, we've got to escalate, right? And we've got to learn over time. So this is how this machine compounds. But if you're just running a /goal, you're using these tools and you have all these artifacts that are available, well, how do you actually track the success of this over time? And the answer is, if you want to build these loops, at least from my understanding right now, is that you have to have some type of repository to store your loops and some type of way for it to record over time how it's compounding, right? And so you can have that stored into a repo, you can have that Perhaps push into Obsidian with all your MD files in there. Like you choose how you want to play this. I would recommend that you spend some time thinking about it. But that to me was the unlock, right? It's like, okay, you need a spot to store all the learnings. Otherwise, how are you supposed to, to use that word again, how are you supposed to compound? A real loop architecture here is number one, target. Like what does good look like? Earlier we've kind of defined like we want 50 milliseconds for every single page across the site. Now observe. So reality from tests, metrics, CRM, Search engine result pages, support analytics. So you got to see what's the current state right now, right? Evaluate rubric, metric, judge, or deterministic check. And then you decide continue, stop, change strategy, or escalate. And then— sorry, it actually goes down here. It goes to act. So edit, research, score, draft, test, route, notify, right? So target, observe, evaluate, act, learn. So state, trace, score history, reasonable pattern, and decide continue, stop, change strategy, or escalate. And then if it needs to come back, like it's just going to continue to, it's going to loop in certain areas, right? So that, like understanding this architecture was, was very freeing for me because now I understand how to play the game because I was working on all these loops and I'll show you some ideas in a second. I'm like, okay, I can do this AEO SEO loop. Oh, I can do this, this, uh, uh, reclaiming revenue loop, the lost revenue loop. I can do this loop around verifying how, what, what parts of my site are broken. Like what forms are broken. All these things can be looped over. It can be continually looped. And, um, for example, checking on my website, I mean, you can can argue that maybe that's just a, a scheduled prompt that you could be running, right? But I want this thing to improve. So I don't want to just— like, in some cases you can just have it run the same automation over and over because you're maybe just checking to see if like that one thing is working. But if you want something to improve over time, like if we're talking about sending out cold emails as an example, well, I want that to get better. And if I'm writing, if I'm updating content, or if I'm deleting content, I want the results to be better over time. And obviously it's going to be a little more subjective when it comes to marketing, But when it comes to coding, for example, or when it comes to some things I just mentioned, like 50 milliseconds, that's very verifiable. So coding is a lot more verifiable than something like when we're talking about more subjective work like marketing, for example. Right. So a serious loop actually needs these 9 things. So this is a checklist that you can use. So like we mentioned, a target state. So this is the condition that you're trying to reach. You have a current state. So this is a live snapshot before acting. There's an observation source where reality is measured. And then evaluation rubrics. So how progress is scored. Then you also have an action policy. So here's what the agents— the agent can do. So obviously, you want to have some constraints. You don't want to just let it yell. Trace evidence and repair decisions per iteration. And a learning store, what gets reused next time. So these things all need to be stored somewhere, right? Stop rules, success plateau, budget, risk blocker, and then human gates where autonomy must pause. And I would also say that if you were to take a screenshot of this or even take the transcript from this video, I would say, well, these 9 things, you know, talking about the things that are required from a loop, like I want to operationalize this and make this into a skill. So whenever I start to work on a new loop, it takes into account where my loops are stored and how we go about making the right loop here, right? Thinking about the architecture, thinking about the checklist here, because if you don't do that, you're going to be starting from scratch each time. It's clear to me that you should have a repo for this. This should be made into a skill and you should be able to hand this off to your team. And so that's why we have our singlegrain.com/dojo where you can actually get these skills. That's where we share a lot of skills and we want this To be open to everyone to, to be able to use, right? So by the way, if you're enjoying this video on loops, this is the type of stuff we do for our clients at SingleBrain, which is where we have these managed marketing agents that live inside of Slack or Microsoft Teams, where you can just make a lot of decisions faster and you can start to combine these loops. You can start to combine these different artifacts. You can combine a lot of the skills that we have, and ultimately you can grow your revenues a lot faster. So check out singlebrain.com with a B, and we'll see you on the other side. Here's the reasoning loop map over here. So in, in, uh, in— this is in 2022. So React, this is how things have gone over time, right? So React, reason and act, tool, tool use becomes part of the reasoning trace. And then, uh, reflection, you know, I, I, this probably doesn't matter as much, but this is just kind of the timeline here. So I'm really not going to go through it much, but the gap here is the literature mostly explains reasoning loops. The content opportunity is business loops that monitor external state and improve workflows, which is what we're doing right now, right? Once you guys have that unlock, you can build as many business loops as you want that will, that will continually improve the workflows that you have running in your company. Now, like I've I'm even thinking right now, for example, we have, we have clients on the, let's say on the Single Brain or Single Grain side, which is on the marketing side. Single Brain is more on the managed marketing agents. How do we continually improve the state of one of our clients right now who has an SEO agent? How do we continually compound that over time in terms of not just finding opportunities for them, but executing on the work and executing on work that continually outperforms what they had before? And it's just constantly testing all the time. Okay, that's interesting to me. How do you, how do you test from an SEO standpoint, from a CRO standpoint, conversion rate optimization? Then I think about maybe there's, there's probably some outbound loops as well from a sales standpoint that you could be using. How do you continually optimize your messaging? How do you continually optimize your offer? How do you just continue to test these things over and over and over until you start to see diminishing returns? And then maybe you turn that loop off for a while, but then it turns back on in the next 3 months or so, because the diminishing returns in some cases, they might unblock themselves over time, right? Because sometimes what was working stops working, right? It gets abused, but then people start, they Go on to new tactics, and then what's old becomes new again. So this piece over here, where loops show up in a business. Okay, so this is good for us to know, right? So workflows, you got sales, content, SEO, and code. If we're talking about observe, so you might pull from a CRM, your website, LinkedIn inbox, you might want to think about making your site like a living agent that can help you drive more pipeline or close deals for you, right? Evaluate. So ICP fit, timing, intent. These are just some examples. This is not the end-all be-all list. Act. So scoring leads, drafting outreach, which is just what I just mentioned earlier. You want to escalate when high value or low confidence. Okay. But again, like, if a human needs to keep stepping in, this is why these people are saying, yeah, the founders of Cloud Code and Open Claw saying, you know, prompting is dead. And in a sense, like, if you have this continually working, I think it's definitely very dead for coders, right? You come down here, you know, we're talking about tests, logs, screenshots, evaluating whether something is a pass or fail. And it's very easy to determine the pass or fail gates, regression risk, and then edit, test, trace, repeat. This is the acting piece. And then escalate, talking about authentication, we're talking about billing and production data, right? So this to me, like, again, coding is very, very, it's very verifiable. Whereas for sales, in some cases, not so much. We're talking about subjective numbers, right? But I think in some cases still, if we're talking about conversion rate optimization on like a low risk page, what you can do with that is just have it continue to run tests. Or if we're talking about, if we're talking about updating pages, and for from an SEO standpoint, all you can do is update pages or consolidate pages, right? Maybe just updating only, then you can see how it performs. And then every single week, it's reporting back to you on how it's doing. And it might ask you for some feedback, but then it's going to continue to get better over time, right? So what was lacking was actually this, like this framework to use. That's why I think it's really important to understand this framework. So content to me is a little more, it's not as black and white, especially if you're looking to gain traffic or leads from it. So you can look at, you can observe search comments analytics, you can evaluate angle retention proof, and then you can revise the hook outline and call to action. And then you got to escalate when thinking about brand risk or unclear claim. Now, where it's less risky is when you start to think about how this relates to technical documentation. So that's got to be, you know, more or less accurate, but It's not as risky. It's not nearly as risky when we're talking about maybe making like a bold claim, like you've cured a disease that you haven't cured. Okay. As an example. Anyway, I hope this helps. This part helps you over here. And then you have to have escalation roles as well. So read-only. So observing, summarizing, scoring. So you can't make any changes. Drafting. Are you going to allow your agent or your loop to make net new content? Right. Or like In this case, drafting it for review, like that's not as risky, right? Sandboxing, changing local files, mock data, test branches, like you obviously, like you don't want to just let it YOLO and send whatever emails it wants to send, right? Approval gating, having, especially when you're talking about spending money, right? So you definitely need to have a lot of these rules in place from a trust model standpoint, right? Autonomy only for low-risk, well-scored, reversible actions. So like what's tough is if you decide to send 10,000 emails that have brand risks to it, You can't take that back, right? So that's all I would say around the trust model piece. And then this is kind of the scaffolding, how we think about it from an agent loop standpoint, how your repo might look. So you might have like an agent loop section, agents.md, Claude.md if you're using Claude. And then you can have these templates in here. And you can see, by the way, like stage, loop spec, trace, eval rubric. So all this in here, like this allows us to make loops, but it also stores our loops in here. So This is what the scaffolding looks like, and you can take a screenshot of this. What's interesting to me is, again, I would say it's important for you to think about understanding the logic behind this, right? So, earlier, I was talking to my Hermes about this, and this just goes to show me that, or show you that, I'm just trying to figure this out as we go. So, I'm like, hey, is it actually that the loop, the important part is the state awareness piece or being able to record all this information, right? Yeah. And it's like the clean distinction here is /goal is bound in execution toward an outcome, decomposes work, runs steps, checks completion, and shifts the request to artifact. Loop is a persistent stateful system. So it keeps watching reality, compares actual versus desired state, notices drift, takes action, evaluates whether the action worked, then improves the workflow itself, right? So the agent does tasks, like a lot of people are doing that already every single day. Everyone and their cousin's wrapper does that. But again, like you watch this video, maybe you should rewatch this video. Now you understand how the framework works, and then that's a major unlock for your head. So we talked about all these things over here, but my instinct was this, right? So most of what happens inside a loop can look like a slash goal, but slash goals ultimately is just one mission. A loop is the operating system that decides when missions need to happen again. There's that judgment layer that's being added in there that allows it to work, you know, a little more autonomously where you don't need to be there all the time, right? I do think if you're listening to this from like a business owner standpoint, or maybe you're operating You're an operator from a business standpoint, you just need to keep in mind that it's not as simple as a coder would talk about this because a lot more of the coder stuff is verifiable, just like math is verifiable. So hope you enjoyed this video and we'll see you in the next one.










