Set your AI loose (with rules)
A beginner's guide to loop engineering.
• 3 min read
I used to babysit my AI assistant like a toddler near a pool. Type a prompt, watch it work, read the output, type the next prompt, repeat forever. Then I found out you can just...not do that. Instead, you can set up a loop: Tell the AI what to do, how to check its own work, and when to stop, then let it run while you do literally anything else. It felt like discovering the washing machine after years of hand-washing clothes in a bucket.
What loop engineering actually is: It’s designing an AI workflow that repeats itself without you clicking “send” every time. The AI cycles on its own: It gathers what it needs, does the task, checks whether it worked, and tries again if not—until it hits a stop condition. You’re not writing better prompts anymore—you’re writing the rules it follows while you’re not watching. For example, the Mozilla team used it to work through hundreds of Firefox bugs in a month (when it normally would have taken them a quarter).
How it works, roughly: Every loop needs four things: a trigger (a schedule, a new email, a specific command), a scope (what it’s allowed to touch), a check (how it knows it succeeded), and a stop condition (when it gives up and pings you). Think less “prompt” and more “job description.”
Try this prompt: “Every time I say ‘run,’ check [a specific inbox folder or shared doc]. Do [a specific action], then tell me what you did and flag anything you’re unsure about instead of guessing.”
Tech Brew breaks down the biggest tech news, emerging innovations, workplace tools, and cultural trends so you can understand what's new and why it matters.
By subscribing, you accept our Terms & Privacy Policy.
That’s a baby loop. Once you trust the loop, look for your tool’s built-in scheduling feature (most major chatbots have one now) so it can trigger itself—at either a certain time or when an action is performed.
What it’s great for: Repetitive, well-defined chores like sorting a messy inbox, drafting the same weekly report, or cleaning a spreadsheet every Monday (anything you’d normally do the exact same way twice).
What it’s bad at: Judgment calls with real stakes. A loop will happily keep “fixing” something in a way that technically satisfies its own check while quietly making a mess, because it has no idea it’s wrong until you tell it. Don’t loop anything you wouldn’t hand to an intern and walk away from for a week.
Start small, watch it once or twice, then let go. —YT
Yash Thakker is an AI practitioner, product builder, and educator with over 12 years of experience building AI-powered products. He has taught more than 350,000 learners globally through 50+ courses and live programs, with a focus on generative AI, AI agents, and practical AI adoption. You can find his course on loop engineering here.
Tech Brew breaks down the biggest tech news, emerging innovations, workplace tools, and cultural trends so you can understand what's new and why it matters.
By subscribing, you accept our Terms & Privacy Policy.