正在加载视频...
视频加载失败
Loop Engineering is getting hype now. But not many talks about how to actually do it So I open-sourced the template my team uses to build agent loops: - a shared artifact / knowledge layer - logging, verification - and a codebase harness so work compounds across runs Plus... show more
393,671 次观看 • 4 个月前 •via X (Twitter)
39 条评论

If you actually want examples of loops implemented simply and cleanly check out

Reminder:

super cool deep dive. How often do you find that your agent needs to draw connections between recent logs and other decisions? Would you consider that a failure mode?

thanks! i think this system is designed for agent to draw insights from logs contributed by other loops, so it is kind by design?

got it, i'm curious if there's anything you currently do to make sure it doesn't ignore older evidence or decisions? I have often found that something i thought through several months ago is relevant. obviously surfacing that presents a signal vs noise problem though

验证和日志这块一直头疼,这个模板解决了我好多问题

还在持续改进模版中,有反馈和我说哈~

LoopTroop ( does exactly this in practice: it runs structured Ralph loops for execution + recovery (fresh worktrees on failure, compact error traces), paired with LLM councils for planning and bead-based tasks. Focuses on reliable, long-running, high-correctness agent work with human approval gates. Fully local & open source

can someone explain to me how any of this is possible without spending over $100 per finished loop (workable feature) in tokens

Worth pinning a number to this: we ran similar loops and the difference between "loop with shared artifact layer" vs "loop without" was 3.2x fewer duplicate actions per run. The logging + verification layer is what most open-source templates skip — you just shipped the part that actually matters. Bookmarked.

There is a different approach you can take with loops. Instead of building one that burns tokens you can use loop supervision that will force agent to work on tasks until they are all done, ideally in a sandbox. Works great for me -

This is great for the token Rich, but for even the token middle class, this is unattainable. Weather $100 a month Clyde code account. You can do a little bit of looping and research with no actual code generated burned in just a few minutes.

loop engineering is a trend nobody will remember in a month

everyone talking agents, nobody talking infrastructure

Up and running, cheers 🥂

Great to hear, let me know any feedback on the template!

What Not to do; use more than one agent. If you need more than one agent, your wasting API calls and wasting money. It can be done with ONE agent and good prompt engineering.

Check out Puppetmaster for cost savings/context! The durable state architecture vs transcript allows closed loops like this much more capability and scale friendliness. Crushes token costs, $0 re-queries, beat frontier models alone on SWEBench & NL2 Repo Bench

Hey Jason, this is good stuff! You may also like a complementary tool I built called Looper which helps you design good loops and gives you a visual flow right in Claude/Codex to see how it works before you run it

Let me know if I’m wrong here but isn’t this just simple feedback loops that I learned in my basic control system course in college 25 years ago? Loop engineering seems like a cool new word salad term.

Built exactly this for a single agent — Vespera. 4-layer memory stack with a background thinking loop that runs every 3 minutes. Repetition filter, contradiction checker before anything hits core. Work compounds across every session.

The shared artifact layer is the part that matters most here. Once agents work off a shared store instead of each other's raw output, the loop stops drifting

@grok extract actionable insights from this video

How to archive a good loop about memory , this is a perfect solution : only need a plugin cc

Is this available on youtube?

what does the verification layer actually check for in practice?

Finally someone shares actual code. No more hype threads. Going to clone this tonight.

This agent loop template is spot on. Shared knowledge layer, logging, verification and that compounding harness actually make work stick across runs. Appreciate the open source plus the deep dive!

Spot on, Jason. The cognitive loop harness is mandatory for compounding work. The next bottleneck is real-world state corruption: what happens if the agent's action loop fails halfway through execution? We open sourced Rotaze-TAF ( handle this execution layer, adding transactional state machines and deterministic LIFO rollbacks to agent actions. Coupling a knowledge harness with a transactional executor is the way to go for enterprise.

solid template. AdaL Engineer goes one level up — it manages the entire loop for you automatically, so you just give the goal and it handles plan→build→test→iterate. just launched:

the shared artifact layer turns each loop run into cumulative context instead of isolated experiments

How do you deal with growing number of memories/logs/artifacts ? do you do any compaction/compression or you just let it grow indefinitely?

Magica already ships the artifact layer, the harness, AND the loop — in one chat. But love seeing the blueprint go open source.

Agreed on logging being underrated. I run a loop that drops a WhatsApp voice note into my Notion pipeline tagged and ready, and it only stopped drifting once every step read and wrote to one knowledge layer instead of rebuilding context each time.

to make loop smoother i created Ernest. it prevents super slop from ai, because I faced that even gpt 5.5 can drift sometimes and produce full garbage

That’s awesome! Love seeing practical resources shared. This will definitely help others get started on the right foot. Keep up the great work!

the compound state across runs is the part most people miss loops without persistent knowledge just repeat instead of compounding

The 'shared artifact / knowledge layer' is the part most people skip. Everyone focuses on the loop mechanics but forgets that agents need a shared memory surface or each cycle starts from scratch. The codebase harness that compounds work across runs — that's the difference between a demo and a system that actually ships.

The shared knowledge layer part is the piece most people skip. Without it agent loops just repeat the same mistakes across runs
