Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions packages/docs/v3/basics/act.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,7 @@ You can pass additional options to configure the model, timeout, variables, and
```typescript
// Custom model configuration
await stagehand.act("choose 'Peach' from the favorite color dropdown", {
model: {
modelName: "google/gemini-2.5-flash",
apiKey: process.env.GEMINI_API_KEY
},
model: "google/gemini-2.5-flash",
timeout: 10000
});
```
Expand Down
25 changes: 5 additions & 20 deletions packages/docs/v3/basics/agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ You can use specialized computer use models from Google, OpenAI, Anthropic, or M
```typescript Google
const agent = stagehand.agent({
mode: "cua",
model: {
modelName: "google/gemini-2.5-computer-use-preview-10-2025",
apiKey: process.env.GOOGLE_GENERATIVE_AI_API_KEY
},
model: "google/gemini-3-flash-preview",
systemPrompt: "You are a helpful assistant...",
});

Expand All @@ -84,10 +81,7 @@ await agent.execute({
```typescript OpenAI
const agent = stagehand.agent({
mode: "cua",
model: {
modelName: "openai/computer-use-preview",
apiKey: process.env.OPENAI_API_KEY
},
model: "openai/computer-use-preview",
systemPrompt: "You are a helpful assistant...",
});

Expand All @@ -100,10 +94,7 @@ await agent.execute({
```typescript Anthropic
const agent = stagehand.agent({
mode: "cua",
model: {
modelName: "anthropic/claude-sonnet-4-6",
apiKey: process.env.ANTHROPIC_API_KEY
},
model: "anthropic/claude-sonnet-4-6",
systemPrompt: "You are a helpful assistant...",
});

Expand Down Expand Up @@ -618,10 +609,7 @@ Agents can be enhanced with external tools and services through MCP (Model Conte
```typescript Pass URL
const agent = stagehand.agent({
mode: "cua",
model: {
modelName: "openai/computer-use-preview",
apiKey: process.env.OPENAI_API_KEY
},
model: "openai/computer-use-preview",
integrations: [
`https://mcp.exa.ai/mcp?exaApiKey=${process.env.EXA_API_KEY}`,
],
Expand All @@ -640,10 +628,7 @@ const supabaseClient = await connectToMCPServer(

const agent = stagehand.agent({
mode: "cua",
model: {
modelName: "openai/computer-use-preview",
apiKey: process.env.OPENAI_API_KEY
},
model: "openai/computer-use-preview",
integrations: [supabaseClient],
systemPrompt: `You can interact with Supabase databases. Use these tools to store and retrieve data.`
});
Expand Down
5 changes: 1 addition & 4 deletions packages/docs/v3/best-practices/caching.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,7 @@ await page.goto("https://browserbase.github.io/stagehand-eval-sites/sites/drag-d

const agent = stagehand.agent({
mode: "cua",
model: {
modelName: "google/gemini-2.5-computer-use-preview-10-2025",
apiKey: process.env.GOOGLE_GENERATIVE_AI_API_KEY
},
model: "google/gemini-3-flash-preview",
systemPrompt: "You are a helpful assistant that can use a web browser.",
});

Expand Down
5 changes: 1 addition & 4 deletions packages/docs/v3/best-practices/deployments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ export default async function handler(req: VercelRequest, res: VercelResponse):
env: "BROWSERBASE",
apiKey: process.env.BROWSERBASE_API_KEY!,
disablePino: true,
model: {
modelName: "google/gemini-2.5-flash",
apiKey: process.env.GOOGLE_API_KEY!,
},
model: "google/gemini-2.5-flash",
// optional session params
browserbaseSessionCreateParams: {
region: "us-west-2",
Expand Down
20 changes: 4 additions & 16 deletions packages/docs/v3/best-practices/deterministic-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@ await page.goto("https://example.com");

const agent = stagehand.agent({
mode: "cua",
model: {
modelName: "google/gemini-2.5-computer-use-preview-10-2025",
apiKey: process.env.GOOGLE_GENERATIVE_AI_API_KEY
},
model: "google/gemini-3-flash-preview",
systemPrompt: "You are a helpful assistant that can use a web browser.",
});

Expand Down Expand Up @@ -127,10 +124,7 @@ await page.goto("https://github.com");

const agent = stagehand.agent({
mode: "cua",
model: {
modelName: "google/gemini-2.5-computer-use-preview-10-2025",
apiKey: process.env.GOOGLE_GENERATIVE_AI_API_KEY
},
model: "google/gemini-3-flash-preview",
systemPrompt: "You are a helpful assistant that can use a web browser.",
});

Expand Down Expand Up @@ -174,10 +168,7 @@ await page.goto("https://github.com");

const agent = stagehand.agent({
mode: "cua",
model: {
modelName: "google/gemini-2.5-computer-use-preview-10-2025",
apiKey: process.env.GOOGLE_GENERATIVE_AI_API_KEY
},
model: "google/gemini-3-flash-preview",
systemPrompt: "You are a helpful assistant that can use a web browser.",
});

Expand Down Expand Up @@ -222,10 +213,7 @@ await page.goto("https://example.com");

const agent = stagehand.agent({
mode: "cua",
model: {
modelName: "google/gemini-2.5-computer-use-preview-10-2025",
apiKey: process.env.GOOGLE_GENERATIVE_AI_API_KEY
},
model: "google/gemini-3-flash-preview",
systemPrompt: "You are a helpful assistant that can use a web browser.",
});

Expand Down
Loading