Loop Engineering Totally 10x Hermes agents
AI LABS · 2026-06-15 · 13м 21с · 52 511 просмотров · YouTube ↗
Топики: ai-loop-engineering
🎧 Аудио
📝 Summary
model=deepseek-v4-flash · prompt=summary-v7 · 5 293→1 961 tokens · 2026-07-20 11:44:48
🎯 Главная суть
Loop engineering — это смена парадигмы: вместо того чтобы вручную писать промпты для агента ("prompt engineering"), вы проектируете систему, которая сама формирует промпты и управляет агентом. Агент получает только конечную цель, самостоятельно выстраивает шаги, исправляет ошибки и повторяет процесс до её достижения. Различают два типа петель: детерминированные (с чёткими критериями завершения, например, прохождение тестов) и недетерминированные (где для оценки результата требуется человеческое суждение или внешняя модель-верификатор).
Что такое loop engineering и чем он отличается от промптинга
Ранее разработчик писал инструкции для кодирующего агента — это был prompt engineering. Loop engineering переворачивает подход: вы больше не пишете промпты, а строите систему, которая делает это за вас. Создатель OpenClaw заявил: «Вы не должны промптить своих агентов — проектируйте петли, которые их сами промптят». Аналогично высказался и создатель Claude Code Борис на конференции Anthropic: он больше не промптит Claude вручную, а использует петли. Петля — это процесс, где вы задаёте конечную цель, и агент сам находит шаги, исправляет ошибки и повторяет, пока цель не будет достигнута. Раньше разработчик сам был «петлёй» — мониторил агента, проверял результаты и перепромпчивал. Теперь эту работу берёт на себя loop.
Ключевые компоненты правильно построенной петли
Чтобы петля работала эффективно, нужно учесть шесть аспектов:
- Управление контекстом — важно контролировать, что попадает в контекст на каждом витке. Даже с окном в миллион токенов системный промпт и инструкции «закапываются» под свежими выводами инструментов; внимание агента смещается к последнему. Нужно явно управлять тем, что агент «помнит».
- Качество обратной связи — обратная связь (вывод тестов, скриншот UI) подсказывает агенту, что получилось, и определяет следующий шаг.
- Верификационные гейты — контрольные точки, которые выносят вердикт: задача выполнена или нет.
- Условие завершения — явное правило, когда останавливать петлю (иначе агент либо завершает рано, либо бесконечно крутится без прогресса).
- Обработка ошибок — нужно чётко прописать, что делать при сбое вызова инструмента, чтобы система не зависала в сломанном состоянии.
- Управление состоянием между витками — поскольку контекстное окно конечно, следует использовать внешние файлы для отслеживания прогресса, чтобы агент не терял нить.
Петли расходуют много токенов, поэтому использовать их стоит осознанно, когда это действительно нужно.
Детерминированные петли на примере Hermes + Claude Code
Детерминированные петли применяются для задач, у которых есть однозначный критерий «готово»: тесты проходят, код компилируется и т.д. Hermes-агент с функцией саморазвивающихся навыков (self-evolving skills) может автоматически мониторить задеплоенное приложение. Если коммит ломает продакшн, Hermes запускает Claude Code в неинтерактивном режиме: Claude загружает тесты, находит причину поломки, по очереди выполняет тесты и фиксит код, пока все чек-проходов не подтвердят успешный деплой. После этого через GitHub CLI коммитит исправления. Петля замыкается: тесты выступают и обратной связью, и условием завершения.
Недетерминированные петли и adversarial loop для борьбы с AI-шлаком
Для задач без чёткого критерия завершения (например, проектирование UI или внедрение фичи, требующей субъективной оценки) используются недетерминированные петли. Типичная проблема: AI‑генерации веб‑интерфейсов страдают однообразием («AI slop»). Специальный навык AI Slop Detector содержит инструкции, как избегать повторяющихся паттернов. На Hermes этот навык может самообновляться: если после прогона петли в UI всё ещё виден шлак, навык корректируется и запускается снова — и так до устранения всех признаков.
В adversarial loop модель, строящая интерфейс (Claude), и модель, проверяющая его (GPT, известная отличными способностями к ревью), образуют пару «строитель‑верификатор». GPT оценивает результат, и если находит шаблоны AI‑шлака, петля продолжается. Такой подход генерирует гораздо более качественный UI, чем типичный вывод Opus. Разработчик может в любой момент указать на остатки шлака, и навык обновится, усилив верификатора.
📜 Transcript
en · 2 904 слов · 31 сегментов · clean
Показать текст транскрипта
There's a new term going around and you might have already heard it. It's called loop engineering and just like every other hype term, everyone is talking about it like it's something new. It's not, but when you combine it with an always running agent like Hermes, it stops being hype. Most people who are trying to set these up are getting the loop right and missing the thing that actually makes it work. And if you already know, there are two types of loops. There's a specific setup inside one of them that almost nobody is doing. Once you see it, the way you think about building with agents changes completely. By the end of this video, you'll understand exactly what it is and you'll have it running on Hermes and even Claude Code without you having to step in at all. With loop engineering, the core idea is simple. You stop being the person who writes the prompt that drives the agent and instead you let the agent drive itself. But to see why it's a shift in the first place, you've got to compare it to what came before. The skill that used to matter was prompt engineering where all our focus went into writing the right series of instructions to drive the coding agent properly. But loop engineering flips that around. Instead of writing the prompt yourself, you design the system that does the prompt engineering for you and drives the agent on its own. So the focus moves away. from crafting instructions and toward designing systems that run themselves. All of this started when the creator of OpenClaw said, you shouldn't be prompting your coding agents anymore and that you should focus on designing loops that prompt the agent for you and he's not the only one. Boris, who is the creator of Clawd Code, also made the same claim at the Anthropics annual developer conference where he said he doesn't prompt Clawd anymore. He's got loops running that prompt Clawd and it figures out for itself what needs to be done. So the question is, how do you get started with them? All of it comes down to how well you can set up the systems where you don't have to worry about prompting the agent at all. You define what you need and the agent does the rest. That's exactly where AI-powered development is heading. Before we get into how to actually build them, you need to be clear on what a loop is. A loop is basically a process where you define the end goal and the agent figures out the steps to reach it on its own. It corrects itself along the way and works around problems until it reaches the goal you set. A few months ago, before models got capable enough to sustain long tasks, this wasn't possible. If you needed to build an app, you'd prompt the agent, monitor what it was doing, check the output yourself, find the issues and re-prompt to fix them. You were the loop. the part doing the error checking and course correcting between every step that's what development still looks like for most people and that's exactly what loop engineering is about to take off your plate now this might sound like a brand new concept but loops have actually been around for a while cron jobs are a good example of a loop you've probably already seen they're just tasks scheduled to run repeatedly and automatically without you having to trigger them each time the only real difference is that a cron job runs at a fixed time so with loops in place the work stops being about writing the prompt. Your agent's performance on a task comes down to how well you define the end goal. To some of you, this process will sound a lot like reinforcement learning. If you haven't come across it, reinforcement learning is basically a way of training a model where you don't show it the right answers. Instead, you just tell it when it did well and when it didn't, and it gradually figures out how to get better on its own. The model finds the right path by trying different things. It gets a positive signal when it moves in the right direction and a negative one when it doesn't. The same idea applies here, except the model itself isn't what's being trained. Instead, the agent is working toward completing the task you want done, iterating on it in the same way a model would improve during training. If it fails, the loop you've put on the agent doesn't mark the task as done. It tries again, keeps going, and corrects itself until it reaches the goal you set. Now, after hearing all this, you might wonder what's actually left for you to do if everything is becoming autonomous. But your role doesn't shrink, it gets more important. Because it's your domain knowledge and experience that define the end goal in the first. place and that ends up showing in everything you build and ship. This is exactly why the push toward autonomous loops is only speeding up and it's showing in every new feature that drops right now. Fable 5 is the clearest example yet. Anthropic dropped it even though they'd been calling for a slowdown in AI development because the models are getting capable at a pace that's hard to keep up with. And after releasing it for some time they even pulled it. They built it for long and complex tasks and it performs better the longer and more complex the task gets which is basically the opposite of how models used to work. This shift really started with Opus 4.5. Once that dropped, long-running tasks got dramatically better. And you didn't need to set agents up with carefully guided harnesses anymore, basically structured setups that walked the agent through each step. The focus moved instead toward preparing the project to run over the long term because the models are now capable enough to handle things on their own without much step-by-step handling. But the loop isn't the only thing that matters. You also need to structure your project in a way that lets the agent work on its own for a long time without you having to step in. So a lot of people have been building and open sourcing systems for exactly this kind of setup. The Ralph loop was one of the first. It worked by setting the end goal and making sure the agent couldn't drift away from it. It did this through hooks, which are basically scripts that run automatically when something specific happens. So this script strictly prevents the agent from marking a task as done unless it had actually met the condition. But hooks are rigid, so Claude introduced its own goal command, which did the same thing but with more flexibility. Instead of a hard-coded check, it lets another model decide whether the task is actually finished. We covered GoalBuddy 2, which built on that by having the agent track its progress in local files and define exactly what done looks like before it even starts, so it always knows what it's working toward. The Hermes agent and OpenClaw were both built on the same philosophy. They take you out of the picture entirely and let the agent handle everything on its own. Now if you want to build these loops, we've got a simple five-step system for you. And since there are two types of loops, some of those steps work a little differently, but we'll get into both types later on. For now, we'll start in Claude code and later in the video, we'll look at how to do the same thing in the Hermes agent. The first step is checking what state the project is in. From that, the model decides what the next action should be. Then it acts on that decision and this is where the actual work happens. The agent calls tools, writes to files and runs commands to get the task done. Once that's finished, It gathers feedback to see what actually happened and based on that it decides whether the task is done or not. This is also where the difference between prompt engineering and loop engineering becomes obvious. With prompt engineering you're only ever controlling the decision step while loop engineering handles all five together. Building a loop that works well means getting a handful of things right and each one is there because of a specific problem it solves. The first is context management. You pay attention to what goes into the context on every turn because that's what determines what the agent actually knows at any given point. You can't rely on the chat context alone, even with context windows as large as a million tokens, basically how much the agent can hold in memory at once. Because as the conversation grows, your system prompt and instructions get buried under recent tool outputs. The agent's attention naturally pulls toward whatever is most recent, so the important stuff gets lost. That's why managing context matters so much. The next thing to get right is feedback quality. Feedback is what tells the agent how it did, and it's one of the most important It can take a lot of forms like the output of a test run or a screenshot of the UI it just built and whatever form it takes, that's what the agent reads to figure out its next move. Verification gates are what turn that feedback into a clear verdict. They're the checkpoints that tell the agent whether a task is actually done or not. You also need a termination condition, basically a rule that tells the loop when to stop and this one has to be set explicitly, otherwise the agent either quits too early or keeps going without making real progress. people most often overlook is error handling. You have to spell out what the model should do when a tool call fails, so the system handles it cleanly instead of leaving things in a broken state that just creates more problems. And finally, you need to manage state across turns, basically keep track of where the task is as the conversation grows. The context window can't hold everything forever, so you lean on external files that track information for the agent and let it keep working without losing the thread. One thing to keep in mind though, since you're handing the job of figuring out the path over to the model instead of doing it yourself, loops get expensive in tokens, so you need to be deliberate about when you actually use them. The more tokens a loop can work with, the better it tends to handle the task. But before we move forward, let's have a word from our sponsor, Scrimba. Most Python courses are just someone talking over slides. Scrimba is different. Their video player is the code editor, so you can pause anytime, edit the instructor's code directly, and see what happens. No tab switching, no copy pasting, just hands-on coding. from the start. Their new Learn Python course caught my attention because instead of random exercises, you actually build something real. From day one, you're building PayUp, a fully functional expense-splitting app, and every concept gets applied immediately. You start from absolute zero, no prior Python knowledge needed, and work through variables, strings, capturing user input, arithmetic operators, type conversion, data cleaning, and number formatting all by building features for the app. By the end, you've built a working project from scratch that proves you actually know python this is just part one of several that will become available over the coming weeks and currently it's totally free to access get started today with their free courses and our users will get an extra 20 off on their pro plans so click the link in the pinned comment or scan the qr code and start building today As we mentioned, there are two types of loops. The first one is called the deterministic loop. You use it for tasks that have a clear definition of what done actually looks like. That could be tests passing, code compiling successfully, or anything like that. These loops are fairly straightforward to work toward because the end goal is clear, so the model knows exactly what it needs to do before it can call the task done. Since Hermes is always running, it's a really good agent implement this loop on. We've created multiple workflows on it before and showed in our previous video. video how it handles a lot of our work on its own. The core of a deterministic loop is the clear definition of the end goal and for the apps you've hosted that definition is your tests. So you can point the Hermes agent at any app you've deployed with test cases and have it monitor it for you. Now if a change or a commit ends up breaking production you can set up an automation on Hermes to catch it. The reason it works best here is that it comes with the self-evolving skills feature so it automatically creates and evolves skills based on the workflow which keeps the health of the app in check. Once you Once you've set up that monitoring automation, you can ask it to launch Claude Code in non-interactive mode, basically running it on its own without you having to drive it and have it fix issues in a loop until all the test cases pass. What it does from there is set up the automation workflow and load skills like the sub-agent-driven development skill and the GitHub PR workflow skill which tell it how to manage the app on GitHub. It first identifies the issues that were breaking production, then launches Claude Code in non-interactive mode, which takes the tests and commits the changes once all of them pass. After it has run every test and fixed whatever was causing production to fail, it uses the GitHub CLI to commit the changes. The app ends up running without any failures because it has confirmed that all the checks for a successful deployment are in place. If you like these breakdowns, subscribe to the channel, click the notification bell and hit the hype button too. On the channel, we post content that helps you learn new ways to optimize different processes in different businesses with AI. Your support, whether it's subscribing, the notification bell or the hype button helps us create more content like this and reach more people. It means a lot to us. Now the second type is the non-deterministic loop and these are tasks where you can't just set a clear rule to check whether the job is done the way you can with deterministic loops. Because of that, there's no clean way to verify the outcome. These are the kinds of things that we as humans can look at and judge for ourselves like building a UI or implementing a feature that needs a judgment call. So when you're working with a non-deterministic loop, the workflow is different. If you're applying AI to UI, you already know that it tends to fall back to the same patterns all the time. that's why we created a skill called ai slop detector which holds all the instructions on how to avoid ai slop and lists the patterns that actually give it away and the reason we're using hermes again is the self-evolving skills if we still find ai slop in the ui after running the skill the skill can update itself to incorporate that feedback directly and that's exactly why we set this workflow up on hermes so we asked hermes to use the skill and check whether the ui has any of those patterns if it does it fixes them and launches clod code in non-interrupted interactive mode to run the skill and keep fixing what it finds until there's nothing left to fix. Another benefit we get out of Hermes is that the model reviewing the work is different from the one building it. We were using the GPT models which are known to be among the best for code review, so the Claude models become the builder and the other agent becomes the verifier. That's what completes the adversarial loop where the two check each other's work. Once that loop ran, it generated a much better UI than the generic output the Opus models are putting out nowadays, and if you still spot any sign of AI slop in the UI after the agent loop has ended, you can just mention it and it will update the skill for you, strengthening the verifier you already have. We've enhanced this skill to match multiple AI slop patterns that we and Hermes identified collectively. If you want to use this skill, you can get it from our community AI Labs Pro. The link's going to be in the description. That brings us to the end of this video. If you'd like to support the channel and help us keep making videos like this, you can do so by using the super thanks button below. As always, thank you for watching and I'll see you in the next one.
⚙️ Pipeline jobs
| Stage | Status | Att. | Updated | Error |
|---|---|---|---|---|
| download | done | 1/3 | 2026-07-20 11:44:11 | |
| transcribe | done | 1/3 | 2026-07-20 11:44:24 | |
| summarize | done | 1/3 | 2026-07-20 11:44:48 | |
| embed | done | 1/3 | 2026-07-20 11:44:51 |
📄 Описание YouTube
Показать
Everyone is talking about loop engineering like it's a new thing. It's not. But agent loop engineering changes everything when you combine claude loops with an always-on hermes agent. This loop engineering Claude breakdown shows the full hermes agent setup almost nobody is doing. Community with All Resources: http://ailabspro.io The Roundup: Our daily newsletter covering the AI stories. Join now: https://www.theroundup.so/ In this video we break down what loop engineering actually is, and why it stops being hype the moment you run it on an always-on agent. We start with the shift from prompt engineering to loop engineering, then walk through the five parts every loop needs to run on its own: context management, feedback quality, verification gates, a termination condition, and state across turns. From there we get into the two types of loops. Deterministic loops are for tasks with a clear definition of done, like tests passing or code compiling. We show how to point the Hermes agent at a deployed app, catch a commit that breaks production, and launch Claude Code in non-interactive mode to fix issues in a loop until every test passes. Then we cover non-deterministic loops, the ones where there's no clean rule for done, like building a UI. This is the setup almost nobody is doing. We use a skill we built called AI Slop Detector, pair a builder model with a separate verifier (a GPT model), and let that adversarial loop run until the slop is gone. Because Hermes has self-evolving skills, the verifier gets stronger every time you point out something it missed. If you've been wondering what is Hermes agent, how to use Hermes agent, or how it holds up in a Hermes agent vs OpenClaw comparison, this is the full walkthrough. We go through real Hermes agent use cases and show why an always-running Hermes AI agent is the right place to build these loops, whether you run it alongside Claude Code or on its own. #Claude #AI #ClaudeCode #HermesAgent #Obsidian #Hermes #OpenClaw #ChatGPT #ClaudeSkills