@@ -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
3737const 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});
4545await agent .execute (" apply for a job at Browserbase" )
4646```
4747
4848``` python Python
4949agent = 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})
5757await 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)
7979const 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
101101const 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.
0 commit comments