Build and run Gemini 2.5 Computer Use browser-control agents with Playwright. Use when a user wants to automate web browser tasks via the Gemini Computer Use model, needs an agent loop (screenshot → function_call → action → function_response), or asks to integrate safety confirmation for risky UI actions.
88%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Source the env file and set your API key:
cp env.example env.sh
$EDITOR env.sh
source env.shCreate a virtual environment and install dependencies:
python -m venv .venv
source .venv/bin/activate
pip install google-genai playwright
playwright install chromiumRun the agent script with a prompt:
python scripts/computer_use_agent.py \
--prompt "Find the latest blog post title on example.com" \
--start-url "https://example.com" \
--turn-limit 6COMPUTER_USE_BROWSER_CHANNEL.COMPUTER_USE_BROWSER_EXECUTABLE.If both are set, COMPUTER_USE_BROWSER_EXECUTABLE takes precedence.
function_call actions in the response.safety_decision is require_confirmation, prompt the user before executing.function_response objects containing the latest URL + screenshot.--exclude to block risky actions you do not want the model to take.scripts/computer_use_agent.pyreferences/google-computer-use.mdenv.exampleam-will/codex-skills
9f954c3
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.