Index / Snippets / Giving an AI coding agent visual feedbac

Giving an AI coding agent visual feedback with headless browsers and OpenCV

Automated checks make the agentic loop faster.

Answers
How do you let an AI coding agent check its own UI work?
Topics
AI · experiment · programming · work
Full article on willem.com
https://willem.com/en/2026-04-30_rapid-iteration-in-agentic-loops/

Summary

In 2026 I gave my coding agent eyes: headless browsers render its work on different screen sizes, and local OpenCV models automatically check alignment, overflow, legibility and consistency. That removed about 80% of the friction in my development loop.

Full text

Testing UI changes by hand, checking how a new button looks and fits on every screen size, gets more time-consuming as software grows more complex. So I automated it. The agent renders its own work in headless browsers on different screen sizes, and local computer vision models built on OpenCV automatically test for alignment, overflow, legibility (a11y) and consistency. On top of the visual checks I feed the agent its log output and automated smoke tests, so every iteration gets verified without me in the loop. I trained the setup by having the agent build a 3D model from a photo of a beer bottle, a useful exercise for understanding the image to data to AI-context to action flow. Do not wait for faster models: tackle your bottlenecks now.

Machine formats of this page