SCAFFOLD: Self-Improving Web Agents via Recursive Parametric Skill Abstraction
Organizations: MBZUAI · McGill University · CityUHK · UMass Boston
Abstract
Web agents need to navigate visually rich, long-horizon interfaces that change across sites, yet most previous agents still learn each task in isolation and discard the procedural knowledge they accumulate. Recent skill-augmented frameworks take an important first step, but they treat the skill library as a flat or two-tier prompt-side cache and offer no principled mechanism for compressing redundancy or composing skills recursively. We introduce Scaffold, a self-improving framework for visual web agents that (i) induces parametric, executable skills from successful trajectories under a multi-instance abstraction constraint, (ii) maintains a recursively composed hierarchy in which higher-level skills invoke lower-level ones, (iii) compacts the library via a minimum-description-length (MDL) criterion and behavioral equivalence checking, and (iv) periodically distills skill-augmented trajectories back into model weights to internalize the abstractions. Across WebArena, VisualWebArena, and a held-out split of Online-Mind2Web, Scaffold improves success rate by -- absolute points over the strongest skill-augmented baseline and shows monotonic gains across five self-improvement iterations without library collapse. We release the code and documents in the Github repository.
Figures & tables
| Method | WebArena | VWA | OM2W-X |
|---|---|---|---|
| (A) Zero-shot agents (Qwen2.5-VL-7B) | |||
| ReAct Yao et al. (2023) | 8.1 0.6 | 6.2 0.4 | 11.2 0.9 |
| SeeAct Zheng et al. (2024a) | 12.4 0.5 | 9.7 0.6 | 14.0 1.0 |
| WebVoyager He et al. (2024) | 15.3 0.7 | 11.8 0.5 | 17.5 1.2 |
| AgentOccam Yang et al. (2025) | 16.8 0.4 | 12.4 0.6 | 18.1 0.8 |
| (B) Memory/Workflow-augmented | |||
| Variant | WA | VWA | OM2W-X |
|---|---|---|---|
| Full Scaffold | 42.7 | 36.3 | 43.5 |
| multi-instance ( ) | 38.1 | 31.7 | 38.4 |
| recursive composition (depth 1) | 36.4 | 30.5 | 36.1 |
| MDL compaction | 39.6 | 33.8 | 40.0 |
| distillation (in-context only) | 34.7 | 28.4 | 34.0 |
| holdout validation in induction | 39.0 | 32.6 | 39.7 |
| Method | Clean | Latency | DOM-shuf. | +7 d |
|---|---|---|---|---|
| SkillWeaver | 29.1 | 25.3 | 24.7 | 26.5 |
| SkillRL | 31.6 | 28.0 | 27.6 | 28.9 |
| Scaffold | 42.7 | 40.9 | 40.6 | 41.4 |
| Drop relative to clean ( in points) | ||||
| SkillWeaver | n/a | |||
| SkillRL | n/a | |||
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Site | SkillRL | Scaffold | |
|---|---|---|---|
| WebArena | |||
| OneStopShop | 30.5 | 42.6 | +12.1 |
| 33.2 | 41.9 | +8.7 | |
| GitLab | 28.4 | 45.1 | +16.7 |
| CMS | 27.0 | 42.9 | +15.9 |
| VisualWebArena | |||
| Hyperparameter | Range tested | SR (WA) |
|---|---|---|
| Multi-instance threshold | / / / | |
| Compaction interval | / / / | |
| Equivalence threshold | / / / | |
| LoRA rank for distillation | / / / |
| Training signal (same trajectories, ) | WA |
|---|---|
| No SFT, in-context library only (Tab. 2 ) | 34.7 |
| Standard SFT, trajectories flattened to primitives | 38.6 |
| Plan-augmented SFT, no auxiliary skill-name loss | 41.6 |
| Full Scaffold distillation | 42.7 |
| STaR-style loop: SFT on raw trajectories, no library | 30.4 |
| Configuration | WA |
|---|---|
| SkillWeaver | 29.1 |
| multi-instance induction with holdout validation | 31.9 |
| recursive composition | 34.0 |
| distillation | 39.6 |
| MDL compaction (= full Scaffold ) | 42.7 |
| Max primitive steps | 10 | 20 | 30 |
|---|---|---|---|
| SkillWeaver | 11.5 | 24.0 | 29.1 |
| SkillRL | 13.2 | 26.4 | 31.6 |
| Scaffold | 19.8 | 36.9 | 42.7 |
| Method | Pol. | Grd. | Jdg. | Tok. (K) | Time (s) |
|---|---|---|---|---|---|
| ReAct | 18.7 | 0 | 0 | 224 | 102 |
| SkillWeaver | 9.6 | 0 | 0 | 118 | 74 |
| Scaffold | 5.3 | 7.1 | 4.6 | 79 | 61 |
| Grounding mode | Clean | DOM-shuf. | Grd./task |
|---|---|---|---|
| VLM grounding (main paper) | 42.7 | 40.6 | 7.1 |
| Hybrid with selector cache | 42.5 | 40.1 | 2.7 |
| Static selectors only | 41.2 | 33.5 | 0 |
| Aspect | PolySkill | SkillEvo | Scaffold |
|---|---|---|---|
| Skill unit | abstract interface plus per-site implementations | skill paths in a graph | parametric executable program with pre/postconditions |
| Composition | compositional, prompt-side | composite skills over the skill path graph | recursive, unbounded depth (5 observed) |
| Library governance | none | graph updates, no compression objective | MDL merge / refactor / prune with validation safety net |
| Policy weights | frozen | GRPO with a learned reward model | SFT distillation of skill plans |
| Setting | HTML agents, Mind2Web / WebArena | text agents, WebArena-Lite | visual agents, WA / VWA / OM2W |
Web Agents
Web agents use language and vision models to navigate websites, gather information, and complete tasks through interactive interfaces.
See all 176 papers