lavague


Namelavague JSON
Version 1.0.23.post2 PyPI version JSON
download
home_pagehttps://mithrilsecurity.io
Summaryautomation code generation from text instructions
upload_time2024-05-15 22:21:47
maintainerNone
docs_urlNone
authorlavague-ai
requires_python<4.0.0,>=3.10.0
licenseApache-2.0
keywords lam action automation llm nlp rag selenium playwright
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <a href="https://github.com/lavague-ai/LaVague/stargazers"><img src="https://img.shields.io/github/stars/lavague-ai/LaVague.svg?style=for-the-badge" alt="Stargazers"></a>
  <a href="https://github.com/lavague-ai/LaVague/issues"><img src="https://img.shields.io/github/issues/lavague-ai/LaVague.svg?style=for-the-badge" alt="Issues"></a>
  <a href="https://github.com/lavague-ai/LaVague/network/members"><img src="https://img.shields.io/github/forks/lavague-ai/LaVague.svg?style=for-the-badge" alt="Forks"></a>
  <a href="https://github.com/lavague-ai/LaVague/graphs/contributors"><img src="https://img.shields.io/github/contributors/lavague-ai/LaVague.svg?style=for-the-badge" alt="Contributors"></a>
</p>
</br>

<div align="center">
  <img src="docs/assets/logo.png" width=140px: alt="LaVague Logo">
  <h1>Welcome to LaVague</h1>

<h4 align="center">
 <a href="https://discord.gg/SDxn9KpqX9" target="_blank">
    <img src="https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white" height='35px' alt="Join our Discord server!">
  </a>
  <a href="https://docs.lavague.ai/en/latest/"><img src="https://img.shields.io/badge/πŸ“„-docs-000000?style=for-the-badge&colorA=09c&colorB=555" height='35px' alt="Docs"></a>
</h4>
  <p>A Large Action Model framework for developing AI Web Agents
</p>
<h1></h1>
</div>

## πŸ„β€β™€οΈ  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** & execute 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":

<p align="center">
  <img src="./docs/assets/demo_agent_hf.gif" alt="Demo for agent">
</p>

### Hands-on 

To do this, the steps are simple:

1. Download LaVague with:

```bash
pip install lavague
```
2. Use our framework to build a Web Agent and implement the objective:

