Rapid Iteration in Agentic Loops

Writing · 30 Apr 2026

Rapid Iteration in Agentic Loops

Taking output as input

While working with AI-agents to build things I often iterate through versions of the thing I am building. You try, experiment, fail, improve, and again. In the manual days before AI, I checked results by hand. But what if we teach agents to 'see' themselves?

Imagine you add a button somewhere. After writing the code you test drive the new program to see how it looks. Does it align well, does it fit on small screens, does it work? You can easily understand that the more complex software becomes, the more time-consuming this process will be.

Let agents see

To speed things up I gave the AI agent the ability to rapidly see the work it has created, on different screen sizes and to automatically test for alignment, overflow, legibility (a11y) and consistency. I am leveraging headless browsers and local computer vision (OpenCV) models to do this. I trained the setup by analysing beer bottles, having the agent build a 3D model from a photo. This exercise really improves your understanding of the image > data > AI-context > action flow.

The training subject: one beer bottle, photographed against the wall
The training subject: one beer bottle, photographed against the wall
From photo to 3D: the agent built a photo-textured depth mesh (Depth Anything V2), wireframe and auto-rotate included
From photo to 3D: the agent built a photo-textured depth mesh (Depth Anything V2), wireframe and auto-rotate included
The bottle as data: a Navier-Stokes particle simulation flows around its silhouette, live on the phone
The bottle as data: a Navier-Stokes particle simulation flows around its silhouette, live on the phone
The seeing loop in production: the agent downloads, analyses and categorises a customer photo archive
The seeing loop in production: the agent downloads, analyses and categorises a customer photo archive
Photo curation complete: 42 photos selected from 200, categorised and captioned in English and Dutch
Photo curation complete: 42 photos selected from 200, categorised and captioned in English and Dutch
The result lands in the Lemmid Manager: per-photo captions and labels, ready to publish
The result lands in the Lemmid Manager: per-photo captions and labels, ready to publish

Faster 'loop'

By automating the checking of iterative versions, I reduced 80% of the friction during development. In addition to visual checks I also feed the agent log output and automated 'smoke tests'. As a fun experiment I once operated the agentic loop while walking (Dutch: 'loop') on a treadmill. The faster the 'loop', the fitter I become, ha!

Operating the agentic loop while walking the loop: Vision Pro on, treadmill running
Operating the agentic loop while walking the loop: Vision Pro on, treadmill running
The improvised standing desk, seen through the Vision Pro: keyboard, phone and remote on the display cabinet
The improvised standing desk, seen through the Vision Pro: keyboard, phone and remote on the display cabinet

Conclusion

Agentic workflows likely are at their worst right now: things will only improve as computers and models will get faster. But you should not wait for this 'mythical day of frictionlessness': tackle your bottlenecks now! Energy not spent on repetitive tasks can be used elsewhere, where humans can make a real difference!

100% Willem

This was written by hand. In an age of AI-generated text, the original manuscript (PDF) shows the human thought and effort behind these words.

← More writing