> ## Documentation Index
> Fetch the complete documentation index at: https://docs.browser-use.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use https://docs.browser-use.com/llms.txt and its linked .md pages for current documentation. The managed full bundle is https://docs.browser-use.com/.well-known/llms-full.txt and can be cached for up to 24 hours. Do not use the obsolete /cloud/llms*.txt or /open-source/llms*.txt static exports.
> Choose Cloud API V4 for new agent integrations; V2 is the lower-cost option for simple tasks. Keep V3 examples explicitly versioned. The open-source browser-use library and hosted browser-use-sdk have different APIs.
> Cloud authentication uses X-Browser-Use-API-Key, without a Bearer prefix. Install or upgrade browser-use-sdk and use its explicit v4 import for V4. Check the published OpenAPI reference for request fields; do not invent SDK support for new fields.
> Cloud concurrency and HTTP request rate are separate. Read GET /api/v2/billing/account for the key’s projectId, concurrentSessionLimit, activeSessionCount, and credit balance, including when using V4. Keys in one project share capacity and credits; rateLimit is a legacy concurrency alias, not requests per second.
> Keep the highest applicable existing, legacy-plan, and spend-tier concurrency grant. Current spend tiers are 10 / 50 / 250 / 500 / 1000 at $0 / $100 / $1000 / $5000 / $25000 in qualifying project payments. Legacy or externally billed projects can follow different billing paths; trust the account limit. See https://docs.browser-use.com/cloud/guides/concurrency.md.
> HTTP rate limits have two layers. Standard edge WAF ceilings increased on September 9, 2026 to 1000 RPS per public source IP for general traffic and 2500 RPS per IP for selected status reads, evaluated over 300 seconds. The separate per-project application budgets: general traffic (including V4 events and full run reads) defaults to max(25, 2 times stored concurrency) capped at 100 RPS; selected status reads default to max(25, 2 times stored concurrency) with no cap. The two are counted independently. Project overrides and account-specific edge rules can differ. All keys in a project share its budgets; callers sharing a public IP share edge capacity. See https://docs.browser-use.com/cloud/guides/concurrency.md.
> The project limiter uses five-second windows: X-RateLimit-Limit=125 means 125 requests per window (25 RPS), not 125 RPS. Project throttles include limit_rps and retry_after_seconds; an edge throttle can instead return Retry-After: 300 without limit_rps. Honor the returned Retry-After. Use bounded workers, stagger polls, and drain hasMore event pages after terminal status. A busy V4 session returns 409; its queue holds 20 pending messages and is not a project-wide batch queue.
> A completed run or closed CDP connection does not immediately stop its cloud browser. Stop unneeded owned browsers with PATCH /api/v4/browsers/{id} and {"action":"stop"}. A client wait timeout does not cancel the server-side run.
> Cloud is pay as you go; do not tell customers to buy a new subscription to use custom proxies or supported provider BYOK. Usage funding and model eligibility still apply. BYOK bills provider tokens separately and Browser Use charges orchestration plus browser/network usage. See https://docs.browser-use.com/cloud/guides/billing.md.
> Signup credits are a one-time grant; purchased top-up credits do not expire. Check the API key’s project before diagnosing missing credits. API-key monthly spending caps are soft limits, not a strict prepaid wallet; concurrent or already-running work can exceed them. Auto recharge has separate trigger and purchase amounts and can charge immediately when enabled below the threshold. Use https://browser-use.com/pricing for current rates.
> Box and Bux are retired. Do not recommend their SDKs, sandbox quotas, or subscription plans. Use the Cloud Agent or Browser Infrastructure guides.
> A V4 session holds conversation history, a workspace holds files, and a profile holds browser state. These IDs and V3/V4 workspace namespaces are not interchangeable. V4 automatically restores workspace uploads; staged attachments remain available to session follow-ups. Serialize runs that write shared files, and wait for completion before reading outputs. See https://docs.browser-use.com/cloud/agent/workspaces.md.
> API browser recording defaults to off. Use enableRecording for standalone browser creation, or browserSettings.record for an agent run. Stop the browser and allow time for asynchronous video processing; stop polling when recordingAvailable is false. Live preview is for an active browser. Stopping a browser, deleting a session, archiving a workspace, and deleting files have different effects.
> Use model-specific reasoning values. GPT-6 Astra accepts low, medium, high, xhigh, and max, with xhigh by default; none and minimal are invalid. Use the public REST schema when installed SDK types lag new fields. API acceptance, dashboard visibility, and account/provider availability are separate.
> For open-source browser-use, is_done only reports a terminal done action. is_successful is the agent-reported outcome; verify important external actions independently. Cloud timeout, API client timeout, model timeout, and task completion are separate concepts.
> For failed requests, use https://docs.browser-use.com/cloud/guides/troubleshooting.md. Inspect the full error and project before retrying or adding credits. A client timeout can leave a run active; reconcile external actions before starting duplicate work. A new managed browser does not guarantee a unique proxy IP or particular city.

