SYNTHESIS NOTE
Topics›RLVR›this note

Can splitting UI-to-code into separate agents fix both perception and planning?

Current end-to-end models fail at both perceiving UI elements and planning layouts. Can isolating these tasks into specialized agents—grounding, planning, generation—let each one succeed where unified models struggle?

Synthesis note · 2026-11-18 · sourced from RLVR

ScreenCoder decomposes UI-to-code generation into three agents — grounding, planning, generation — because, per the excerpt, current multimodal LLMs show "two recurring failure modes: (1) perception errors, where components are missed or misclassified, and (2) planning errors, where components are placed incorrectly or violate layout constraints." The grounding agent "leverages a multimodal large language model to localize and semantically label key UI regions" by querying it with prompts like "Where is the sidebar?" The planning agent "constructs a hierarchical layout tree using domain knowledge of web layout systems," and the generation agent "produces HTML and CSS code via adaptive prompt-based synthesis." The paper reports this modular design "achieves state-of-the-art performance in layout fidelity, structural coherence, and generation quality" against end-to-end MLLM baselines such as GPT-4o.

The authors argue the failures are not due to "an intrinsic inability to perform any single subtask" but to "the burden of a monolithic, end-to-end approach that overloads a single model with granular perception, complex spatial planning, and structured code synthesis simultaneously." Splitting the work across agents lets them "inject specific domain knowledge at each stage, such as established layout conventions in the planning agent" — domain knowledge a general-purpose MLLM does not hold on its own.

This mirrors Why do planning and grounding pull against each other in agents?, but names code generation as a third, distinct problem rather than folding it into either stage. It also extends Why do vision-only GUI agents struggle with screen interpretation? from action grounding to full UI-to-code synthesis: where OmniParser's structured parsing unblocks GPT-4V's action prediction, ScreenCoder's grounding stage (bounding boxes plus labels like "sidebar" or "header") feeds a layout-tree planner instead of an action policy. It shares with Do text-based GUI agents actually work in the real world? the premise that visual perception is a capability a general MLLM can't absorb in one pass, and sits against Can one model understand both UIs and infographics equally well?, which pretrains element-identification directly into one model rather than isolating it as a separate inference-time agent.

The excerpt does not give the benchmark numbers behind "state-of-the-art performance," nor which end-to-end baselines beyond GPT-4o's noted failure modes were measured against ScreenCoder on its ScreenBench; it also does not describe how a planning-agent error gets corrected if the grounding agent has already mislabeled a region. The claim should be read as an architectural pattern the authors found effective, not as a quantified margin of improvement.

Inquiring lines that read this note 7

This note is a source for these research framings, grouped by the broader line of inquiry each explores. Scan the bold lines of inquiry; follow any specific question forward.

How should design principles adapt for AI-generated interfaces? Can visual rendering-based rewards effectively improve code and layout quality? What prevents AI agents from achieving claimed real-world autonomy? What perception approach enables GUI agents to work most effectively?

Related concepts in this collection 5

This note in its neighbourhood — explore the map, then jump to a related concept in the list below.

Concept map
12 direct connections · 69 in 2-hop network ·medium cluster Open in graph ↗

Click a node to walk · click center to open · click Open in graph to see this note in the full knowledge graph

your link semantically near linked from elsewhere

Related papers in this collection 8

Papers most semantically related to this note, ranked by cosine similarity in the embedding space.

Original note title

ScreenCoder separates UI-to-code generation into grounding, planning, and generation agents to fix perception and planning failures separately