Most “AI browser” hype sells a polished product. LaVague is the opposite: a developer framework you deploy yourself. Want a natural language browser that turns objectives into real Selenium (or Playwright) clicks? Pin LaVague 1.1.19 and treat it like any other agent runtime – not magic.
Install-and-run only. Commands, constraints, errors that actually stop people. No feature tour.
System requirements for LaVague 1.1.19
From the PyPI package metadata for release 1.1.19 (5 August 2024 – re-check the project page before production locks):
- Python: >=3.10.0, <4.0.0. In practice stick to 3.10 or 3.11. Poetry pins in the wild and community threads still hit friction or pydantic-style breakage on 3.12.
- OS: Linux, macOS, Windows. WSL1 fights GUI/browser bits; use WSL2 if you’re on Windows Subsystem for Linux.
- Browser stack: Chrome/Chromium for the default Selenium driver. Non-headless mode needs a real display.
- API access: Defaults call OpenAI (
gpt-4o+text-embedding-3-small). You needOPENAI_API_KEY. Other contexts swap the vendor but still need their own keys. - Resources: No official CPU/RAM floor. Plan for a full browser process plus Python and concurrent LLM calls. Disk is mostly browser cache, not the wheel.
- Network: Outbound HTTPS for model APIs and target sites.
Concrete starting point: Python 3.11 venv, headless Chrome on the host, OpenAI key with a hard spend cap.
Official download and source
Install from PyPI – not a random GitHub zip:
pip install lavague==1.1.19
Repo and docs (verify before cloning):
- GitHub: https://github.com/lavague-ai/LaVague
- Docs: https://docs.lavague.ai/en/latest/
- Install guide: docs installation page
That meta-package pulls lavague-core, lavague-drivers-selenium, lavague-contexts-openai, and lavague-gradio at the versions locked in 1.1.19’s pyproject. Gemini context, Playwright driver, and the Chrome-extension server package are separate installs.
Step-by-step installation
Always isolate. Clean shell:
python3.11 -m venv lavague-env
source lavague-env/bin/activate # Windows: lavague-envScriptsactivate
python -m pip install --upgrade pip
pip install lavague==1.1.19
Default key for the session (Linux/macOS):
export OPENAI_API_KEY="sk-..."
Windows cmd: set OPENAI_API_KEY=sk-.... PowerShell: $env:OPENAI_API_KEY="sk-...".
Telemetry is on by default (version, generated instructions, URLs, success/fail, anonymous ID). Kill it before first run:
export LAVAGUE_TELEMETRY="NONE"
From source (dev only):
git clone https://github.com/lavague-ai/LaVague.git
cd LaVague
pip install -e .
Playwright driver (not default):
pip install lavague.drivers.playwright
Other context example:
pip install lavague.contexts.gemini
Pro tip: Pin
lavague==1.1.19in requirements or lockfiles. PyPI marks the project Alpha; floating “latest” installs have burned people when APIs or LlamaIndex pins moved.
First-time configuration (minimum viable agent)
Create run_agent.py:
import os
from lavague.drivers.selenium import SeleniumDriver
from lavague.core import WorldModel, ActionEngine
from lavague.core.agents import WebAgent
assert os.environ.get("OPENAI_API_KEY"), "Set OPENAI_API_KEY"
driver = SeleniumDriver(headless=True) # True for servers/Colab/CI
world_model = WorldModel()
action_engine = ActionEngine(driver)
agent = WebAgent(world_model, action_engine, n_steps=8) # cap steps/cost
agent.get("https://example.com")
result = agent.run("Summarize the main heading on the page", display=False)
print(result.output if hasattr(result, "output") else result)
driver.driver.quit() # clean browser process
headless=True outside a full desktop. Colab, many VMs, and WSL1 blow up with SessionNotCreatedException / DevToolsActivePort when you leave a visible browser on. Got a real display and want to watch? Flip to headless=False.
Fresh automated profiles love CAPTCHAs and login walls. Docs walk through attaching to Chrome started with --remote-debugging-port=9222 or pointing user_data_dir at a real profile (paths differ by OS).
Cost knobs on day one – FAQs put defaults near n_steps ≈ 10 and ActionEngine n_attempts ≈ 5. Drop both while testing. A stuck loop will happily keep calling multi-modal models.
Verify the install works
pip show lavague→ Version: 1.1.19python -c "import lavague; print('ok')"- Run the script above. You want a finished run object / printed text – not ModuleNotFoundError or an instant WebDriver crash.
- Optional Gradio surface:
agent.demo("your objective")after you build the agent (gradio ships in the bundle).
Browser up, World Model printing thoughts/instructions in the terminal – stack is wired.
Common install and runtime errors (and fixes)
The catch is almost always env or browser, not the agent class itself:
| Symptom | Likely cause | Fix |
|---|---|---|
ModuleNotFoundError: No module named 'lavague' |
Wrong env / global vs venv mismatch | Recreate venv, reinstall, run with that interpreter |
SessionNotCreatedException / DevToolsActivePort / Chrome crashed |
Non-headless on a headless host, or broken Chrome | SeleniumDriver(headless=True); install Chromium; avoid WSL1 |
| Agent stalls on CAPTCHA / login wall | Fresh automated profile | Debug-port attach or user_data_dir; or pause, click manually, continue |
Weak/empty actions / Unknown action / generation failed |
Model quality or truncated output | Stay on strong multi-modal defaults; raise LLM max_tokens; read the debugging guide |
| Dependency / pydantic-style errors on 3.12 | Stack age vs new Python | Use 3.10-3.11; pip install --upgrade lavague and related lavague-* packages |
Official first move on almost any bug: pip install --upgrade lavague (plus extras you added). Live list lives on the troubleshooting page.
Honest pause: 1.1.19 shipped August 2024. The repo is still there and issues still trickle in, but the pin is a known snapshot. Re-check PyPI before you automate anything money-adjacent.
Upgrade, migrate, uninstall
Upgrade:
pip install --upgrade lavague
pip show lavague
No polished 1.x migration guide ships with the wheel. Re-test drivers and any custom Context/LLM wiring after bumps – LlamaIndex pins move.
From older source installs: drop the editable install, wipe the venv or pip uninstall lavague lavague-core lavague-drivers-selenium lavague-contexts-openai lavague-gradio, then clean-install the pinned wheel.
Uninstall / cleanup:
pip uninstall -y lavague lavague-core lavague-drivers-selenium lavague-contexts-openai lavague-gradio
# plus extras: lavague.contexts.gemini, lavague.drivers.playwright, lavague-server, ...
deactivate
rm -rf lavague-env # if you want the venv gone
# delete log DBs / screenshot folders your scripts created
Selenium browser caches sit outside the venv. Clear them if disk is tight.
FAQ
What exact version should I install right now?
pip install lavague==1.1.19. That was latest on PyPI at research time (5 Aug 2024). Run pip index versions lavague before you lock production.
Do I need Docker?
No. Core library expects a normal Python venv on a host that can launch Chrome. Roll your own image if you must: Chromium + fonts, force headless, API key as a secret, enough shared memory so Chrome doesn’t die. That packaging work is yours – not a one-liner from the project.
Why did my first run cost more than expected, and how do I cap it?
Every step can hit multi-modal + text models, then retries. A messy DOM multiplies tokens fast.
People blame “the framework” when the real leak is unbounded steps on a hard page. Lower WebAgent(..., n_steps=...) and ActionEngine n_attempts while you learn the site (defaults sit near 10 and 5). Put hard caps on the OpenAI (or other) dashboard. LAVAGUE_TELEMETRY=NONE is privacy, not billing.
Local open multi-modal models via LlamaIndex? Allowed. Maintainers still warn performance is often weak; community threads show timeouts. Free weights ≠ a working World Model yet.
Next: venv → lavague==1.1.19 → export key + LAVAGUE_TELEMETRY=NONE → headless script on example.com → one internal URL you actually care about.