Skip to content

Commit d57fda7

Browse files
committed
Add example image
1 parent 2102ad0 commit d57fda7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
1.53 MB
Loading

src/content/docs/browser-rendering/platform/stagehand.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@ import {
1313
TabItem,
1414
Tabs,
1515
PackageManagers,
16+
Details,
1617
} from "~/components";
1718

18-
[Stagehand](https://www.stagehand.dev/) is an open-source, AI-powered browser automation library. Rather than dictating exact steps or specifying selectors, Stagehand enables developers to build more reliably and flexibly by combining code with natural-language instructions powered by AI. This makes your agents more resilient to website changes and easier to maintain.
19+
[Stagehand](https://www.stagehand.dev/) is an open-source, AI-powered browser automation library. Rather than dictating exact steps or specifying selectors, Stagehand enables developers to build more reliably and flexibly by combining code with natural-language instructions powered by AI. This makes your agents more resilient to website changes and easier to maintain.
1920

2021
This guide shows you how to deploy a Worker that uses Stagehand, Browser Rendering, and [Workers AI](/workers-ai/) to automate a web task.
2122

2223
## Use Stagehand in a Worker with Workers AI
2324

2425
In this example, you will use Stagehand to search for a movie on [The Movie Database](https://www.themoviedb.org/), extract its details (title, year, and director), and return the information along with a screenshot of the webpage.
26+
<Details header="See an example of the result"> ![Stagehand example result](~/assets/images/browser-rendering/stagehand-example.png)</Details>
2527

2628
If you want to skip the steps and get started quickly, select **Deploy to Cloudflare** below.
2729

@@ -165,7 +167,7 @@ https://<your-worker>.workers.dev
165167

166168
[AI Gateway](/ai-gateway/) is a service that adds observability to your AI applications. By routing your requests through AI Gateway, you can monitor and debug your AI applications.
167169

168-
To use AI Gateway, first create a gateway in the [Cloudflare dashboard](https://dash.cloudflare.com/?to=/:account/workers/ai-gateway). In this example, we've named the gateway `stagehand-example-gateway`.
170+
To use AI Gateway, first create a gateway in the [Cloudflare dashboard](https://dash.cloudflare.com/?to=/:account/workers/ai-gateway). In this example, we've named the gateway `stagehand-example-gateway`.
169171

170172
```typescript
171173
const stagehand = new Stagehand({
@@ -206,7 +208,7 @@ const stagehand = new Stagehand({
206208

207209
[AI Gateway](/ai-gateway/) is a service that adds observability to your AI applications. By routing your requests through AI Gateway, you can monitor and debug your AI applications.
208210

209-
To use AI Gateway, first create a gateway in the [Cloudflare dashboard](https://dash.cloudflare.com/?to=/:account/workers/ai-gateway). In this example, we are using [OpenAI with AI Gateway](https://developers.cloudflare.com/ai-gateway/usage/providers/openai/). Make sure to add the `baseURL` as shown below, with your own Account ID and Gateway ID.
211+
To use AI Gateway, first create a gateway in the [Cloudflare dashboard](https://dash.cloudflare.com/?to=/:account/workers/ai-gateway). In this example, we are using [OpenAI with AI Gateway](https://developers.cloudflare.com/ai-gateway/usage/providers/openai/). Make sure to add the `baseURL` as shown below, with your own Account ID and Gateway ID.
210212

211213
```typescript
212214
const stagehand = new Stagehand({

0 commit comments

Comments
 (0)