> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anchorbrowser.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Anchor Browser provides cloud browsers for AI agents and automation: stealth browsing with residential proxies, managed authentication into third-party web apps, and browser sessions that run reliably at scale. AI agents that need Anchor credentials should start with https://docs.anchorbrowser.io/quickstart/agent-access. This flow lets agents obtain an API key programmatically without creating a dashboard account. Read that page before attempting authentication or API access.

# Gemini Computer Use

> Use Google Gemini models for screenshot-based browser automation

Google's Gemini Computer Use agent (`gemini-computer-use`) enables AI-powered browser automation through visual understanding and multi-turn interactions.

## Overview

Gemini Computer Use leverages Google's multimodal AI capabilities to:

* Process and understand web page screenshots
* Plan and execute multi-step browser interactions
* Handle complex visual layouts and dynamic content
* Integrate with Google's AI ecosystem

## Supported Models

| Model                            | Model ID                                  | Best For                                  |
| -------------------------------- | ----------------------------------------- | ----------------------------------------- |
| Gemini 3.5 Flash                 | `gemini-3.5-flash`                        | Screenshot-based automation **(default)** |
| Gemini 2.5 Computer Use (legacy) | `gemini-2.5-computer-use-preview-10-2025` | Legacy browser computer-use preview       |

## Code Example

<CodeGroup>
  ```javascript node.js theme={null}
  import { client, agentTask } from 'anchorbrowser';

  client.setConfig({ auth: () => process.env.ANCHORBROWSER_API_KEY });

  const response = await agentTask(
    'Search for the latest AI news and summarize the top 3 articles',
    {
      taskOptions: {
        url: 'https://news.google.com',
        agent: 'gemini-computer-use',
        // model: 'gemini-3.5-flash',  // Default model
        maxSteps: 25,
        outputSchema: {
          type: 'object',
          properties: {
            articles: {
              type: 'array',
              items: {
                type: 'object',
                properties: {
                  title: { type: 'string' },
                  summary: { type: 'string' },
                  source: { type: 'string' }
                }
              }
            }
          }
        }
      }
    }
  );

  console.log(response);
  ```

  ```python python theme={null}
  from anchorbrowser import Anchorbrowser
  import os

  anchor_client = Anchorbrowser(api_key=os.environ.get("ANCHORBROWSER_API_KEY"))

  response = anchor_client.agent.task(
      'Search for the latest AI news and summarize the top 3 articles',
      task_options={
          'url': 'https://news.google.com',
          'agent': 'gemini-computer-use',
          # 'model': 'gemini-3.5-flash',  # Default model
          'max_steps': 25,
          'output_schema': {
              'type': 'object',
              'properties': {
                  'articles': {
                      'type': 'array',
                      'items': {
                          'type': 'object',
                          'properties': {
                              'title': {'type': 'string'},
                              'summary': {'type': 'string'},
                              'source': {'type': 'string'}
                          }
                      }
                  }
              }
          }
      }
  )

  print(response)
  ```
</CodeGroup>

## Configuration Options

| Parameter       | Type    | Description                                                                      |
| --------------- | ------- | -------------------------------------------------------------------------------- |
| `agent`         | string  | Must be `gemini-computer-use`                                                    |
| `model`         | string  | Gemini model to use (default: `gemini-3.5-flash`)                                |
| `url`           | string  | Starting URL for the task                                                        |
| `max_steps`     | integer | Maximum actions the agent can take                                               |
| `output_schema` | object  | JSON Schema for structured output                                                |
| `secret_values` | object  | Secure credentials (see [Secret Values](/agentic-browser-control/secret-values)) |

## Secure Credentials with Secret Values

Gemini Computer Use fully supports secret values for secure credential handling. Secrets are never exposed to the AI model.

<CodeGroup>
  ```javascript node.js theme={null}
  const response = await agentTask(
    'Login to the dashboard and download my latest report',
    {
      taskOptions: {
        url: 'https://app.example.com/login',
        agent: 'gemini-computer-use',
        secretValues: {
          EMAIL: process.env.APP_EMAIL,
          PASSWORD: process.env.APP_PASSWORD
        }
      }
    }
  );
  ```

  ```python python theme={null}
  response = anchor_client.agent.task(
      'Login to the dashboard and download my latest report',
      task_options={
          'url': 'https://app.example.com/login',
          'agent': 'gemini-computer-use',
          'secret_values': {
              'EMAIL': os.environ.get('APP_EMAIL'),
              'PASSWORD': os.environ.get('APP_PASSWORD')
          }
      }
  )
  ```
</CodeGroup>

Learn more about [domain-scoped secrets](/agentic-browser-control/secret-values).

## Best Practices

* **gemini-3.5-flash is the default** - recommended Gemini Computer Use model with streamlined actions and intents
* **Leverage structured output** with `output_schema` for reliable data extraction
* **Provide clear, specific prompts** describing the exact task to complete
