pywebagent - an experimental AI web agent
Description
pywebagent is an experimental 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:
pip install pywebagent
Usage
Example 1: Order a plush bunny on Amazon
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:
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"
)
Note: OPENAI_API_KEY should be set as an environment variable.
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
Metadata
Release files for pywebagent 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pywebagent-0.1.tar.gz | 15.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pywebagent-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.8 kB
Release files / pywebagent-0.1.tar.gz
| Download URL | pywebagent-0.1.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b6c1922b491be1c890cc2d1d8ea40eb4e8a47f953ab954fe8860ed0162fc191
|
|
BLAKE2b-256 checksum How to use checksums |
7e42f9acac5062c91d8c0bd4d78eb11536f970306f680bb5c24960421b097357
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.3
|
Release files / pywebagent-0.1-py3-none-any.whl
| Download URL | pywebagent-0.1-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5f730aed4b5064c82a4fdabe3e8315a0e16cbc57da9f5686f477957ac8d9650
|
|
BLAKE2b-256 checksum How to use checksums |
71ea74a71a6ab3d7471dbb971a250d6171373379516e3ad827b8000ed25e5680
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.3
|
Security for pywebagent 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.