core-web-agent
Build, run, debug, and cost-check LaVague WebAgent workflows with WorldModel, ActionEngine, PythonEngine, logging, and safe dry-run scaffolds.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- core-web-agent
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Build, run, debug, and cost-check LaVague WebAgent workflows with WorldModel, ActionEngine, PythonEngine, logging, and safe dry-run scaffolds.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-reference.md6.3 KB
- 参考文档references/logging-and-debugging.md4.0 KB
- 参考文档references/troubleshooting.md4.3 KB
- 参考文档references/workflows.md4.3 KB
- 脚本scripts/lavague_minimal_agent.py4.8 KB
03 SKILL.md 正文
LaVague core WebAgent workflows
Use this sub-skill when the task is to create, adapt, debug, or explain a LaVague WebAgent run loop: WorldModel, ActionEngine, PythonEngine, navigation controls, logging, token counting, and returned ActionResult handling.
Route here for
- Building a minimal agent with
WorldModel,ActionEngine, a browser driver, andWebAgent. - Choosing between
agent.run(...),agent.run_step(...),agent.demo(...), or a dry-run template. - Wiring custom LLM/embedding/multimodal objects after a context has been chosen.
- Interpreting
ActionResult.success,ActionResult.output, generated code, logs, token/cost estimates, and debug node displays. - Troubleshooting core-agent errors after browser and provider dependencies are already selected.
Route elsewhere
- Selenium/Playwright binary, profile, iframe, tab, scroll, screenshot, and browser construction issues: use
../browser-drivers/SKILL.md. - OpenAI/Azure/Anthropic/Gemini/Fireworks contexts, cache contexts, Cohere, or custom retriever pipelines: use
../contexts-and-retrievers/SKILL.md. - Gradio demos, Chrome extension server,
AgentServer,DriverServer, orlavague-serve: use../server-extension-gradio/SKILL.md. lavague-qaorlavague-testCLI workflows: use../qa-and-test-runner/SKILL.md.
Start points
- Read references/workflows.md for minimal, context-backed, step-by-step, and dry-run WebAgent recipes.
- Read references/api-reference.md for verified constructor signatures, method names, and return objects.
- Read references/logging-and-debugging.md when the user asks about token costs, logs, node inspection, SQLite logging, or step-by-step debugging.
- Read references/troubleshooting.md for missing API keys, telemetry warnings, NLTK/proxy warnings,
pkg_resourcesfailures, stale result/debug state, and core API misuse. - Run the safe helper from the
la-vagueskill root before spending browser or model-provider time:
python sub-skills/core-web-agent/scripts/lavague_minimal_agent.py --dry-run
The helper validates imports and prints a runnable template by default. It does not start a browser, contact a model provider, browse the web, or write logs unless --run-live is explicitly supplied.
Minimal live shape
from lavague.core import WorldModel, ActionEngine
from lavague.core.agents import WebAgent
from lavague.drivers.selenium import SeleniumDriver
# Requires browser support and the default model-provider credentials.
driver = SeleniumDriver(headless=True)
action_engine = ActionEngine(driver)
world_model = WorldModel()
agent = WebAgent(world_model, action_engine, n_steps=5)
agent.get("https://example.com")
result = agent.run("Summarize the visible page")
print(result.success, result.output)
Before running a live objective, confirm the matching browser route and provider-context route. The default LaVague stack uses OpenAI-backed models and embeddings, so OPENAI_API_KEY is normally required unless you pass a custom context/model stack.
Core decisions
- Use
WorldModel.from_context(context)andActionEngine.from_context(context, driver)when a provider context owns the LLM, multimodal LLM, and embedding choices. - Pass
llm=,embedding=,mm_llm=,retriever=, or custom engines only when mixing components deliberately. - Use
agent.run_step(objective)for manual loops or debugging one instruction at a time. - Use
agent.run(objective, display=True)only when notebook/display output is useful and safe. - Use
agent.run(..., log_to_db=True)only when a local SQLite log file is acceptable. - Use
agent.demo(...)only after routing to the Gradio/server sub-skill because it importslavague-gradiolazily.
Validation checklist
- Python version is supported by the installed package set.
lavague.core, the selected driver package, and selected context package import.- Required model-provider environment variables are present but not printed.
- Browser binaries/profile/session requirements are satisfied.
LAVAGUE_TELEMETRY=NONEis set if telemetry must be disabled.- The objective contains no personal data that should not be sent to model providers or telemetry.
- Live work is explicitly permitted; otherwise stay in dry-run/template/probe mode.
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).