Skip to content

Commit 9a29937

Browse files
authored
google cua docs (#1111)
# why # what changed # test plan
1 parent dda52f1 commit 9a29937

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

docs/basics/agent.mdx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,28 @@ There are two ways to create agents in Stagehand:
3030

3131
### Computer Use Agents
3232

33-
Use computer use agents with specialized models from OpenAI or Anthropic:
33+
Use computer use agents with specialized models from OpenAI, Anthropic, or Google:
3434

3535
<CodeGroup>
3636
```typescript TypeScript
3737
const agent = stagehand.agent({
38-
provider: "anthropic",
39-
model: "claude-sonnet-4-20250514",
38+
provider: "google",
39+
model: "gemini-2.5-computer-use-preview-10-2025",
4040
instructions: "You are a helpful assistant that can use a web browser.",
4141
options: {
42-
apiKey: process.env.ANTHROPIC_API_KEY,
42+
apiKey: process.env.GOOGLE_API_KEY,
4343
},
4444
});
4545
await agent.execute("apply for a job at Browserbase")
4646
```
4747

4848
```python Python
4949
agent = stagehand.agent({
50-
"provider": "anthropic",
51-
"model": "claude-sonnet-4-20250514",
50+
"provider": "google",
51+
"model": "gemini-2.5-computer-use-preview-10-2025",
5252
"instructions": "You are a helpful assistant that can use a web browser.",
5353
"options": {
54-
"apiKey": os.getenv("ANTHROPIC_API_KEY"),
54+
"apiKey": os.getenv("GOOGLE_API_KEY"),
5555
},
5656
})
5757
await agent.execute("apply for a job at Browserbase")
@@ -77,14 +77,14 @@ Agents can be enhanced with external tools and services through MCP (Model Conte
7777
<CodeGroup>
7878
```typescript TypeScript (Pass URL)
7979
const agent = stagehand.agent({
80-
provider: "openai",
81-
model: "computer-use-preview",
80+
provider: "google",
81+
model: "gemini-2.5-computer-use-preview-10-2025",
8282
integrations: [
8383
`https://mcp.exa.ai/mcp?exaApiKey=${process.env.EXA_API_KEY}`,
8484
],
8585
instructions: `You have access to web search through Exa. Use it to find current information before browsing.`,
8686
options: {
87-
apiKey: process.env.OPENAI_API_KEY,
87+
apiKey: process.env.GOOGLE_API_KEY,
8888
},
8989
});
9090

@@ -99,12 +99,12 @@ const supabaseClient = await connectToMCPServer(
9999
);
100100

101101
const agent = stagehand.agent({
102-
provider: "openai",
103-
model: "computer-use-preview",
102+
provider: "google",
103+
model: "gemini-2.5-computer-use-preview-10-2025",
104104
integrations: [supabaseClient],
105105
instructions: `You can interact with Supabase databases. Use these tools to store and retrieve data.`,
106106
options: {
107-
apiKey: process.env.OPENAI_API_KEY,
107+
apiKey: process.env.GOOGLE_API_KEY,
108108
},
109109
});
110110

@@ -123,7 +123,7 @@ Stagehand uses a 1024x768 viewport by default (the optimal size for Computer Use
123123

124124
## Available Models
125125

126-
Use specialized computer use models (e.g., `computer-use-preview` from OpenAI or `claude-sonnet-4-20250514` from Anthropic)
126+
Use specialized computer use models (e.g., `gemini-2.5-computer-use-preview-10-2025` from Google or `claude-sonnet-4-20250514` from Anthropic)
127127

128128
<Card title="Available Models" icon="robot" href="/configuration/models">
129129
Check out the guide on how to use different models with Stagehand.

docs/references/agent.mdx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const agent = stagehand.agent(config: AgentConfig): AgentInstance
2323
**AgentConfig Interface:**
2424
```typescript
2525
interface AgentConfig {
26-
provider?: AgentProviderType; // "openai" | "anthropic"
26+
provider?: AgentProviderType; // "openai" | "anthropic" | "google"
2727
model?: string;
2828
instructions?: string;
2929
options?: Record<string, unknown>;
@@ -59,15 +59,18 @@ agent = stagehand.agent({
5959
<ParamField path="provider" type="AgentProviderType" optional>
6060
AI provider for agent functionality.
6161

62-
**Options:** `"anthropic"`, `"openai"`
62+
**Options:** `"anthropic"`, `"openai"`, `"google"`
6363
</ParamField>
6464

6565
<ParamField path="model" type="string" optional>
6666
Specific model for agent execution.
67-
67+
6868
**Anthropic:** `"claude-sonnet-4-20250514"`, `"claude-3-5-sonnet-20241022"`
6969

7070
**OpenAI:** `"computer-use-preview"`, `"gpt-4o"`
71+
72+
**Google:** `"gemini-2.5-computer-use-preview-10-2025"`
73+
7174
</ParamField>
7275

7376
<ParamField path="instructions" type="string" optional>

0 commit comments

Comments
 (0)