A robust browser automation agent designed to interact with web pages programmatically, exposed via a FastAPI web interface. This project leverages Playwright for browser control and mcp-agent for core agent functionalities, providing a powerful and flexible solution for web scraping, automated testing, and other browser-based tasks.
Watch the Browser Agent in action:
browser.mp4
- MCP Support: MCP from playwright
- Asynchronous Operations: Built with
asyncioanduvloopfor high performance and concurrency. - Configurable: Easily customize agent behavior through
mcp_agent.config.yaml. - Modular Design: Integrates with
mcp-agentfor extensible agent capabilities.
To set up the Browser Agent, follow these steps:
-
Clone the repository:
git clone https://github.com/priyank766/Browser_Agent_MCP.git cd browser-agent -
Install dependencies:
uv add -r requirements.txt
OR
pip install -r requirements.txt
-
Check Node and NPM:
1. node --version 2. npm --version
-
Paste API Keys
Paste Google API Key in
mcp_agent.secrets.yamlChoose Model INmcp_agents.config.yaml
To start the Browser Agent, run the following command:
streamlit run browser_agents.pyThis will start the Web application, typically accessible at http://127.0.0.1:8000.
You can then change the agent provider from mcp_agent.config.yaml
Refer to the browser_agent.py file
The agent's behavior can be configured using the mcp_agent.config.yaml file. This file allows you to set various parameters for the browser, agent behavior, and other settings.
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.
This project is licensed under the MIT License. See the LICENSE file for details.