From bcc5a5a6886a3e7f53cb2be91fe7e76dd78ebb7f Mon Sep 17 00:00:00 2001 From: Jay Sahnan Date: Mon, 6 Oct 2025 15:08:28 -0700 Subject: [PATCH 1/3] Added Google Model to Agent Docs --- docs/basics/agent.mdx | 28 ++++++++++++++-------------- docs/references/agent.mdx | 9 ++++++--- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/docs/basics/agent.mdx b/docs/basics/agent.mdx index e1abd828b..cddcb5c97 100644 --- a/docs/basics/agent.mdx +++ b/docs/basics/agent.mdx @@ -30,16 +30,16 @@ There are two ways to create agents in Stagehand: ### Computer Use Agents -Use computer use agents with specialized models from OpenAI or Anthropic: +Use computer use agents with specialized models from OpenAI, Anthropic, or Google: ```typescript TypeScript const agent = stagehand.agent({ - provider: "anthropic", - model: "claude-sonnet-4-20250514", + provider: "google", + model: "computer-use-preview-10-2025", instructions: "You are a helpful assistant that can use a web browser.", options: { - apiKey: process.env.ANTHROPIC_API_KEY, + apiKey: process.env.GOOGLE_API_KEY, }, }); await agent.execute("apply for a job at Browserbase") @@ -47,11 +47,11 @@ await agent.execute("apply for a job at Browserbase") ```python Python agent = stagehand.agent({ - "provider": "anthropic", - "model": "claude-sonnet-4-20250514", + "provider": "google", + "model": "computer-use-preview-10-2025", "instructions": "You are a helpful assistant that can use a web browser.", "options": { - "apiKey": os.getenv("ANTHROPIC_API_KEY"), + "apiKey": os.getenv("GOOGLE_API_KEY"), }, }) 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 ```typescript TypeScript (Pass URL) const agent = stagehand.agent({ - provider: "openai", - model: "computer-use-preview", + provider: "google", + model: "computer-use-preview-10-2025", integrations: [ `https://mcp.exa.ai/mcp?exaApiKey=${process.env.EXA_API_KEY}`, ], instructions: `You have access to web search through Exa. Use it to find current information before browsing.`, options: { - apiKey: process.env.OPENAI_API_KEY, + apiKey: process.env.GOOGLE_API_KEY, }, }); @@ -99,12 +99,12 @@ const supabaseClient = await connectToMCPServer( ); const agent = stagehand.agent({ - provider: "openai", - model: "computer-use-preview", + provider: "google", + model: "computer-use-preview-10-2025", integrations: [supabaseClient], instructions: `You can interact with Supabase databases. Use these tools to store and retrieve data.`, options: { - apiKey: process.env.OPENAI_API_KEY, + apiKey: process.env.GOOGLE_API_KEY, }, }); @@ -123,7 +123,7 @@ Stagehand uses a 1024x768 viewport by default (the optimal size for Computer Use ## Available Models -Use specialized computer use models (e.g., `computer-use-preview` from OpenAI or `claude-sonnet-4-20250514` from Anthropic) +Use specialized computer use models (e.g., `computer-use-preview-10-2025` from Google or `claude-sonnet-4-20250514` from Anthropic) Check out the guide on how to use different models with Stagehand. diff --git a/docs/references/agent.mdx b/docs/references/agent.mdx index 2929c1bc2..0eb279ce2 100644 --- a/docs/references/agent.mdx +++ b/docs/references/agent.mdx @@ -23,7 +23,7 @@ const agent = stagehand.agent(config: AgentConfig): AgentInstance **AgentConfig Interface:** ```typescript interface AgentConfig { - provider?: AgentProviderType; // "openai" | "anthropic" + provider?: AgentProviderType; // "openai" | "anthropic" | "google" model?: string; instructions?: string; options?: Record; @@ -59,15 +59,18 @@ agent = stagehand.agent({ AI provider for agent functionality. - **Options:** `"anthropic"`, `"openai"` + **Options:** `"anthropic"`, `"openai"`, `"google"` Specific model for agent execution. - + **Anthropic:** `"claude-sonnet-4-20250514"`, `"claude-3-5-sonnet-20241022"` **OpenAI:** `"computer-use-preview"`, `"gpt-4o"` + + **Google:** `"computer-use-preview-10-2025"` + From de37de0c5b3d425a8c7b5a288338f9fc6844372c Mon Sep 17 00:00:00 2001 From: Jay Sahnan Date: Tue, 7 Oct 2025 11:07:00 -0700 Subject: [PATCH 2/3] elephants never forget --- docs/basics/agent.mdx | 10 +++++----- docs/references/agent.mdx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/basics/agent.mdx b/docs/basics/agent.mdx index cddcb5c97..658cb2ec0 100644 --- a/docs/basics/agent.mdx +++ b/docs/basics/agent.mdx @@ -36,7 +36,7 @@ Use computer use agents with specialized models from OpenAI, Anthropic, or Googl ```typescript TypeScript const agent = stagehand.agent({ provider: "google", - model: "computer-use-preview-10-2025", + model: "gemini-2.5-computer-use-preview", instructions: "You are a helpful assistant that can use a web browser.", options: { apiKey: process.env.GOOGLE_API_KEY, @@ -48,7 +48,7 @@ await agent.execute("apply for a job at Browserbase") ```python Python agent = stagehand.agent({ "provider": "google", - "model": "computer-use-preview-10-2025", + "model": "gemini-2.5-computer-use-preview", "instructions": "You are a helpful assistant that can use a web browser.", "options": { "apiKey": os.getenv("GOOGLE_API_KEY"), @@ -78,7 +78,7 @@ Agents can be enhanced with external tools and services through MCP (Model Conte ```typescript TypeScript (Pass URL) const agent = stagehand.agent({ provider: "google", - model: "computer-use-preview-10-2025", + model: "gemini-2.5-computer-use-preview", integrations: [ `https://mcp.exa.ai/mcp?exaApiKey=${process.env.EXA_API_KEY}`, ], @@ -100,7 +100,7 @@ const supabaseClient = await connectToMCPServer( const agent = stagehand.agent({ provider: "google", - model: "computer-use-preview-10-2025", + model: "gemini-2.5-computer-use-preview", integrations: [supabaseClient], instructions: `You can interact with Supabase databases. Use these tools to store and retrieve data.`, options: { @@ -123,7 +123,7 @@ Stagehand uses a 1024x768 viewport by default (the optimal size for Computer Use ## Available Models -Use specialized computer use models (e.g., `computer-use-preview-10-2025` from Google or `claude-sonnet-4-20250514` from Anthropic) +Use specialized computer use models (e.g., `gemini-2.5-computer-use-preview` from Google or `claude-sonnet-4-20250514` from Anthropic) Check out the guide on how to use different models with Stagehand. diff --git a/docs/references/agent.mdx b/docs/references/agent.mdx index 0eb279ce2..76de1cd43 100644 --- a/docs/references/agent.mdx +++ b/docs/references/agent.mdx @@ -69,7 +69,7 @@ agent = stagehand.agent({ **OpenAI:** `"computer-use-preview"`, `"gpt-4o"` - **Google:** `"computer-use-preview-10-2025"` + **Google:** `"gemini-2.5-computer-use-preview"` From 122e1b0340a2c846f16f7e9d05bd88334447d512 Mon Sep 17 00:00:00 2001 From: Jay Sahnan Date: Tue, 7 Oct 2025 11:25:55 -0700 Subject: [PATCH 3/3] updated --- docs/basics/agent.mdx | 10 +++++----- docs/references/agent.mdx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/basics/agent.mdx b/docs/basics/agent.mdx index 658cb2ec0..a0def7a60 100644 --- a/docs/basics/agent.mdx +++ b/docs/basics/agent.mdx @@ -36,7 +36,7 @@ Use computer use agents with specialized models from OpenAI, Anthropic, or Googl ```typescript TypeScript const agent = stagehand.agent({ provider: "google", - model: "gemini-2.5-computer-use-preview", + model: "gemini-2.5-computer-use-preview-10-2025", instructions: "You are a helpful assistant that can use a web browser.", options: { apiKey: process.env.GOOGLE_API_KEY, @@ -48,7 +48,7 @@ await agent.execute("apply for a job at Browserbase") ```python Python agent = stagehand.agent({ "provider": "google", - "model": "gemini-2.5-computer-use-preview", + "model": "gemini-2.5-computer-use-preview-10-2025", "instructions": "You are a helpful assistant that can use a web browser.", "options": { "apiKey": os.getenv("GOOGLE_API_KEY"), @@ -78,7 +78,7 @@ Agents can be enhanced with external tools and services through MCP (Model Conte ```typescript TypeScript (Pass URL) const agent = stagehand.agent({ provider: "google", - model: "gemini-2.5-computer-use-preview", + model: "gemini-2.5-computer-use-preview-10-2025", integrations: [ `https://mcp.exa.ai/mcp?exaApiKey=${process.env.EXA_API_KEY}`, ], @@ -100,7 +100,7 @@ const supabaseClient = await connectToMCPServer( const agent = stagehand.agent({ provider: "google", - model: "gemini-2.5-computer-use-preview", + model: "gemini-2.5-computer-use-preview-10-2025", integrations: [supabaseClient], instructions: `You can interact with Supabase databases. Use these tools to store and retrieve data.`, options: { @@ -123,7 +123,7 @@ Stagehand uses a 1024x768 viewport by default (the optimal size for Computer Use ## Available Models -Use specialized computer use models (e.g., `gemini-2.5-computer-use-preview` from Google or `claude-sonnet-4-20250514` from Anthropic) +Use specialized computer use models (e.g., `gemini-2.5-computer-use-preview-10-2025` from Google or `claude-sonnet-4-20250514` from Anthropic) Check out the guide on how to use different models with Stagehand. diff --git a/docs/references/agent.mdx b/docs/references/agent.mdx index 76de1cd43..6a468042d 100644 --- a/docs/references/agent.mdx +++ b/docs/references/agent.mdx @@ -69,7 +69,7 @@ agent = stagehand.agent({ **OpenAI:** `"computer-use-preview"`, `"gpt-4o"` - **Google:** `"gemini-2.5-computer-use-preview"` + **Google:** `"gemini-2.5-computer-use-preview-10-2025"`