Add Web Skill Factory: Evolving Reusable, Verified, Code-Native Skills for Web Agents#62
Open
DEM1TASSE wants to merge 1 commit into
Open
Add Web Skill Factory: Evolving Reusable, Verified, Code-Native Skills for Web Agents#62DEM1TASSE wants to merge 1 commit into
DEM1TASSE wants to merge 1 commit into
Conversation
… web skills The Skill Factory turns Webwright's solve trajectories into a growing library of reusable, parameterized skills that are plain Python + Playwright — code you can run without a model and compose into the next task instead of re-exploring a site. The loop is solve -> gate -> group by template -> distil -> replay-verify -> library -> reuse, with two independent gates. An input gate keeps untrustworthy solves out (gold answers, or a self-verify shape/non-empty/agent-report check); an output gate replays each distilled skill standalone, with no model, and admits it only if it reproduces its own training answers. That second gate is what lets a landed skill carry a real grade — executable (replay ran and reproduced), reference (replay ran and failed; kept as a labelled prior the agent reads), or unverified (replay skipped). Commands: - init — a one-line need becomes a skill.yaml skeleton you fill with ground truth - build — solve N instances of a spec, then learn from them (parallel, resumable) - learn — distil trajectories you already have into the library - update/skill_use — the manual manifest path and the solve-time library query Includes the flight-schedule example end to end (spec, trajectories, and a verified executable skill), docs (quickstart in the module README, plus reference and manual mode), a demo video and pipeline diagram, and a test suite covering the gates, distillation, replay comparison, and config wiring.
adamlu123
reviewed
Jul 17, 2026
| Validated end-to-end on a real public website (read-only GitHub): solve two repos from scratch → | ||
| `update` builds a parameterized skill → a held-out repo is solved by reusing it (agent calls | ||
| `skill_use`, verdict `use`, answer correct); a wrong solve is kept out by the gate; a second batch | ||
| improves the existing skill in place. See [`src/webwright/skills/README.md`](src/webwright/skills/README.md). |
Contributor
There was a problem hiding this comment.
update src/webwright/skills/README.md
adamlu123
reviewed
Jul 17, 2026
| @@ -0,0 +1,194 @@ | |||
| # Reference — verification, parameters, components | |||
|
|
|||
| [← back to the module README](../../src/webwright/skill_factory/README.md) | |||
Contributor
There was a problem hiding this comment.
I did not find a skill_factory/README.md?
adamlu123
reviewed
Jul 17, 2026
adamlu123
left a comment
Contributor
There was a problem hiding this comment.
detailed comments inline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds Web Skill Factory (
webwright.skill_factory) — a self-evolving skill library on top of Webwright's code-as-action solves. It turns thefinal_script.pyevery solve already produces into reusable, parameterized skills that are plain Python + Playwright: code you can run without a model and compose into the next task instead of re-exploring a site.At solve time the agent queries the library once and gets one of three recommendations —
use,adapt, orskip— plus the skill's source to reuse or modify. Reuse never blocks the agent from continuing on its own. Both integration points are additive; the agent loop and default config are unchanged.Why code, not notes:
Two gates, and a grade that means something
gold(a known answer), or the defaultself_verify(shape + non-empty + the agent's own success report).The output gate is what lets a landed skill carry a real grade:
executable(replay ran and reproduced — run it directly),reference(replay ran and failed — kept as a labelled prior the agent reads), orunverified(replay skipped).Modules
Each has a stable interface and a swappable implementation:
skill_factory/library.pySkill+Library, skills on disk (skill.py+meta.json)skill_factory/retrieve.pyskill_factory/decide.pyskill_factory/gate.pyskill_factory/update.pyrefinedistils, parameterizes, decomposes into primitives, and replay-verifiesskill_factory/learn.pylearn <runs_dir>— auto-group runs into templates, gate, evolve; no manifest to writeskill_factory/init.pyinit "<need>"— draft askill.yamlskeleton to fill with ground truthskill_factory/build.pybuild <spec>— solve N instances then learn (parallel, resumable)skill_factory/llm.pyModel(no endpoint/key hardcoded)skill_factory/prompt.pywith_skill_hint)tools/skill_use.pyHow it plugs in (no change to the agent loop or default config)
skill_usetool, invoked from bash likeself_reflection/image_qa:{verdict: use|adapt|skip, skill_id, source_path, how_to_reuse}.update) remains for benchmarks and logged-in sites.examples/learned_library/checks in the skill this produced from 3 real Google Flights solves — five parameters lifted (origin/destination city+code, date), verified on an unseen route three independent ways (from scratch / reuse / standalone, same answer) — with a CI test locking it.Validation
WebArena: 10 templates across 3 sites — reuse lifts held-out accuracy +15pp and saves steps
10 retrieve-type task templates across shopping-admin / gitlab / map. Per template: 3 train solves build the library (admitted only if gold-verified), 2 held-out instances (unseen parameter values) measure reuse. Every task is solved both with the library and from scratch. Model: gpt-5.4. 100 runs total.
executableskill rerunning an unseen route standalone, with no model.