You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/03_guides/09_browser_use.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,13 +16,13 @@ In this guide, you'll learn how to use the [Browser Use](https://browser-use.com
16
16
17
17
Browser Use is a great fit for Apify Actors:
18
18
19
-
- Describe what you want in plain English; the agent figures out the steps. This is well suited to pages whose structure changes often or is hard to target with fixed selectors.
20
-
- Browser Use ships wrappers for many providers (`ChatOpenAI`, `ChatAnthropic`, `ChatGoogle`, and more), so you can pick the model that fits your task and budget.
21
-
- Pass a [Pydantic](https://docs.pydantic.dev/) model as the output schema and the agent returns a validated object instead of free-form text, which maps cleanly onto an Apify dataset.
19
+
- Describe what you want in plain English and the agent figures out the steps. This is especially useful with pages whose structure changes often or is hard to target with fixed selectors.
20
+
- Browser Use ships wrappers for many providers, for example `ChatOpenAI`, `ChatAnthropic`, or `ChatGoogle`. You can pick the model that fits your task and budget.
21
+
- Pass a [Pydantic](https://docs.pydantic.dev/) model as the output schema and the agent returns a validated object that maps onto an Apify dataset.
22
22
- The agent drives a real Chromium over the Chrome DevTools Protocol, so JavaScript-heavy pages render just like they would for a human.
23
23
- The agent's `run` method is asynchronous, which integrates naturally with the asyncio-based Apify SDK.
24
24
25
-
Browser Use needs only the `browser-use` package. Install it with:
25
+
Browser Use needs only the `browser-use` package. To install it, use:
26
26
27
27
```bash
28
28
pip install browser-use
@@ -42,7 +42,7 @@ Keep the API key out of the Actor input and source code. The example reads it fr
42
42
43
43
## Example Actor
44
44
45
-
The following Actor runs a Browser Use agent for a single task and stores its structured result in the default dataset. By default it opens [Hacker News](https://news.ycombinator.com) and returns the title and URL of the top five posts, but the task, model, and step limit are all configurable through the Actor input.
45
+
The following Actor runs a Browser Use agent for a single task and stores its structured result in the default dataset. By default, it opens [Hacker News](https://news.ycombinator.com) and returns the title and URL of the top five posts, but the task, model, and step limit are all configurable through the Actor input.
46
46
47
47
The whole Actor fits in a single file. A `run_agent_task` helper holds the Browser Use-specific logic: it defines the output schema and builds the LLM, browser, and agent. The `main` coroutine handles the [Actor](https://docs.apify.com/platform/actors) lifecycle, reads the input, sets up [Apify Proxy](https://docs.apify.com/platform/proxy), runs the agent, and stores the result:
48
48
@@ -69,7 +69,7 @@ Browser Use expects the proxy as a `ProxySettings` object with separate `server`
69
69
70
70
Browser Use drives a real Chromium over CDP, so the Actor needs a browser binary available at runtime. The simplest way to provide one is to build on top of the [Apify Playwright base image](https://hub.docker.com/r/apify/actor-python-playwright), which already ships a browser together with all of its system-level dependencies. Browser Use discovers that browser automatically, so no extra install step is needed in the image.
71
71
72
-
Disable Browser Use's telemetry and cloud sync inside the Actor by setting the `ANONYMIZED_TELEMETRY=false` and `BROWSER_USE_CLOUD_SYNC=false` environment variables in your Dockerfile.
72
+
To disable Browser Use's telemetry and cloud sync inside the Actor, set the `ANONYMIZED_TELEMETRY=false` and `BROWSER_USE_CLOUD_SYNC=false` environment variables in your Dockerfile.
73
73
74
74
When running the Actor locally, install the browser once with the `browser-use install` command, which downloads a Chromium build together with its dependencies:
0 commit comments