Add Web Skill Factory: Evolving Reusable, Verified, Code-Native Skills for Web Agents - #62
Merged
Merged
Conversation
| 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
| @@ -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?
Adam (adamlu123)
left a comment
Contributor
There was a problem hiding this comment.
detailed comments inline.
Demi Wang (DEM1TASSE)
force-pushed
the
skill-factory
branch
7 times, most recently
from
July 28, 2026 22:54
bb71ec6 to
0919797
Compare
Demi Wang (DEM1TASSE)
force-pushed
the
skill-factory
branch
5 times, most recently
from
August 3, 2026 21:28
60a8f10 to
e8619b0
Compare
… 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.
Demi Wang (DEM1TASSE)
force-pushed
the
skill-factory
branch
from
August 3, 2026 21:34
e8619b0 to
26228db
Compare
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.Reuse is resolved out of the agent loop: before a solve starts,
route(built onrecommend) checks the library and either runs a matching skill directly — no model, no agent — or hands it to the agent as a prior to adapt. The verdict isrun/adapt/skip; the agent never spends its own steps querying the library. 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)skill_factory/route.pyrecommend, then act: run the skill directly / launch the agent / fall backskill_factory/execute.py·fill.py·entry_shim.py--flagstools/skill_use.pyrecommend(task, library)→run/adapt/skip+ chosen skill, how-to-reuse, filled params — the out-of-loop decisionrouteis built onHow it plugs in (no change to the agent loop or default config)
routedecides (viarecommend) and acts; the decision is resolved before/around the solve, not by the agent mid-loop:python -m webwright.skill_factory route --task "<the task>" --library ./library [--start-url ...]run(execute the skill directly, no model) /adapt(agent reuses it as a prior) /skip. Without--start-urlit only prints the decision (and still runs a directly-runnable skill).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.