Run the Agent CLI via main.py
mainThe main.py script is the primary interface for executing browser tasks. Use the --query flag to provide natural language instructions.
Basic usage:
python main.py --query "Go to Google and type 'Hello World' into the search bar"Available Environments (--env):
playwright: Runs the browser locally using Playwright (default behavior).browserbase: Connects to a Browserbase instance (requiresBROWSERBASE_API_KEYandBROWSERBASE_PROJECT_ID).
Example with Playwright and initial URL:
python main.py --query="Go to Google and type 'Hello World' into the search bar" --env="playwright" --initial_url="https://www.google.com/search?q=latest+AI+news"python main.py --query="Go to Google and type 'Hello World' into the search bar" --env="playwright" --initial_url="https://www.google.com/search?q=latest+AI+news"