Eric Siu explains how a loop works as a learning workflow. An agent identifies a target state, measures the gap between current and desired performance, then iterates over time to compound improvements. He uses website page load time as a concrete example.
Chapters
A loop is simply something that learns over time. It's a workflow that learns. You might have different connectors in it. You might have different artifacts that are tied to it. You might have different processes or skills that are tied to it. And then maybe you have a prompt or maybe you have a /goal command. Now that might be an agent. It's good for one-offs that can repeat. And so with the loop, you will identify what the target state is. So what you're looking to accomplish, maybe you want all of your pages on your website to be 50 milliseconds. And then it will evaluate the current state. So the current state might be 150 milliseconds. So 150 minus 50 is what? That's the gap right now. And then that, it knows what the gap is and it's going to continue to iterate off that. So there's a target, right? It's verifiable. And then also you put a timeline on it as well. And then that's how a loop continues to run over time. So you can see how this stuff compounds over time.