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?
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?- Why do generative UI tools fail to implement their own stated design rationales?
- Why do generative UI tools fail to implement stated design rationales consistently?
- Why do generative UI tools fail to implement stated design rationales?
Related concepts in this collection 5
This note in its neighbourhood — explore the map, then jump to a related concept in the list below.
Click a node to walk · click center to open · click Open in graph to see this note in the full knowledge graph
-
Why do planning and grounding pull against each other in agents?
Planning requires flexibility and error recovery while grounding demands action accuracy. Do these conflicting optimization requirements force a design choice about how to structure agent architectures?
same planning/grounding split, but ScreenCoder adds a third, separate generation stage.
-
Why do vision-only GUI agents struggle with screen interpretation?
Exploring whether GPT-4V's performance bottleneck in GUI automation stems from the simultaneous cognitive load of parsing icon semantics and predicting actions, and whether factoring these tasks improves reliability.
same insight that explicit parsing unblocks a monolithic MLLM, applied to action rather than code generation.
-
Do text-based GUI agents actually work in the real world?
Can language-only agents that rely on HTML or accessibility trees handle actual user interfaces without structured metadata? This matters because deployed systems face visual screenshots, not oracle data.
shares the premise that visual perception needs dedicated handling, not a byproduct of one general model.
-
Can one model understand both UIs and infographics equally well?
Screen UIs and infographics share visual structure but have been tackled separately. Can a unified schema and annotation-based pretraining bridge them in a single small model?
contrasts by pretraining element-identification into the model rather than isolating it as a separate agent.
-
Can filtered agent-generated data improve UI code generation models?
ScreenCoder's pipeline produces curated image-code pairs from web crawls to post-train multimodal models. The question is whether this filtering and dual-stage fine-tuning approach meaningfully enhances UI generation capabilities.
Extends: the same modular pipeline also generates a filtered 10K-pair dataset to post-train MLLMs via SFT and RL
Related papers in this collection 8
Papers most semantically related to this note, ranked by cosine similarity in the embedding space.
- ScreenCoder: Advancing Visual-to-Code Generation for Front-End Automation via Modular Multimodal Agents
- UI-TARS: Pioneering Automated GUI Interaction with Native Agents
- GameUIAgent: An LLM-Powered Framework for Automated Game UI Design with Structured Intermediate Representation
- Harness design for long-running application development
- UI-TARS-2 Technical Report: Advancing GUI Agent with Multi-Turn Reinforcement Learning
- An Empirical Study of Harness Design for Coding Agents
- ShowUI: One Vision-Language-Action Model for GUI Visual Agent
- OmniParser for Pure Vision Based GUI Agent
Original note title
ScreenCoder separates UI-to-code generation into grounding, planning, and generation agents to fix perception and planning failures separately