Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Agent settings ready to ship

Magnus Müller3df6c8413f20
diff --git a/docs/customize/agent-output-format.mdx b/docs/customize/agent-output-format.mdx
index 8cbf663cf..391487d5d 100644
--- a/docs/customize/agent-output-format.mdx
+++ b/docs/customize/agent-output-format.mdx
@@ -1,11 +1,11 @@
---
title: "Output Format"
-description: "Understanding agent execution results and structured output"
+description: ""
icon: "arrow-right-to-bracket"
mode: "wide"
---
-## Output Format
+## Agent History
The `run()` method returns an `AgentHistoryList` object with the complete execution history:
@@ -42,38 +42,4 @@ See all helper methods in the [AgentHistoryList source code](https://github.com/
## Structured Output
-For structured data extraction, use the `output_model_schema` parameter with a Pydantic model:
-
-```python
-from pydantic import BaseModel
-from browser_use import Agent, ChatOpenAI
-
-class Post(BaseModel):
- post_title: str
- post_url: str
- num_comments: int
- hours_since_post: int
-
-class Posts(BaseModel):
- posts: list[Post]
-
-# Create agent with structured output
-agent = Agent(
- task="Go to hackernews show hn and give me the first 5 posts",
- llm=ChatOpenAI(model="gpt-4.1-mini"),
- output_model_schema=Posts
-)
-
-# Run and parse structured result
-history = await agent.run()
-result = history.final_result()
-
-if result:
- parsed: Posts = Posts.model_validate_json(result)
- for post in parsed.posts:
- print(f"Title: {post.post_title}")
- print(f"URL: {post.post_url}")
- print(f"Comments: {post.num_comments}")
-```
-
-For a complete structured output example, see the [custom_output.py example](https://github.com/browser-use/browser-use/blob/main/examples/features/custom_output.py).
+For structured output, use the `output_model_schema` parameter with a Pydantic model. [Example](https://github.com/browser-use/browser-use/blob/main/examples/features/custom_output.py).
diff --git a/docs/customize/agent-parameters.mdx b/docs/customize/agent-parameters.mdx
index 1eaed7c77..ec8015023 100644
--- a/docs/customize/agent-parameters.mdx
+++ b/docs/customize/agent-parameters.mdx
@@ -8,9 +8,10 @@ mode: "wide"
## Available Parameters
### Core Settings
-- `controller`: Registry of tools the agent can call. Defaults to base Controller. [Example for custom tools](https://github.com/browser-use/browser-use/tree/main/examples/custom-functions)
+- `controller`: Registry of [our tools](https://github.com/browser-use/browser-use/blob/main/browser_use/controller/service.py
+) the agent can call. [Example for custom tools](https://github.com/browser-use/browser-use/tree/main/examples/custom-functions)
- `browser_session`: BrowserSession object where you can specify the browser settings.
-- `output_model_schema`: Pydantic model class for structured output validation. [Full example](https://github.com/browser-use/browser-use/blob/main/examples/features/custom_output.py)
+- `output_model_schema`: Pydantic model class for structured output validation. [Example](https://github.com/browser-use/browser-use/blob/main/examples/features/custom_output.py)
### Vision & Processing
- `use_vision` (default: `True`): Enable/disable vision capabilities for processing screenshots
@@ -18,21 +19,21 @@ mode: "wide"
- `page_extraction_llm`: Separate LLM model for page content extraction. You can choose a small & fast model because it only needs to extract text from the page (default: same as `llm`)
### Actions & Behavior
-- `initial_actions`: List of actions to run before the main task without LLM. [Full example](https://github.com/browser-use/browser-use/blob/main/examples/features/initial_actions.py)
+- `initial_actions`: List of actions to run before the main task without LLM. [Example](https://github.com/browser-use/browser-use/blob/main/examples/features/initial_actions.py)
- `max_actions_per_step` (default: `10`): Maximum actions per step, e.g. for form filling the agent can output 10 fields at once. We execute the actions until the page changes.
- `max_failures` (default: `3`): Maximum retries for steps with errors
- `use_thinking` (default: `True`): Controls whether the agent uses its internal "thinking" field for explicit reasoning steps.
-- `flash_mode` (default: `False`): Fast mode that skips evaluation, next goal and thinking and only uses memory. If `flash_mode` is enabled, it overrides `use_thinking` and disables the thinking process entirely. [Full example](https://github.com/browser-use/browser-use/blob/main/examples/getting_started/05_fast_agent.py)
+- `flash_mode` (default: `False`): Fast mode that skips evaluation, next goal and thinking and only uses memory. If `flash_mode` is enabled, it overrides `use_thinking` and disables the thinking process entirely. [Example](https://github.com/browser-use/browser-use/blob/main/examples/getting_started/05_fast_agent.py)
### System Messages
- `override_system_message`: Completely replace the default system prompt.
-- `extend_system_message`: Add additional instructions to the default system prompt. [Full example](https://github.com/browser-use/browser-use/blob/main/examples/features/custom_system_prompt.py)
+- `extend_system_message`: Add additional instructions to the default system prompt. [Example](https://github.com/browser-use/browser-use/blob/main/examples/features/custom_system_prompt.py)
### File & Data Management
- `save_conversation_path`: Path to save complete conversation history
- `save_conversation_path_encoding` (default: `'utf-8'`): Encoding for saved conversations
- `available_file_paths`: List of file paths the agent can access
-- `sensitive_data`: Dictionary of sensitive data to handle carefully. [Full example](https://github.com/browser-use/browser-use/blob/main/examples/features/sensitive_data.py)
+- `sensitive_data`: Dictionary of sensitive data to handle carefully. [Example](https://github.com/browser-use/browser-use/blob/main/examples/features/sensitive_data.py)
### Visual Output
- `generate_gif` (default: `False`): Generate GIF of agent actions. Set to `True` or string path
diff --git a/docs/customize/supported-models.mdx b/docs/customize/supported-models.mdx
index 0c13dd48d..88a7b0d40 100644
--- a/docs/customize/supported-models.mdx
+++ b/docs/customize/supported-models.mdx
@@ -2,7 +2,7 @@
title: "Supported Models"
description: "Choose your favorite LLM"
icon: "robot"
-mode: "wide"
+
---
### Recommendations
@@ -12,7 +12,7 @@ mode: "wide"
- Balanced: fast + cheap + clever: `gemini-2.5-flash` or `gpt-4.1-mini`
-### OpenAI
+### OpenAI [example](https://github.com/browser-use/browser-use/blob/main/examples/models/gpt-4.1.py)
`O3` model is recommended for best performance.
@@ -43,7 +43,7 @@ OPENAI_API_KEY=
into the normal OpenAI API call).
</Info>
-### Anthropic
+### Anthropic [example](https://github.com/browser-use/browser-use/blob/main/examples/models/claude-4-sonnet.py)
```python
from browser_use import Agent, ChatAnthropic
@@ -66,7 +66,7 @@ And add the variable:
ANTHROPIC_API_KEY=
```
-### Azure OpenAI
+### Azure OpenAI [example](https://github.com/browser-use/browser-use/blob/main/examples/models/azure_openai.py)
```python
from browser_use import Agent, ChatAzureOpenAI
@@ -92,7 +92,7 @@ AZURE_OPENAI_ENDPOINT=https://your-endpoint.openai.azure.com/
AZURE_OPENAI_API_KEY=
```
-### Gemini
+### Gemini [example](https://github.com/browser-use/browser-use/blob/main/examples/models/gemini.py)
> [!IMPORTANT] `GEMINI_API_KEY` was the old environment var name, it should be called `GOOGLE_API_KEY` as of 2025-05.
@@ -119,7 +119,7 @@ Required environment variables:
GOOGLE_API_KEY=
```
-### AWS Bedrock
+### AWS Bedrock [example](https://github.com/browser-use/browser-use/blob/main/examples/models/aws.py)
AWS Bedrock provides access to multiple model providers through a single API. We support both a general AWS Bedrock client and provider-specific convenience classes.
@@ -177,7 +177,7 @@ You can also use AWS profiles or IAM roles instead of environment variables. The
- Session tokens for temporary credentials
- AWS SSO authentication (`aws_sso_auth=True`)
-## Groq
+## Groq [example](https://github.com/browser-use/browser-use/blob/main/examples/models/llama4-groq.py)
```python
from browser_use import Agent, ChatGroq
@@ -212,3 +212,8 @@ llm = ChatOllama(model="llama3.1:8b")
We support all other models that can be called via OpenAI compatible API. We are open to PRs for more providers.
+**Examples available:**
+- [DeepSeek](https://github.com/browser-use/browser-use/blob/main/examples/models/deepseek-chat.py)
+- [Novita](https://github.com/browser-use/browser-use/blob/main/examples/models/novita.py)
+- [OpenRouter](https://github.com/browser-use/browser-use/blob/main/examples/models/openrouter.py)
+