Header Ads

Setup Browser AI Agent using Python on Windows

We now live in an age where AI tools have become essential components of our lives if we strive to be productive in our daily routines. Browser-Use is an open source AI agent that automates browser related tasks for example, if you on daily basis perform multiple browser related tasks such as searching products, videos, job hunting or even looking for booking tickets then this AI agent is for you as it automates all browser related tasks for you, so, you can sit back, relax and be more productive with your day.

Today, I shall be demonstrating setup process of this amazing AI agent Browser-Use using python on windows, so, you can right away start using it.



Prerequisites:

Before proceeding any further in this article, following are some of the many prerequisites for this article:
  1. Installation of Python.
  2. Download of Browser-Use Code.
  3. Knowledge of Windows Command Prompt.
The running working executable batch file is provided to run this AI agent using python on windows machine.

Download Now!

Let's begin now.

1) If you don't know how to install python on windows machine then checkout my Step-by-Step Guide to Install Python on Windows without Anaconda .

2) After downloading and extracting the Browser-Use AI agent code from the GitHub repository to your designated path, use below command to change into the code root path i.e.

cd D:\BrowseUserAI\web-ui
D:

3) Now, use below command to create the ".env" environment file with the code directory if not already created i.e.

copy .env.example .env

4) Next step is to set your python installation paths, create python virtual environment, activate virtual environment and then upgrade the python pip module. You can looking to step-1 for detail step by step guide for this step.

 

5) Now, install all the require python packages that this AI agent requires with the help of below commands i.e.

:: Installs
call pip install -r requirements.txt
call python -m playwright install

6) Next step is to execute this AI agent with the help of below command i.e.

:: Call Python Scripts
call python webui.py --ip 127.0.0.1 --port 7788


7)
Now, the tool has been setup, copy the URL "http://127.0.0.1:7788" into chrome browser. Its important that you use chrome browser because by default the tool is setup for chrome browser, if you want to use another browser then you need to do the configuration through either the tool's UI or through ".env" file. You can look into the project GitHub documentation for it. You also need to provide your Learning Language Model (LLM) provider API Key such as openAI or Gemini or any other that is available within this tool.


So here what you see, also as soon as you run the agent the browser automation begins. i.e.







Conclusion

In this article, you will learn to setup this amazing AI agent Browser-Use using python on windows. You also learn to configure LLM provider API keys as according to your choice.


Video Demo