browser-drivers
Select, configure, and troubleshoot LaVague Selenium and Playwright browser drivers safely.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- browser-drivers
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Select, configure, and troubleshoot LaVague Selenium and Playwright browser drivers safely.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/browser-workflows.md8.7 KB
- 参考文档references/driver-reference.md7.8 KB
- 参考文档references/troubleshooting.md8.1 KB
- 脚本scripts/lavague_driver_probe.py12.4 KB
03 SKILL.md 正文
LaVague browser drivers
Use this sub-skill when the task is to choose or configure a LaVague browser driver, verify browser runtime availability, connect an existing browser/session, or diagnose Selenium/Playwright browser failures.
Route here for
- Choosing
SeleniumDriverversusPlaywrightDriverfor a LaVagueActionEngineorWebAgent. - Configuring
headless, viewport size,user_data_dir, custom Selenium options, driver injection, or Playwright page factories. - Diagnosing missing Chrome/Chromedriver, missing Playwright browser binaries, GUI/headless mismatches, tabs, iframes, scrolling, screenshots, or Browserbase remote Selenium setup.
Route elsewhere
WorldModel,ActionEngine,WebAgent, agent logging, token counting, and normalagent.run()patterns: route to../core-web-agent/.- Provider contexts, OpenAI/Gemini/Anthropic/Fireworks credentials, embeddings, and retrievers: route to
../contexts-and-retrievers/. - Gradio,
agent.demo(), Chrome extension server, websocket driver server, orlavague-serve: route to../server-extension-gradio/. - QA generation or benchmark runner CLI behavior: route to
../qa-and-test-runner/.
Start points
- Read references/driver-reference.md for constructor signatures, driver capabilities, and feature support boundaries.
- Use references/browser-workflows.md for copyable Selenium/Playwright setup patterns, existing-session recipes, iframe/tab/scan behavior, and Browserbase notes.
- Use references/troubleshooting.md when browser construction fails, Playwright binaries are missing, headless/headed behavior is wrong, or a page with CAPTCHAs/pop-ups/iframes/tabs stalls.
- Run the safe probe before spending browser/API time:
python sub-skills/browser-drivers/scripts/lavague_driver_probe.py
The probe checks imports and local browser binary hints by default. It does not launch a browser unless --construct is provided.
Driver choice in one minute
- Prefer
SeleniumDriverfor the widest LaVague feature coverage: default install path, iframes, multiple tabs, element highlighting, scrolling, dropdowns, custom Selenium options, and Browserbase remote connection. - Use
PlaywrightDriveronly when the caller specifically wants Playwright or already has a Playwright page/context. Treat it as a smaller feature surface: do not promise Selenium feature parity, remote Browserbase support, or complete tab/headless-agent behavior without a local verification run. - Both driver constructors create a browser/page immediately. If the task only asks whether the environment is ready, run the bundled probe without
--constructfirst.
Minimal usage patterns
Selenium default:
from lavague.core import ActionEngine, WorldModel
from lavague.core.agents import WebAgent
from lavague.drivers.selenium import SeleniumDriver
driver = SeleniumDriver(headless=True)
action_engine = ActionEngine(driver)
agent = WebAgent(WorldModel(), action_engine)
# agent.get(url); agent.run(objective) belongs to the core-web-agent workflow.
Playwright selection:
from lavague.core import ActionEngine
from lavague.drivers.playwright import PlaywrightDriver
driver = PlaywrightDriver(headless=True)
action_engine = ActionEngine(driver)
Existing Chrome session for CAPTCHA/login-heavy sites:
from lavague.drivers.selenium import SeleniumDriver
driver = SeleniumDriver(headless=False, user_data_dir="/path/to/chrome-profile")
Do not hard-code profile paths or credentials in reusable scripts. Ask the caller for an explicit path at runtime.
Safety defaults
- Default probes and recipes here avoid model provider calls, downloads, public-site navigation, persistent servers, and browser launch.
--constructin the bundled probe is the explicit opt-in for browser launch. Passing--urlmay navigate to that URL; omit it for a blank-page construction check.- Browser examples can still require GUI support, browser binaries, matching drivers, provider credentials, and network access when escalated into full agent execution.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).