examples/agent/browser_agent/README.md
This example demonstrates how to use AgentScope's BrowserAgent for web automation tasks. The BrowserAgent leverages the Model Context Protocol (MCP) to interact with browser tools powered by Playwright, enabling sophisticated web navigation, data extraction, and automation.
# Install from source
cd {PATH_TO_AGENTSCOPE}
pip install -e .
Set up your DashScope API key:
export DASHSCOPE_API_KEY="your_dashscope_api_key_here"
You can obtain a DashScope API key from Alibaba Cloud DashScope Console.
Before running the browser agent, you can test whether you can start the Playwright MCP server:
npx @playwright/mcp@latest
You can start running the browser agent in your terminal with the following command
cd examples/agent/browser_agent
python main.py