New advertisers: 50% off your first month with code FIRSTMONTHSee slots
am-will avatar

Gemini Computer Use

Browser-control agent loop for Gemini 2.5 Computer Use, built on Playwright with safety confirmation for risky actions.

skills.sh installs
1.2K
GitHub stars
1K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers the full agent loop: screenshot capture, function_call parsing, Playwright action execution, and function_response return until the turn limit
  • Includes scripts/computer_use_agent.py with --prompt, --start-url, --turn-limit, and --exclude flags, plus an env.example template
  • Enforces user confirmation before any action flagged require_confirmation by the model's safety_decision
  • Designed for running Chromium, Chrome, Edge, or custom Chromium-based browsers like Brave in a sandboxed profile

Install

$ npx -y skills add am-will/codex-skills --skill gemini-computer-use -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Gemini Computer Use

Quick start

  1. Source the env file and set your API key:

    cp env.example env.sh
    $EDITOR env.sh
    source env.sh
    
  2. Create a virtual environment and install dependencies:

    python -m venv .venv
    source .venv/bin/activate
    pip install google-genai playwright
    playwright install chromium
    
  3. Run 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 6
    

Browser selection

  • Default: Playwright's bundled Chromium (no env vars required).
  • Choose a channel (Chrome/Edge) with COMPUTER_USE_BROWSER_CHANNEL.
  • Use a custom Chromium-based executable (e.g., Brave) with COMPUTER_USE_BROWSER_EXECUTABLE.

If both are set, COMPUTER_USE_BROWSER_EXECUTABLE takes precedence.

Core workflow (agent loop)

Details

Repository
github.com/am-will/codex-skills
Categories
Browser Automation & Scraping, AI Agents & LLM Apps

More from am-will/codex-skills

All 14

Similar to Gemini Computer Use

More Browser Automation & Scraping