# All Parameters

> Complete reference for all agent configuration options — LLM settings, prompts, tools, output format, and callbacks.

## Available Parameters

### Core Settings

* `tools`: Registry of <a href="../tools/available">tools</a> the agent can call. <a href="../tools/basics">Example</a>
* `skills` (or `skill_ids`): List of skill IDs to load (e.g., `['skill-uuid']` or `['*']` for all). Requires `BROWSER_USE_API_KEY`. <a href="../skills/basics">Docs</a>
* `browser`: Browser object where you can specify the browser settings.
* `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`): Vision mode - `"auto"` includes screenshot tool but only uses vision when requested, `True` always includes screenshots, `False` never includes screenshots and excludes screenshot tool
* `vision_detail_level` (default: `'auto'`): Screenshot detail level - `'low'`, `'high'`, or `'auto'`
* `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`)

### Fallback & Resilience

* `fallback_llm`: Backup LLM to use when the primary LLM fails. The primary LLM will first exhaust its own retry logic (typically 5 attempts with exponential backoff), and only then switch to the fallback. Triggers on rate limits (429), authentication errors (401), payment/credit errors (402), or server errors (500, 502, 503, 504). Once switched, the fallback is used for the rest of the run. [Example](https://github.com/browser-use/browser-use/blob/main/examples/features/fallback_model.py)

### Actions & Behavior

* `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: `5`): Maximum actions per step, e.g. for form filling the agent can output 4 fields at once. We execute the actions until the page changes.
* `max_failures` (default: `5`): Maximum retries for steps with errors
* `final_response_after_failure` (default: `True`): If True, attempt to force one final model call with intermediate output after max\_failures is reached
* `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. [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. [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. [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
* `include_attributes`: List of HTML attributes to include in page analysis

### Performance & Limits

* `max_history_items`: Maximum number of last steps to keep in the LLM memory. If `None`, we keep all steps.
* `llm_timeout` (default: `None`): Timeout in seconds for LLM calls. When omitted, the agent selects a model-dependent timeout of 30, 75, or 90 seconds
* `step_timeout` (default: `180`): Timeout in seconds for each step
* `directly_open_url` (default: `True`): If we detect a url in the task, we directly open it.

### Advanced Options

* `calculate_cost` (default: `False`): Calculate and track API costs
* `display_files_in_done_text` (default: `True`): Show file information in completion messages

### Backwards Compatibility

* `controller`: Alias for `tools` for backwards compatibility.
* `browser_session`: Alias for `browser` for backwards compatibility.

***

## Environment Variables

These environment variables can be used to tune agent and browser behavior without code changes. They are particularly useful for debugging, slow networks, or deployment-level tuning.

### Agent Timeouts

| Variable                    | Default | Description                                                                                       |
| --------------------------- | ------- | ------------------------------------------------------------------------------------------------- |
| `TIMEOUT_AgentEventBusStop` | `3.0`   | Timeout in seconds for the agent's event bus to finish processing pending events during shutdown. |

### Browser Action Timeouts

| Variable                            | Default | Description                                       |
| ----------------------------------- | ------- | ------------------------------------------------- |
| `TIMEOUT_NavigateToUrlEvent`        | `30.0`  | Timeout for page navigation                       |
| `TIMEOUT_ClickElementEvent`         | `15.0`  | Timeout for clicking elements                     |
| `TIMEOUT_ClickCoordinateEvent`      | `15.0`  | Timeout for clicking at coordinates               |
| `TIMEOUT_TypeTextEvent`             | `60.0`  | Timeout for typing text (longer for large inputs) |
| `TIMEOUT_ScrollEvent`               | `8.0`   | Timeout for scrolling                             |
| `TIMEOUT_ScrollToTextEvent`         | `15.0`  | Timeout for scrolling to find text                |
| `TIMEOUT_SendKeysEvent`             | `60.0`  | Timeout for sending keyboard shortcuts            |
| `TIMEOUT_UploadFileEvent`           | `30.0`  | Timeout for file uploads                          |
| `TIMEOUT_GetDropdownOptionsEvent`   | `15.0`  | Timeout for fetching dropdown options             |
| `TIMEOUT_SelectDropdownOptionEvent` | `8.0`   | Timeout for selecting dropdown option             |
| `TIMEOUT_GoBackEvent`               | `15.0`  | Timeout for browser back navigation               |
| `TIMEOUT_GoForwardEvent`            | `15.0`  | Timeout for browser forward navigation            |
| `TIMEOUT_RefreshEvent`              | `15.0`  | Timeout for page refresh                          |
| `TIMEOUT_WaitEvent`                 | `60.0`  | Timeout for explicit wait actions                 |
| `TIMEOUT_ScreenshotEvent`           | `15.0`  | Timeout for taking screenshots                    |
| `TIMEOUT_BrowserStateRequestEvent`  | `30.0`  | Timeout for fetching browser state/DOM            |

### Browser Lifecycle Timeouts

| Variable                        | Default | Description                              |
| ------------------------------- | ------- | ---------------------------------------- |
| `TIMEOUT_BrowserStartEvent`     | `30.0`  | Timeout for starting browser session     |
| `TIMEOUT_BrowserStopEvent`      | `45.0`  | Timeout for stopping browser session     |
| `TIMEOUT_BrowserLaunchEvent`    | `30.0`  | Timeout for launching browser process    |
| `TIMEOUT_BrowserKillEvent`      | `30.0`  | Timeout for killing browser process      |
| `TIMEOUT_BrowserConnectedEvent` | `30.0`  | Timeout for CDP connection               |
| `TIMEOUT_BrowserStoppedEvent`   | `30.0`  | Timeout for browser stopped confirmation |
| `TIMEOUT_BrowserErrorEvent`     | `30.0`  | Timeout for browser error events         |

### Tab Management Timeouts

| Variable                         | Default | Description                     |
| -------------------------------- | ------- | ------------------------------- |
| `TIMEOUT_SwitchTabEvent`         | `10.0`  | Timeout for switching tabs      |
| `TIMEOUT_CloseTabEvent`          | `10.0`  | Timeout for closing tabs        |
| `TIMEOUT_TabCreatedEvent`        | `30.0`  | Timeout for tab creation events |
| `TIMEOUT_TabClosedEvent`         | `10.0`  | Timeout for tab closed events   |
| `TIMEOUT_AgentFocusChangedEvent` | `10.0`  | Timeout for focus change events |
| `TIMEOUT_TargetCrashedEvent`     | `10.0`  | Timeout for crash events        |

### Navigation Event Timeouts

| Variable                          | Default | Description                            |
| --------------------------------- | ------- | -------------------------------------- |
| `TIMEOUT_NavigationStartedEvent`  | `30.0`  | Timeout for navigation started events  |
| `TIMEOUT_NavigationCompleteEvent` | `30.0`  | Timeout for navigation complete events |

### Storage & Download Timeouts

| Variable                          | Default | Description                             |
| --------------------------------- | ------- | --------------------------------------- |
| `TIMEOUT_SaveStorageStateEvent`   | `45.0`  | Timeout for saving cookies/localStorage |
| `TIMEOUT_StorageStateSavedEvent`  | `30.0`  | Timeout for storage save confirmation   |
| `TIMEOUT_LoadStorageStateEvent`   | `45.0`  | Timeout for loading storage state       |
| `TIMEOUT_StorageStateLoadedEvent` | `30.0`  | Timeout for storage load confirmation   |
| `TIMEOUT_FileDownloadedEvent`     | `30.0`  | Timeout for file download events        |

### Example Usage

```bash theme={null}
# Increase timeouts for slow network or complex pages
export TIMEOUT_NavigateToUrlEvent=30.0
export TIMEOUT_TypeTextEvent=120.0
export TIMEOUT_BrowserStateRequestEvent=60.0

# Increase agent shutdown timeout
export TIMEOUT_AgentEventBusStop=10.0
```