```python
from lavague.core import WebAgent, WorldModel, ActionEngine
from lavague.drivers.selenium import SeleniumDriver

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

For more information on this example and how to use LaVague, see our [quick-tour](https://docs.lavague.ai/en/latest/docs/get-started/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](https://colab.research.google.com/github/lavague-ai/lavague/blob/main/docs/docs/get-started/quick-tour-notebook/quick-tour.ipynb)

## πŸ™‹ 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 on our [`backlog`](https://github.com/orgs/lavague-ai/projects/1/views/3): we recommend you check out issues with the [`help-wanted`](https://github.com/lavague-ai/LaVague/labels/help%20wanted) labels & [`good first issue`](https://github.com/lavague-ai/LaVague/labels/good%20first%20issue) 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`](https://github.com/lavague-ai/LaVague/labels/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`](./docs/docs/contributing/contributing.md) for a more detailed guide.

If you want to ask questions, contribute, or have proposals, please come on our [`Discord`](https://discord.gg/SDxn9KpqX9) to chat!

## πŸ—ΊοΈ Roadmap

TO keep up to date with our project backlog [here](https://github.com/orgs/lavague-ai/projects/1/views/2).

## 🚨 Security warning

Note, this project executes LLM-generated code using `exec`. This is not considered a safe practice. We therefore recommend taking extra care when using LaVague and running LaVague in a sandboxed environment!

## πŸ“ˆ 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](https://huggingface.co/BigAction).

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)
- Randomly generated anonymous user ID
- Whether you are using a CLI command or our library directly
- 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 can set the TELEMETRY_VAR environment variable to NONE.

If you are running LaVague locally in a Linux environment, you can persistently set this variable for your environment with the following steps:

1) Add TELEMETRY_VAR=NONE to your ~/.bashrc, ~/.bash_profile, or ~/.profile file (which file you have depends on your shell and its configuration)
2) Use `source ~/.bashrc (or .bash_profile or .profile) to apply your modifications without having to log out and back in

In a notebook cell, you can use:

```bash
import os
os.environ['TELEMETRY_VAR'] = "NONE"
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://mithrilsecurity.io",
    "name": "lavague",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0.0,>=3.10.0",
    "maintainer_email": null,
    "keywords": "LAM, action, automation, LLM, NLP, RAG, selenium, playwright",
    "author": "lavague-ai",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/1c/83/73ff13b4ce95046428a4805d6b83c3e29e708a167e8d3842a9ab35e4c97c/lavague-1.0.23.post2.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <a href=\"https://github.com/lavague-ai/LaVague/stargazers\"><img src=\"https://img.shields.io/github/stars/lavague-ai/LaVague.svg?style=for-the-badge\" alt=\"Stargazers\"></a>\n  <a href=\"https://github.com/lavague-ai/LaVague/issues\"><img src=\"https://img.shields.io/github/issues/lavague-ai/LaVague.svg?style=for-the-badge\" alt=\"Issues\"></a>\n  <a href=\"https://github.com/lavague-ai/LaVague/network/members\"><img src=\"https://img.shields.io/github/forks/lavague-ai/LaVague.svg?style=for-the-badge\" alt=\"Forks\"></a>\n  <a href=\"https://github.com/lavague-ai/LaVague/graphs/contributors\"><img src=\"https://img.shields.io/github/contributors/lavague-ai/LaVague.svg?style=for-the-badge\" alt=\"Contributors\"></a>\n</p>\n</br>\n\n<div align=\"center\">\n  <img src=\"docs/assets/logo.png\" width=140px: alt=\"LaVague Logo\">\n  <h1>Welcome to LaVague</h1>\n\n<h4 align=\"center\">\n <a href=\"https://discord.gg/SDxn9KpqX9\" target=\"_blank\">\n    <img src=\"https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white\" height='35px' alt=\"Join our Discord server!\">\n  </a>\n  <a href=\"https://docs.lavague.ai/en/latest/\"><img src=\"https://img.shields.io/badge/\ud83d\udcc4-docs-000000?style=for-the-badge&colorA=09c&colorB=555\" height='35px' alt=\"Docs\"></a>\n</h4>\n  <p>A Large Action Model framework for developing AI Web Agents\n</p>\n<h1></h1>\n</div>\n\n## \ud83c\udfc4\u200d\u2640\ufe0f  What is LaVague?\n\nLaVague is an **open-source Large Action Model framework** to develop AI Web Agents.\n\nOur 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:\n\n- A **World Model** that takes an objective and the current state (aka the current web page) and turns that into instructions\n- An **Action Engine** which \u201ccompiles\u201d these instructions into action code, e.g. **Selenium** or **Playwright** & execute them\n\n## \ud83d\ude80 Getting Started\n\n### Demo\n\nHere is an example of how LaVague can take multiple steps to achieve the objective of \"Go on the quicktour of PEFT\":\n\n<p align=\"center\">\n  <img src=\"./docs/assets/demo_agent_hf.gif\" alt=\"Demo for agent\">\n</p>\n\n### Hands-on \n\nTo do this, the steps are simple:\n\n1. Download LaVague with:\n\n```bash\npip install lavague\n```\n2. Use our framework to build a Web Agent and implement the objective:\n\n```python\nfrom lavague.core import WebAgent, WorldModel, ActionEngine\nfrom lavague.drivers.selenium import SeleniumDriver\n\nselenium_driver = SeleniumDriver()\nworld_model = WorldModel.from_hub(\"hf_example\")\naction_engine = ActionEngine(selenium_driver)\nagent = WebAgent(action_engine, world_model)\nagent.get(\"https://huggingface.co/docs\")\nagent.run(\"Go on the quicktour of PEFT\")\n```\n\nFor more information on this example and how to use LaVague, see our [quick-tour](https://docs.lavague.ai/en/latest/docs/get-started/quick-tour/).\n\n> 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.\n\nFor an end-to-end example of LaVague in a Google Colab, see our [quick-tour notebook](https://colab.research.google.com/github/lavague-ai/lavague/blob/main/docs/docs/get-started/quick-tour-notebook/quick-tour.ipynb)\n\n## \ud83d\ude4b Contributing\n\nWe would love your help and support on our quest to build a robust and reliable Large Action Model for web automation.\n\nTo avoid having multiple people working on the same things & being unable to merge your work, we have outlined the following contribution process:\n\n1) \ud83d\udce2 We outline tasks on our [`backlog`](https://github.com/orgs/lavague-ai/projects/1/views/3): we recommend you check out issues with the [`help-wanted`](https://github.com/lavague-ai/LaVague/labels/help%20wanted) labels & [`good first issue`](https://github.com/lavague-ai/LaVague/labels/good%20first%20issue) labels\n2) \ud83d\ude4b\u200d\u2640\ufe0f If you are interested in working on one of these tasks, comment on the issue! \n3) \ud83e\udd1d We will discuss with you and assign you the task with a [`community assigned`](https://github.com/lavague-ai/LaVague/labels/community-assigned) label \n4) \ud83d\udcac We will then be available to discuss this task with you\n5) \u2b06\ufe0f You should submit your work as a PR\n6) \u2705 We will review & merge your code or request changes/give feedback\n\nPlease check out our [`contributing guide`](./docs/docs/contributing/contributing.md) for a more detailed guide.\n\nIf you want to ask questions, contribute, or have proposals, please come on our [`Discord`](https://discord.gg/SDxn9KpqX9) to chat!\n\n## \ud83d\uddfa\ufe0f Roadmap\n\nTO keep up to date with our project backlog [here](https://github.com/orgs/lavague-ai/projects/1/views/2).\n\n## \ud83d\udea8 Security warning\n\nNote, this project executes LLM-generated code using `exec`. This is not considered a safe practice. We therefore recommend taking extra care when using LaVague and running LaVague in a sandboxed environment!\n\n## \ud83d\udcc8 Data collection\n\nWe 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](https://huggingface.co/BigAction).\n\nThis is why LaVague collects the following user data telemetry by default:\n\n- Version of LaVague installed\n- Code generated for each web action step\n- LLM used (i.e GPT4)\n- Randomly generated anonymous user ID\n- Whether you are using a CLI command or our library directly\n- The URL you performed an action on\n- Whether the action failed or succeeded\n- Error message, where relevant\n- The source nodes (chunks of HTML code retrieved from the web page to perform this action)\n\n### \ud83d\udeab Turn off all telemetry\n\nIf you want to turn off all telemetry, you can set the TELEMETRY_VAR environment variable to NONE.\n\nIf you are running LaVague locally in a Linux environment, you can persistently set this variable for your environment with the following steps:\n\n1) Add TELEMETRY_VAR=NONE to your ~/.bashrc, ~/.bash_profile, or ~/.profile file (which file you have depends on your shell and its configuration)\n2) Use `source ~/.bashrc (or .bash_profile or .profile) to apply your modifications without having to log out and back in\n\nIn a notebook cell, you can use:\n\n```bash\nimport os\nos.environ['TELEMETRY_VAR'] = \"NONE\"\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "automation code generation from text instructions",
    "version": "1.0.23.post2",
    "project_urls": {
        "Documentation": "https://docs.lavague.ai/en/latest/",
        "Homepage": "https://mithrilsecurity.io",
        "Repository": "https://github.com/lavague-ai/LaVague/"
    },
    "split_keywords": [
        "lam",
        " action",
        " automation",
        " llm",
        " nlp",
        " rag",
        " selenium",
        " playwright"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "215ddd1b59ea0f04f48cb57b5078a144170b653b5f361321fbe6fecb600c1b9a",
                "md5": "c107f65d79c64e8db7763224139338ba",
                "sha256": "d15c9d0379ddaa890583e77eec13dfb6c7d52ddd8d37c7cf77b345115c49d20f"
            },
            "downloads": -1,
            "filename": "lavague-1.0.23.post2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c107f65d79c64e8db7763224139338ba",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0.0,>=3.10.0",
            "size": 8199,
            "upload_time": "2024-05-15T22:21:46",
            "upload_time_iso_8601": "2024-05-15T22:21:46.700628Z",
            "url": "https://files.pythonhosted.org/packages/21/5d/dd1b59ea0f04f48cb57b5078a144170b653b5f361321fbe6fecb600c1b9a/lavague-1.0.23.post2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1c8373ff13b4ce95046428a4805d6b83c3e29e708a167e8d3842a9ab35e4c97c",
                "md5": "29bb3e60936ffa0f126f19133cb38426",
                "sha256": "76e7f127186631938b8670071fe114e8a03926682d1dba881565c092641c5952"
            },
            "downloads": -1,
            "filename": "lavague-1.0.23.post2.tar.gz",
            "has_sig": false,
            "md5_digest": "29bb3e60936ffa0f126f19133cb38426",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0.0,>=3.10.0",
            "size": 8089,
            "upload_time": "2024-05-15T22:21:47",
            "upload_time_iso_8601": "2024-05-15T22:21:47.991606Z",
            "url": "https://files.pythonhosted.org/packages/1c/83/73ff13b4ce95046428a4805d6b83c3e29e708a167e8d3842a9ab35e4c97c/lavague-1.0.23.post2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-15 22:21:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lavague-ai",
    "github_project": "LaVague",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "lavague"
}
        
Elapsed time: 0.36777s