A powerful browser automation tool that uses Gemini AI to understand and execute complex browsing tasks through a user-friendly Streamlit interface.
- Natural Language Tasks: Describe what you want the browser to do in plain English
- Interactive UI: Clean, modern interface built with Streamlit
- Real-time Logging: Watch the automation progress in real-time
- Configurable Parameters: Customize max steps and actions per step
- Error Handling: Robust error handling and user feedback
- Light Theme: Consistent, easy-to-read light theme interface
- Python 3.8 or higher
- Google Gemini API key
- Chrome/Chromium browser
- Clone the repository:
git clone https://github.com/Thejas775/Browser-Agent.git
cd browser-agent- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate- Install the required dependencies:
pip install -r requirements.txt
playwright install- Set up your environment variables:
Create a
.envfile in the project root with:
GEMINI_API_KEY=your_api_key_here- Start the Streamlit app:
streamlit run agent.py- Open your browser and navigate to the provided URL (typically
http://localhost:8501)
-
Enter a Task: Describe what you want the browser to do in natural language
- Example: "Go to Youtube and play blinding lights."
-
Configure Parameters:
- Max Steps: Maximum number of steps the agent can take (default: 25)
- Max Actions per Step: Maximum actions per step (default: 4)
browser-automation/
├── agent.py # Main Streamlit application
├── requirements.txt # Project dependencies
├── .env # Environment variables (create this)
└── README.md # Project documentation
The application can be configured through the following environment variables:
GEMINI_API_KEY: Your Google Gemini API key- Additional browser configurations can be modified in
browser_use.py