# google-gemini/computer-use-preview

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/google-gemini-computer-use-preview).**

2,815 stars · 362 forks · Python · apache-2.0

## Links

- GitHub: https://github.com/google-gemini/computer-use-preview
- awesome-repositories: https://awesome-repositories.com/repository/google-gemini-computer-use-preview.md

## Description

This project is a browser automation system that connects Google's Gemini API to a web browser, enabling an AI agent to perform tasks on a user's behalf by interpreting natural language instructions. At its core, it operates through a continuous screenshot-based action loop, where the agent captures the browser's current state, sends the image to the Gemini model, and executes the model's returned commands to click, type, and navigate.

The system distinguishes itself through a dual browser backend abstraction, supporting both local Playwright-controlled browsers and remote Browserbase cloud instances, with the ability to switch between them at runtime. It also offers a Vertex AI routing switch, allowing model inference requests to be directed to either the public Gemini API or Vertex AI endpoints. A mouse cursor overlay injection feature visually marks the cursor position on screenshots sent to the model, aiding in debugging and tracking agent actions.

The project provides distinct agent implementations for each backend, including a Playwright browser agent, a Browserbase cloud browser agent, and a Vertex AI browser agent, all driven by the same natural language interface. Configuration is managed through environment variables and a `.env` file, with runtime settings for browser backend selection, headless mode, cloud region, model version, and startup URL. The system also includes a workaround for handling operating-system-rendered dropdown menus that Playwright cannot natively capture.

## Tags

### Artificial Intelligence & ML

- [Natural Language Browser Control Platforms](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/agent-orchestration-multi-agent/autonomous-agents/autonomous-browser-agents/natural-language-browser-control-platforms.md) — Controls a web browser by translating plain-English instructions into clicks, typing, and navigation.
- [AI Powered Web Automation](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-powered-web-automation.md) — Executes multi-step web workflows like form filling and data extraction via an AI agent.
- [Browser Automation Agents](https://awesome-repositories.com/f/artificial-intelligence-ml/browser-automation-agents.md) — Executes natural language instructions by controlling a web browser to perform specified tasks. ([source](https://github.com/google-gemini/computer-use-preview/blob/main/README.md))
- [Gemini-Powered Agents](https://awesome-repositories.com/f/artificial-intelligence-ml/browser-automation-agents/gemini-powered-agents.md) — Uses the Gemini API to control a web browser through natural language instructions.
- [Gemini Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/gemini-integrations.md) — Connects to the Gemini API to power an agent that perceives and interacts with GUIs.
- [Natural Language Command Translation](https://awesome-repositories.com/f/artificial-intelligence-ml/llm-translation-integrations/natural-language-command-translation.md) — Translates plain-English commands into browser actions like clicking, typing, and navigating.
- [Debugging Overlays](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-browser-interfaces/debugging-overlays.md) — Provides debugging tools like mouse cursor overlays and headless mode toggling for agent actions.
- [API and Vertex AI Routing](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-request-routing/api-and-vertex-ai-routing.md) — Routes model inference requests to either the public Gemini API or Vertex AI endpoints based on a runtime toggle.
- [CLI-Driven Browser Agents](https://awesome-repositories.com/f/artificial-intelligence-ml/browser-automation-agents/cli-driven-browser-agents.md) — Executes a natural-language instruction by launching a browser, navigating web pages, and performing actions via the Gemini API from the CLI. ([source](https://github.com/google-gemini/computer-use-preview#readme))
- [Cloud Browser Agent Execution](https://awesome-repositories.com/f/artificial-intelligence-ml/browser-automation-agents/cloud-browser-agent-execution.md) — Launches a Browserbase cloud browser, connects it to a Gemini-powered agent, and executes a natural-language task loop. ([source](https://github.com/google-gemini/computer-use-preview/blob/main/test_main.py))
- [Playwright Agent Execution](https://awesome-repositories.com/f/artificial-intelligence-ml/browser-automation-agents/playwright-agent-execution.md) — Launches a Playwright-controlled browser, connects it to a Gemini-powered agent, and executes a natural-language task loop. ([source](https://github.com/google-gemini/computer-use-preview/blob/main/test_main.py))
- [Browser Automation Agents](https://awesome-repositories.com/f/artificial-intelligence-ml/vertex-ai-integrations/browser-automation-agents.md) — Routes browser automation requests through Vertex AI for model inference and task execution.

### Graphics & Multimedia

- [AI-Driven Action Loops](https://awesome-repositories.com/f/graphics-multimedia/web-page-screenshot-tools/browser-screenshot-capture/ai-driven-action-loops.md) — Operates through a continuous screenshot-based action loop where the agent captures browser state and executes model commands.

### Software Engineering & Architecture

- [Local and Remote Backend Switching](https://awesome-repositories.com/f/software-engineering-architecture/browser-driver-abstractions/local-and-remote-backend-switching.md) — Ships a dual browser backend abstraction that switches between local Playwright and remote Browserbase instances at runtime.

### Data & Databases

- [Browser](https://awesome-repositories.com/f/data-databases/collective-communication-operations/backend-selection/browser.md) — Selects between a local Playwright-controlled browser or a remote Browserbase instance to run the agent. ([source](https://github.com/google-gemini/computer-use-preview#readme))

### Development Tools & Productivity

- [API-Driven Executions](https://awesome-repositories.com/f/development-tools-productivity/shell-command-execution/script-generators/playwright-scripts/api-driven-executions.md) — Leverages Playwright to launch and control a browser, executing tasks via the Gemini API.

### DevOps & Infrastructure

- [Cloud Browser Provisioners](https://awesome-repositories.com/f/devops-infrastructure/cloud-provisioning/cloud-browser-provisioners.md) — Configures remote Browserbase cloud browser instances for AI-driven automation.

### Web Development

- [Cloud Browser Integrations](https://awesome-repositories.com/f/web-development/web-automation-scraping/browser-orchestration-systems/cloud-browser-integrations.md) — Connects a Gemini-powered agent to a remote Browserbase cloud browser for task loops.
