Give the AI Eyes

Closing the visual loop for AI coding sessions

The AI writes the UI and generates the image — then can’t see it.

An AI coding session can produce UI code and images all day long. But it cannot SEE what it just produced, so it acts on visuals while blind to them.

The repo has a name for exactly this gap.

It can act

Generate UI code and images on demand.

It can’t see

No way to look at the result it produced.

Its own story deck diagnoses the gap out loud.

Slide 2 of the module’s visual-intelligence.html story deck states the problem verbatim — this is self-diagnosed, not our framing.

And here is why words alone can’t close it.

“Text is a lossy codec for visual information.”
Story deck slide 2, docs/stories/visual-intelligence.html (commit 5492459, 2026-02-27)

Every round trip through language bleeds fidelity.

Describe → implement → screenshot → describe again. Each pass through words loses a little more, and small deviations compound silently.

To close the loop, the AI needs to actually see — not narrate.

Describe

Spacing, weight, color survive only as approximation in words.

Implement → Screenshot

The build drifts from the mockup a little.

Describe again

Another lossy pass — deviations compound silently.

nano-banana gives the AI exactly three vision operations.

One tool module wrapping Google’s Gemini VLM exposes three operations — concrete sight replacing verbal approximation. Its input schema enum lists precisely these three.

But the design is careful about how they combine.

analyze

Structured description of a single image: components, fonts, colors, layout.

compare

Two images → match %, differences named and located.

generate

Text → image, optional reference images, 1–4 outputs.

It steers agents away from chaining analyze → generate.

The image_path schema warns against it directly, because turning a picture into words and back reintroduces the exact text bottleneck the tool exists to avoid.

So when it’s time to check the result, one operation does it right.

“Chaining analyze → generate loses visual fidelity through text bottleneck.”
tool.py input_schema image_path description; guidance added in commit 89988f5 (2026-03-23)

compare closes the loop.

The AI finally sees the difference precisely instead of guessing at it in prose — the operation the repo itself calls the one that closes the loop.

Now make it dependable in a real session.

A resilience layer makes closing the loop reliable, not a lucky call.

The latest commit adds retry with exponential backoff plus a model fallback chain, so transient failures don’t leave the loop open.

Which leaves one thing for you to take away.

3
default max_retries, with exponential backoff (delay = 2 ** attempt)
7
retryable transient markers (500 / 503 / 429 / INTERNAL / UNAVAILABLE / RESOURCE_EXHAUSTED / DEADLINE_EXCEEDED)
4aefe6a
resilience-layer commit, 2026-03-27
The takeaway

Stop describing pixels to a blind agent.

Give it sight, and let compare close the loop. Precise vision beats verbal round trips.

Sources

Research Methodology

Feature status: Active — module version 0.1.0, no release tags.

Primary source: kenotron-ms/amplifier-module-tool-nano-banana, verified against clone at /tmp/nano-banana (branch main, HEAD 4aefe6a, 20 commits).

Commands run:

Primary contributor: Ken Chau (kenotron-ms) — sole author of all 20 commits.

Gaps: No merged PRs (development via direct commits). Runtime behavior against the live Gemini API was not executed; all claims grounded in source, docs, and git history. The “~150 lines of core logic” figure is the repo’s own approximate/marketing claim (actual tool.py = 601 lines).

More Amplifier Stories