Skip to content

Commit c826da5

Browse files
authored
[Docs] Fix default viewport info in docs (#1150)
**Summary** This PR fixes the default viewport mentioned in our docs.
1 parent fc06d40 commit c826da5

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

docs/basics/agent.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ MCP integrations enable agents to be more powerful by combining browser automati
117117
</Tip>
118118

119119
<Warning>
120-
Stagehand uses a 1024x768 viewport by default (the optimal size for Computer Use Agents). Other viewport sizes may reduce performance. If you need to modify the viewport, you can edit in the [Browser Configuration](/configuration/browser).
120+
Stagehand uses a 1288x711 viewport by default (the optimal size for Computer Use Agents). Other viewport sizes may reduce performance. If you need to modify the viewport, you can edit in the [Browser Configuration](/configuration/browser).
121121
</Warning>
122122

123123

@@ -291,7 +291,7 @@ if (firstResult.success === true) {
291291
**Problem**: Agent clicks on wrong elements or fails to interact with the correct UI components
292292

293293
**Solutions**:
294-
- Ensure proper viewport size: Stagehand uses `1024x768` by default (optimal for Computer Use models)
294+
- Ensure proper viewport size: Stagehand uses `1288x711` by default (optimal for Computer Use models)
295295
- Avoid changing viewport dimensions as other sizes may reduce performance
296296
</Accordion>
297297

docs/best-practices/computer-use.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Computer Use Agents
3-
description: Incorporate Computer Use APIs from Anthropic and OpenAI with one line of code in Stagehand.
3+
description: Incorporate Computer Use APIs from Google, Anthropic and OpenAI with one line of code in Stagehand.
44
---
55

66
## What is a Computer Use Agent?
@@ -14,11 +14,11 @@ description: Incorporate Computer Use APIs from Anthropic and OpenAI with one li
1414
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
1515
allowfullscreen
1616
></iframe>
17-
You might've heard of [Claude Computer Use](https://www.anthropic.com/news/3-5-models-and-computer-use) or [OpenAI's Computer Using Agent](https://openai.com/index/computer-using-agent/).
17+
You might've heard of [Gemini Computer Use](https://blog.google/technology/google-deepmind/gemini-computer-use-model/), [Claude Computer Use](https://www.anthropic.com/news/3-5-models-and-computer-use), or [OpenAI's Computer Using Agent](https://openai.com/index/computer-using-agent/).
1818

1919
These are powerful tools that can convert natural language into actions on the computer. However, you'd otherwise need to write your own code to convert these actions into Playwright commands.
2020

21-
Stagehand not only handles the execution of Computer Use outputs, but also lets you hot-swap between OpenAI and Anthropic models with one line of code.
21+
Stagehand not only handles the execution of Computer Use outputs, but also lets you hot-swap between Google, OpenAI, and Anthropic models with one line of code. You can find more information on the performance of different computer use models by visiting our [evals page](https://www.stagehand.dev/agent-evals).
2222

2323
## How to use a Computer Use Agent in Stagehand
2424

@@ -29,7 +29,7 @@ Stagehand lets you use Computer Use Agents with one line of code:
2929

3030
Computer Use Agents will often return XY-coordinates to click on the screen, so you'll need to configure your browser dimensions.
3131

32-
If not specified, the default browser dimensions are 1024x768. You can also configure the browser dimensions in the `browserbaseSessionCreateParams` or `localBrowserLaunchOptions` options.
32+
If not specified, the default browser dimensions are 1288 x 711. You can also configure the browser dimensions in the `browserbaseSessionCreateParams` or `localBrowserLaunchOptions` options.
3333
</Note>
3434

3535

@@ -53,8 +53,8 @@ const stagehand = new Stagehand({
5353
browserSettings: {
5454
blockAds: true,
5555
viewport: {
56-
width: 1024,
57-
height: 768,
56+
width: 1288,
57+
height: 711,
5858
},
5959
},
6060
},
@@ -76,8 +76,8 @@ stagehand = Stagehand(StagehandConfig(
7676
"browserSettings": {
7777
"blockAds": True,
7878
"viewport": {
79-
"width": 1024,
80-
"height": 768,
79+
"width": 1288,
80+
"height": 711,
8181
},
8282
},
8383
},
@@ -97,8 +97,8 @@ const stagehand = new Stagehand({
9797
localBrowserLaunchOptions: {
9898
headless: false,
9999
viewport: {
100-
width: 1024,
101-
height: 768,
100+
width: 1288,
101+
height: 711,
102102
},
103103
}
104104
});
@@ -113,8 +113,8 @@ stagehand = Stagehand(StagehandConfig(
113113
local_browser_launch_options={
114114
"headless": False,
115115
"viewport": {
116-
"width": 1024,
117-
"height": 768,
116+
"width": 1288,
117+
"height": 711,
118118
},
119119
}
120120
))

0 commit comments

Comments
 (0)