trying out browser-use
This project uses uv for fast Python dependency management.
-
Install uv (if you haven't already):
curl -LsSf https://astral.sh/uv/install.sh | sh(For other installation methods, refer to the uv documentation.)
-
Set up your environment variables: Copy from
.env.exampleto create a.envfile in the root directory to store your API keys necessary for thebrowser-use-sdkto operate (such as yourBROWSER_USE_API_KEY).cp .env.example .env
-
Install dependencies: Run the following command to automatically create a virtual environment (
.venv) and install all required packages listed inpyproject.toml:uv sync
Once the environment is successfully initialized and your .env is configured, you can run the example scripts!
To run the cloud/top_movies.py agent, use:
uv run cloud/top_movies.pyTo run the cloud/top_amazon.py agent (which asks for a product and finds its Amazon rating and price), use:
uv run cloud/top_amazon.pyTo run the cloud/gmail.py agent (which logs into Gmail with a persistent profile and fetches recent emails with their timestamps), use:
uv run cloud/gmail.pyTo run the open-source/hacker_news_top5.py agent (which finds the top 5 stories on Hacker News using a local open-source setup), use:
uv run open-source/hacker_news_top5.py(Alternatively, you can manually activate the environment with source .venv/bin/activate and run the scripts with python <script_name>.py)