Web agents must navigate visually rich, long‑horizon interfaces that vary across sites. Most prior agents learn each task in isolation and discard procedural knowledge after completion. Recent skill‑augmented frameworks introduce a skill library but treat it as a flat or two‑tier prompt cache, lacking principled ways to compress redundancy or compose skills recursively.
We introduce Scaffold, a self‑improving visual web‑agent framework with four key components: (i) induces parametric, executable skills from successful trajectories under a multi‑instance abstraction constraint; (ii) maintains a recursive hierarchy where higher‑level skills invoke lower‑level ones; (iii) compacts the library using a minimum‑description‑length (MDL) criterion and behavioral equivalence checking; (iv) periodically distills skill‑augmented trajectories back into model weights to internalize abstractions.
Across WebArena, VisualWebArena, and a held‑out split of Online‑Mind2Web, Scaffold improves success rate by $11.1$–$17.2$ absolute points over the strongest skill‑augmented baseline and shows monotonic gains over five self‑improvement iterations without library collapse. The code and documentation are released on GitHub.
Review