Skip to main content

Stargazers Issues Forks Contributors


LaVague Logo

Welcome to LaVague

Join our Discord server! Docs

A Large Action Model framework for developing AI Web Agents

🏄‍♀️ What is LaVague?

LaVague is an open-source Large Action Model framework to develop AI Web Agents.

Our web agents take an objective, such as "Print installation steps for Hugging Face's Diffusers library" and performs the required actions to achieve this goal by leveraging our two core components:

  • A World Model that takes an objective and the current state (aka the current web page) and turns that into instructions
  • An Action Engine which “compiles” these instructions into action code, e.g. Selenium or Playwright & executes them

🚀 Getting Started

Demo

Here is an example of how LaVague can take multiple steps to achieve the objective of "Go on the quicktour of PEFT":

Demo for agent

Hands-on

You can do this with the following steps:

  1. Download LaVague with:
pip install lavague
  1. Use our framework to build a Web Agent and implement the objective:
from lavague.core import  WorldModel, ActionEngine
from lavague.core.agents import WebAgent
from lavague.drivers.selenium import SeleniumDriver

selenium_driver = SeleniumDriver(headless=False)
world_model = WorldModel()
action_engine = ActionEngine(selenium_driver)
agent = WebAgent(world_model, action_engine)
agent.get("https://huggingface.co/docs")
agent.run("Go on the quicktour of PEFT")

# Launch Gradio Agent Demo
agent.demo("Go on the quicktour of PEFT")

For more information on this example and how to use LaVague, see our quick-tour.

Note, these examples use our default OpenAI API configuration and you will need to set the OPENAI_API_KEY variable in your local environment with a valid API key for these to work.

For an end-to-end example of LaVague in a Google Colab, see our quick-tour notebook

Key Features

🙋 Contributing

We would love your help and support on our quest to build a robust and reliable Large Action Model for web automation.

To avoid having multiple people working on the same things & being unable to merge your work, we have outlined the following contribution process:

  1. 📢 We outline tasks using GitHub issues: we recommend checking out issues with the help-wanted & good first issue labels
  2. 🙋‍♀️ If you are interested in working on one of these tasks, comment on the issue!
  3. 🤝 We will discuss with you and assign you the task with a community assigned label
  4. 💬 We will then be available to discuss this task with you
  5. ⬆️ You should submit your work as a PR
  6. ✅ We will review & merge your code or request changes/give feedback

Please check out our contributing guide for more details.

🗺️ Roadmap

To keep up to date with our project backlog here.

💰 How much does it cost to run an agent?

LaVague uses LLMs, (by default OpenAI's gpt4-o but this is completely customizable), under the hood.

The cost of these LLM calls depends on:

  • the models chosen to run a given agent
  • the complexity of the objective
  • the website you're interacting with.

Please see our dedicated documentation on token counting and cost estimations to learn how you can track all tokens and estimate costs for running your agents.

📈 Data collection

We want to build a dataset that can be used by the AI community to build better Large Action Models for better Web Agents. You can see our work so far on building community datasets on our BigAction HuggingFace page.

This is why LaVague collects the following user data telemetry by default:

  • Version of LaVague installed
  • Code generated for each web action step
  • LLM used (i.e GPT4)
  • Multi modal LLM used (i.e GPT4)
  • Randomly generated anonymous user ID
  • Whether you are using a CLI command or our library directly
  • The instruction used/generated
  • The objective used (if you are using the agent)
  • The chain of thoughts (if you are using the agent)
  • The interaction zone on the page (bounding box)
  • The viewport size of your browser
  • The URL you performed an action on
  • Whether the action failed or succeeded
  • Error message, where relevant
  • The source nodes (chunks of HTML code retrieved from the web page to perform this action)

🚫 Turn off all telemetry

If you want to turn off all telemetry, you should set the LAVAGUE_TELEMETRY environment variable to "NONE".

For guidance on how to set your LAVAGUE_TELEMTRY environment variable, see our guide here.

Metadata

Release files for lavague 1.1.19

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lavague 1.1.19
File Size Uploaded
lavague-1.1.19.tar.gz 8.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lavague 1.1.19
File Interpreter ABI Platform
lavague-1.1.19-py3-none-any.whl Python 3 none any Details

Total release size: 16.8 kB

Release files / lavague-1.1.19.tar.gz

Download URL lavague-1.1.19.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
18983a794cd3fd9db496bed701f2257f40ac673f70fb0ebabbe2d889c03b494a
BLAKE2b-256 checksum
How to use checksums
7ff8265532e5f81cd04d89a32afa8650eb8a2e7a7cc17ace8e7497929ad4776b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.14 Darwin/22.2.0

Release files / lavague-1.1.19-py3-none-any.whl

Download URL lavague-1.1.19-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
828ad067709c7889de4e294d996549e9aef63d0f9ec804468fc3c64266f78393
BLAKE2b-256 checksum
How to use checksums
149df1281ab0fc59b608a35ae26f9674c85cc448f05ba5e87ca3165c3e9db550
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.14 Darwin/22.2.0

Release history Release notifications | RSS feed

This release

1.1.19 This release

2 release files

1.1.15

2 release files

1.1.14

2 release files

1.1.13

2 release files

1.1.12

2 release files

1.1.11

2 release files

1.1.10

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.25

1 release file

1.0.23

2 release files

1.0.22

2 release files

1.0.21

2 release files

1.0.20

2 release files

1.0.18

2 release files

1.0.17

2 release files

1.0.16

2 release files

1.0.15

2 release files

1.0.14

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page