WebCoder: Scaling General Frontend Development with Artifact-Grounded Agentic Reinforcement Learning
Organizations: Tsinghua University · Zhipu AI · Beihang University · University of Oslo
Abstract
Real-world frontend development requires agents to compose reproduction, generation, modification, and repair over an evolving application state. Learning a general policy for this process requires translating heterogeneous execution feedback into task-aligned rewards and effective credit assignment across long sequences of interdependent actions. We introduce WebCoder, a general frontend development agent trained with artifact-grounded agentic reinforcement learning. Our key idea is to assess diverse development activities through their effects on a shared executable artifact and its satisfaction of task requirements. We build Webdev-World, an executable environment that integrates code editing, application execution, browser inspection, and on-demand skills while preserving project state across interactions. An independent verifier evaluates the final application against task requirements to provide terminal rewards, while changes in intermediate artifact progress redistribute the resulting rollout advantage across development segments. Context compaction and message-tree sample construction support training on trajectories beyond a single context window while avoiding repeated loss computation on shared generated history. We further introduce Webdev-Bench to evaluate composed development requirements within a single project. On Webdev-Bench, WebCoder-27B raises requirement satisfaction from 64.8 for its Qwen3.8-27B base model to 72.8, exceeding Claude-Opus-4.8 (65.1) and GPT-5.4 (59.6); on Vision2Web, it improves the average visual and functional score from 41.1 to 62.4, on par with Claude-Opus-4.8. Ablation studies confirm the contributions of artifact-grounded credit assignment and long-horizon training.
Figures & tables
| Model | Vision2Web | Webdev-Bench | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| VS | FS | Avg | DSR | RS | VS | FS | IS | Avg | DSR | |
| Proprietary Models | ||||||||||
| Claude-Opus-4.8 | 59.1 | 65.9 | 62.5 | 98.5% | 65.1 | 75.0 | 70.7 | 84.1 | 73.7 | 100.0% |
| GPT-5.4 | 51.3 | 64.4 | 57.9 | 97.0% | 59.6 | 72.7 | 70.0 | 81.0 | 70.8 | 100.0% |
| GPT-5 | 23.3 | 64.7 | 44.0 | 98.5% | 53.5 | 64.0 | 65.8 | 74.6 | 64.5 | 100.0% |
| Gemini-3-Pro | 13.3 | 14.6 | 14.0 | 65.2% | 48.0 | 65.8 | 58.5 | 68.5 | 60.2 | 100.0% |
Appendix figures & tables29 assets
Supplementary material from the paper’s appendix.
Appendix
| Requirement type | Evidence | Verification | Weight |
| Reproduction tasks (reference screenshot) | |||
| Pixel-level fidelity | rendered page vs. reference | deterministic image comparison ( ) | 0.6 |
| Visual fidelity / layout | screenshot | judge, anchored scale | / |
| Content coverage / text match | screenshot | judge, anchored scale | / |
| Render health | screenshot | judge, anchored scale | |
| Generation tasks (textual requirements) | |||
| Item | Configuration |
|---|---|
| Policy initialization | Qwen3.8-27B |
| Training algorithm | GRPO |
| Tasks per training step | 16 |
| Rollouts per task | 8 |
| Learning rate | (constant) |
| Training precision | BF16 |
| Rollout | Visual fidelity | Coverage | Layout | Text match | Render health | Pixel leg | Reward |
|---|---|---|---|---|---|---|---|
| Highest | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 0.920 | 0.952 |
| Lowest | 0.75 | 1.00 | 1.00 | 1.00 | 1.00 | 0.659 | 0.765 |
| Req. 1 dashboard | Req. 2 search and filters | Req. 3 watch list | Req. 4 sidebar and views | |
| Pass 1 | 5/5 | 6/6 | 5/6 | 5/5 |
| Pass 2 | 5/5 | 6/6 | 5/6 | 5/5 |
| Pass 3 | 5/5 | 6/6 | 5/6 | 5/5 |
| Model | Requirements 1–5 | RS | Items below grade 3 (grade) |
|---|---|---|---|
| WebCoder-27B | 1, 1, 1, 1, 1 | 1.0 | none |
| Gemini-3-Pro | 1, 1, 0, 0, 0 | 0.4 | five parts in two rows (1), numerals visible with their texts (1), block height within 1400 px (2); pager shown for single-page categories (2); statistics cell linked to the newsroom (1), button style consistency (2) |
| Word | Early | Trough | Recovery |
|---|---|---|---|
| look | 63.2 | 125.3 | 89.1 |
| reference | 148.5 | 219.3 | 183.3 |
| check | 60.1 | 85.3 | 84.3 |
| edit | 19.3 | 8.1 | 10.3 |
| run | 42.2 | 31.1 | 37.6 |
| Model | Webdev-Bench | Item grade-3 rate | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| RS | VS | FS | IS | Avg | DSR | Functional | Coverage | Interaction | Visual | |
| Proprietary Models | ||||||||||
| Claude-Opus-4.8 | 65.1 | 75.0 | 70.7 | 84.1 | 73.7 | 100.0% | 83.6 | 83.3 | 91.6 | 86.1 |
| GPT-5.4 | 59.6 | 72.7 | 70.0 | 81.0 | 70.8 | 100.0% | 83.1 | 85.2 | 91.3 | 84.8 |
| GPT-5 | 53.5 | 64.0 | 65.8 | 74.6 | 64.5 | 100.0% | 81.4 | 80.6 | 86.3 | 77.0 |
| Gemini-3-Pro | 48.0 | 65.8 | 58.5 | 68.5 | 60.2 | 100.0% | 75.2 | 75.9 | 80.3 | 77.7 |
| Model | Brownfield ( =11) | Replication ( =9) | Text-to-project ( =20) | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| RS | VS | FS | IS | RS | VS | FS | IS | RS | VS | FS | IS | |
| Proprietary Models | ||||||||||||
| Claude-Opus-4.8 | 79.5 | 90.9 | 90.0 | 90.9 | 58.9 | 61.1 | 78.3 | 77.8 | 60.0 | 72.5 | 56.7 | 83.2 |
| GPT-5.4 | 71.8 | 75.0 | 87.7 | 95.5 | 55.0 | 71.3 | 66.7 | 74.1 | 55.0 | 72.1 | 61.7 | 76.1 |
| GPT-5 | 59.5 | 65.9 | 86.8 | 74.2 | 37.2 | 50.9 | 46.7 | 61.1 | 57.5 | 68.8 | 62.9 | 80.8 |
| Gemini-3-Pro | 55.0 | 62.1 | 80.5 | 85.6 | 23.3 | 52.8 | 32.2 | 40.7 | 55.3 | 73.8 | 58.3 | 71.6 |
| Skill | Role |
|---|---|
| Screenshot replication | |
| Pipeline coordination | Coordinates planning, implementation, and validation. |
| Input analysis | Interprets reference inputs and identifies the task mode. |
| Long-image planning | Divides tall screenshots into semantic sections. |
| Flow planning | Models multiple reference views as application states and transitions. |
| Asset processing | Prepares visual assets and selects their representations. |
AI Coding Agents
AI coding agents use language models and software tools to plan, edit, test, and maintain code with varying levels of autonomy.
See all 321 papers