pywebagent


Namepywebagent JSON
Version 0.1 PyPI version JSON
download
home_page
SummaryAn experimental AI web agent
upload_time2023-12-01 10:44:48
maintainer
docs_urlNone
author
requires_python>=3.10
licenseMIT License Copyright (c) 2023 Maxim Kogan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords web agent web automation web testing web action agent
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pywebagent - an experimental AI web agent
![pywebagent](logo.png "Logo")

[![Discord Follow](https://dcbadge.vercel.app/api/server/5eJkjMMa?style=for-the-badge)](https://discord.gg/5eJkjMMa)

[![GitHub Repo stars](https://img.shields.io/github/stars/pywebagent/pywebagent?style=social)](https://github.com/assafelovic/gpt-researcher)
[![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/kogan_maxim)](https://twitter.com/kogan_maxim)
[![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/OriKabeli)](https://twitter.com/OriKabeli)


## Description

`pywebagent` is an <b>experimental</b> Python package designed to control websites by utilizing the capabilities of OpenAI's GPT-4 Vision.  
It basically converts website capabilities to python functions!
With `pywebagent`, you can automate complex tasks on websites, like filling forms, buying products, and more.  
It is especially useful for performing tasks that require multiple steps, such as buying a product online, booking a flight, etc.

## Highlights

👁️ Web navigation using OpenAI's GPT-4 Vision technology  
📝 Fill in forms  
💳 Buy products  
📁 Upload Files

## Installation

Ensure you have Python version 3.6 or later installed. Then run this command in the terminal:

```bash
pip install pywebagent
```

## Usage

### Example 1: Order a plush bunny on Amazon
```python
from pywebagent import act

# sometimes you'll need to help the agent bypass the captcha, sometimes it will succeed by itself
act(
    "https://amazon.com", 
    "Order a plush bunny", 
    email="<your amazon email>", 
    password="<your amazon password>"
)
```


### Example 2: Order your photo prints from Mixtiles
Here is an example of how to use `pywebagent` to print some images on [mixtiles.com:](https://mixtiles.com/)

```python
act(
    "https://mixtiles.com/",
    "Order these as Mixtiles",
    name="John Doe",
    email="johndoe208909@gmail.com",
    photos=[
        "omnnitool/demo/mixtiles/1.jpg",
        "omnnitool/demo/mixtiles/2.jpg",
        "omnnitool/demo/mixtiles/3.jpg"
    ],
    payment_info={
        "card_number": "4242424242424242",
        "expiry_date": "12/22",
        "cvc": "123"
    },
    address="123 Main St, San Francisco, CA 94105"
)
```

<b>Note: OPENAI_API_KEY should be set as an environment variable.</b>

## Upcoming Features
* Add return values from `act` (e.g, order number of purchase, ...)
* Add support for more types of interaction (including scrolling, swiping, ..)
* Add caching to speed everything up
* Support open source vision models
* Support more complicated actions

## How It Works
The concept is extremely simple. Detect all elements that have an event handler (which means they can be interacted with), highlight them, take a screenshot, and ask GPT 4 Vision what to do. The results are surprisingly good.

## Contributing
Contributions are more than welcome! In fact, we're looking for people who want to develop this further.  
If you have any suggestions, features requests or want to report bugs, kindly open an issue first to discuss what you would like to change. For changes, please open a pull request.

## Community
Feel free to join our discord at https://discord.gg/5eJkjMMa.

## License

`pywebagent` is licensed under the MIT License. See `LICENSE` for more information.

## Disclaimer

`pywebagent` is an experimental project, and is not officially affiliated with OpenAI.

## Contact 

If you have specific questions about using the `pywebagent`, feel free to email us at maximkgn@gmail.com or ori.kabeli@gmail.com


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pywebagent",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "Web agent,Web automation,Web testing,Web action agent",
    "author": "",
    "author_email": "Ori Kabeli <ori.kabeli@gmail.com>, Maxim Kogan <maximkgn@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/7e/42/f9acac5062c91d8c0bd4d78eb11536f970306f680bb5c24960421b097357/pywebagent-0.1.tar.gz",
    "platform": null,
    "description": "# pywebagent - an experimental AI web agent\n![pywebagent](logo.png \"Logo\")\n\n[![Discord Follow](https://dcbadge.vercel.app/api/server/5eJkjMMa?style=for-the-badge)](https://discord.gg/5eJkjMMa)\n\n[![GitHub Repo stars](https://img.shields.io/github/stars/pywebagent/pywebagent?style=social)](https://github.com/assafelovic/gpt-researcher)\n[![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/kogan_maxim)](https://twitter.com/kogan_maxim)\n[![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/OriKabeli)](https://twitter.com/OriKabeli)\n\n\n## Description\n\n`pywebagent` is an <b>experimental</b> Python package designed to control websites by utilizing the capabilities of OpenAI's GPT-4 Vision.  \nIt basically converts website capabilities to python functions!\nWith `pywebagent`, you can automate complex tasks on websites, like filling forms, buying products, and more.  \nIt is especially useful for performing tasks that require multiple steps, such as buying a product online, booking a flight, etc.\n\n## Highlights\n\n\ud83d\udc41\ufe0f Web navigation using OpenAI's GPT-4 Vision technology  \n\ud83d\udcdd Fill in forms  \n\ud83d\udcb3 Buy products  \n\ud83d\udcc1 Upload Files\n\n## Installation\n\nEnsure you have Python version 3.6 or later installed. Then run this command in the terminal:\n\n```bash\npip install pywebagent\n```\n\n## Usage\n\n### Example 1: Order a plush bunny on Amazon\n```python\nfrom pywebagent import act\n\n# sometimes you'll need to help the agent bypass the captcha, sometimes it will succeed by itself\nact(\n    \"https://amazon.com\", \n    \"Order a plush bunny\", \n    email=\"<your amazon email>\", \n    password=\"<your amazon password>\"\n)\n```\n\n\n### Example 2: Order your photo prints from Mixtiles\nHere is an example of how to use `pywebagent` to print some images on [mixtiles.com:](https://mixtiles.com/)\n\n```python\nact(\n    \"https://mixtiles.com/\",\n    \"Order these as Mixtiles\",\n    name=\"John Doe\",\n    email=\"johndoe208909@gmail.com\",\n    photos=[\n        \"omnnitool/demo/mixtiles/1.jpg\",\n        \"omnnitool/demo/mixtiles/2.jpg\",\n        \"omnnitool/demo/mixtiles/3.jpg\"\n    ],\n    payment_info={\n        \"card_number\": \"4242424242424242\",\n        \"expiry_date\": \"12/22\",\n        \"cvc\": \"123\"\n    },\n    address=\"123 Main St, San Francisco, CA 94105\"\n)\n```\n\n<b>Note: OPENAI_API_KEY should be set as an environment variable.</b>\n\n## Upcoming Features\n* Add return values from `act` (e.g, order number of purchase, ...)\n* Add support for more types of interaction (including scrolling, swiping, ..)\n* Add caching to speed everything up\n* Support open source vision models\n* Support more complicated actions\n\n## How It Works\nThe concept is extremely simple. Detect all elements that have an event handler (which means they can be interacted with), highlight them, take a screenshot, and ask GPT 4 Vision what to do. The results are surprisingly good.\n\n## Contributing\nContributions are more than welcome! In fact, we're looking for people who want to develop this further.  \nIf you have any suggestions, features requests or want to report bugs, kindly open an issue first to discuss what you would like to change. For changes, please open a pull request.\n\n## Community\nFeel free to join our discord at https://discord.gg/5eJkjMMa.\n\n## License\n\n`pywebagent` is licensed under the MIT License. See `LICENSE` for more information.\n\n## Disclaimer\n\n`pywebagent` is an experimental project, and is not officially affiliated with OpenAI.\n\n## Contact \n\nIf you have specific questions about using the `pywebagent`, feel free to email us at maximkgn@gmail.com or ori.kabeli@gmail.com\n\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Maxim Kogan  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "An experimental AI web agent",
    "version": "0.1",
    "project_urls": {
        "Homepage": "https://github.com/pywebagent/pywebagent"
    },
    "split_keywords": [
        "web agent",
        "web automation",
        "web testing",
        "web action agent"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "71ea74a71a6ab3d7471dbb971a250d6171373379516e3ad827b8000ed25e5680",
                "md5": "1a871b576c0494718e3261967bf2f415",
                "sha256": "b5f730aed4b5064c82a4fdabe3e8315a0e16cbc57da9f5686f477957ac8d9650"
            },
            "downloads": -1,
            "filename": "pywebagent-0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1a871b576c0494718e3261967bf2f415",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 15097,
            "upload_time": "2023-12-01T10:44:46",
            "upload_time_iso_8601": "2023-12-01T10:44:46.209799Z",
            "url": "https://files.pythonhosted.org/packages/71/ea/74a71a6ab3d7471dbb971a250d6171373379516e3ad827b8000ed25e5680/pywebagent-0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7e42f9acac5062c91d8c0bd4d78eb11536f970306f680bb5c24960421b097357",
                "md5": "46d7adbb1eeec65b005faac0571a1bc7",
                "sha256": "2b6c1922b491be1c890cc2d1d8ea40eb4e8a47f953ab954fe8860ed0162fc191"
            },
            "downloads": -1,
            "filename": "pywebagent-0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "46d7adbb1eeec65b005faac0571a1bc7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 15739,
            "upload_time": "2023-12-01T10:44:48",
            "upload_time_iso_8601": "2023-12-01T10:44:48.510962Z",
            "url": "https://files.pythonhosted.org/packages/7e/42/f9acac5062c91d8c0bd4d78eb11536f970306f680bb5c24960421b097357/pywebagent-0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-01 10:44:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pywebagent",
    "github_project": "pywebagent",
    "github_not_found": true,
    "lcname": "pywebagent"
}
        
Elapsed time: 4.55202s