<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** & 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":
<p align="center">
<img src="./docs/assets/demo_agent_hf.gif" alt="Demo for agent">
</p>
### Hands-on
You can do this with the following steps:
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 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](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)
## Key Features
- β
[Built-in Contexts](https://docs.lavague.ai/en/latest/docs/get-started/customization/) (aka. configurations)
- β
[Customizable configuration](https://docs.lavague.ai/en/latest/docs/get-started/customization/)
- β
[A test runner](https://docs.lavague.ai/en/latest/docs/learn/testing/) for testing and benchmarking the performance of LaVague
- β
A [Token Counter](https://docs.lavague.ai/en/latest/docs/get-started/token-usage/) for estimating token usage and costs
- β
[Logging tools](https://docs.lavague.ai/en/latest/docs/get-started/customization/)
- β
An optional, interactive [Gradio interface](https://docs.lavague.ai/en/latest/docs/get-started/gradio/)
- β
[Debugging tools](https://docs.lavague.ai/en/latest/docs/get-started/customization/)
## π 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`](https://github.com/lavague-ai/LaVague/issues): we recommend checking out issues with the [`help-wanted`](https:/github.com/lavague-ai/LaVague/labels/help%20wanted) & [`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`](https://docs.lavague.ai/en/latest/docs/contributing/contributing/) for more details.
## πΊοΈ Roadmap
To keep up to date with our project backlog [here](https://github.com/orgs/lavague-ai/projects/1/views/2).
## π° 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](https://docs.lavague.ai/en/latest/docs/get-started/token-usage/) 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](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)
- 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](https://docs.lavague.ai/en/latest/docs/get-started/FAQs/#how-can-i-set-environment-variables).
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/7f/f8/265532e5f81cd04d89a32afa8650eb8a2e7a7cc17ace8e7497929ad4776b/lavague-1.1.19.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** & executes 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\nYou can do this with the following steps:\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 WorldModel, ActionEngine\nfrom lavague.core.agents import WebAgent\nfrom lavague.drivers.selenium import SeleniumDriver\n\nselenium_driver = SeleniumDriver(headless=False)\nworld_model = WorldModel()\naction_engine = ActionEngine(selenium_driver)\nagent = WebAgent(world_model, action_engine)\nagent.get(\"https://huggingface.co/docs\")\nagent.run(\"Go on the quicktour of PEFT\")\n\n# Launch Gradio Agent Demo\nagent.demo(\"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## Key Features\n\n- \u2705 [Built-in Contexts](https://docs.lavague.ai/en/latest/docs/get-started/customization/) (aka. configurations)\n- \u2705 [Customizable configuration](https://docs.lavague.ai/en/latest/docs/get-started/customization/)\n- \u2705 [A test runner](https://docs.lavague.ai/en/latest/docs/learn/testing/) for testing and benchmarking the performance of LaVague\n- \u2705 A [Token Counter](https://docs.lavague.ai/en/latest/docs/get-started/token-usage/) for estimating token usage and costs\n- \u2705 [Logging tools](https://docs.lavague.ai/en/latest/docs/get-started/customization/)\n- \u2705 An optional, interactive [Gradio interface](https://docs.lavague.ai/en/latest/docs/get-started/gradio/)\n- \u2705 [Debugging tools](https://docs.lavague.ai/en/latest/docs/get-started/customization/)\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 using [`GitHub issues`](https://github.com/lavague-ai/LaVague/issues): we recommend checking out issues with the [`help-wanted`](https:/github.com/lavague-ai/LaVague/labels/help%20wanted) & [`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`](https://docs.lavague.ai/en/latest/docs/contributing/contributing/) for more details.\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\udcb0 How much does it cost to run an agent?\n\nLaVague uses LLMs, (by default OpenAI's `gpt4-o` but this is completely customizable), under the hood.\n\nThe cost of these LLM calls depends on: \n- the models chosen to run a given agent\n- the complexity of the objective\n- the website you're interacting with. \n\nPlease see our [dedicated documentation on token counting and cost estimations](https://docs.lavague.ai/en/latest/docs/get-started/token-usage/) to learn how you can track all tokens and estimate costs for running your agents.\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- Multi modal 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 instruction used/generated\n- The objective used (if you are using the agent)\n- The chain of thoughts (if you are using the agent)\n- The interaction zone on the page (bounding box)\n- The viewport size of your browser\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 should set the `LAVAGUE_TELEMETRY` environment variable to `\"NONE\"`.\n\nFor guidance on how to set your `LAVAGUE_TELEMTRY` environment variable, see our guide [here](https://docs.lavague.ai/en/latest/docs/get-started/FAQs/#how-can-i-set-environment-variables).\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "automation code generation from text instructions",
"version": "1.1.19",
"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": "149df1281ab0fc59b608a35ae26f9674c85cc448f05ba5e87ca3165c3e9db550",
"md5": "e7d08cf90608d5b096be53bccba4cd13",
"sha256": "828ad067709c7889de4e294d996549e9aef63d0f9ec804468fc3c64266f78393"
},
"downloads": -1,
"filename": "lavague-1.1.19-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e7d08cf90608d5b096be53bccba4cd13",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.10.0",
"size": 8391,
"upload_time": "2024-08-05T06:38:03",
"upload_time_iso_8601": "2024-08-05T06:38:03.552462Z",
"url": "https://files.pythonhosted.org/packages/14/9d/f1281ab0fc59b608a35ae26f9674c85cc448f05ba5e87ca3165c3e9db550/lavague-1.1.19-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7ff8265532e5f81cd04d89a32afa8650eb8a2e7a7cc17ace8e7497929ad4776b",
"md5": "5368e98a0f20b5c6fd77a16c66e28d39",
"sha256": "18983a794cd3fd9db496bed701f2257f40ac673f70fb0ebabbe2d889c03b494a"
},
"downloads": -1,
"filename": "lavague-1.1.19.tar.gz",
"has_sig": false,
"md5_digest": "5368e98a0f20b5c6fd77a16c66e28d39",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.10.0",
"size": 8443,
"upload_time": "2024-08-05T06:38:05",
"upload_time_iso_8601": "2024-08-05T06:38:05.323248Z",
"url": "https://files.pythonhosted.org/packages/7f/f8/265532e5f81cd04d89a32afa8650eb8a2e7a7cc17ace8e7497929ad4776b/lavague-1.1.19.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-05 06:38:05",
"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"
}