Back to AI Jason

I was building loops wrong...

AI JasonJuly 13, 202614m
In a Nutshell

The core message is that autonomous agent loops need a fixed structure—contract (goals + boundaries + SOP), state/logs, trigger layer, and a three-stage agent (orchestrator → executor → verifier)—to run safely without constant oversight. The biggest practical gains come from choosing the right trigger (cron, event, or cost-saving "combo" scripts that only wake the agent when real work exists) and adding a periodic "evolve" pass that rewrites the contract, scripts, or state based on past runs. All of this is packaged in an open-source tool called Loopery that turns these patterns into reusable templates for tasks like doc maintenance or React-doctor scans.

AI-Generated Notes

These notes were generated by AI and may contain inaccuracies.

It was 12:00 a.m. yesterday and a bunch of PRs still come into our codebase and it was not because of us working particularly hard, but we have agent wake up every 30 minutes, scan our codebase for any improvements and errors, check our server logs, and ship a PR. And every PR in Verify agent will test fully and attach your evidence for us to review. For some low-risk fix, it can even merge directly. And also, a CRM lifecycle agent will scan through our user base and find useful segments to outreach and nurture. And also, poor ticket is automatically handled, no matter which language users are speaking. And none of this is a demo.

All this loop has been running our company Super Divine for the past months. And today I'm going to show you exactly what we learned from building this loops, what worked and what didn't work. So, hopefully by the end of this video, you understand loops than most people in your timeline. So, last week I wrote about Loop Engineer, the shift from you prompting the agent to do a task towards designing system where the agent can decide what to work on, execute, verifies, and improve over time. And a lot of you said, "Okay, I'm sold, but how do I actually build one that actually works?" Because honestly, everyone can just put together a loop using Copilot or Codex and code it down. But that's easy 5%. The real work is how do you design guardrails that let you walk away from it? The loop that can consistently delivering the work safely and improve themselves over time.

Sign in to read the full notes

Get access to AI-generated notes, topic timestamps, and more.