> ## 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.

# Workspaces & files

> Persist files across V4 runs and conversations.

A **workspace** stores files that can be restored into later V4 runs, including
runs in a different session. Use it for inputs, scripts, and generated files.

A session holds the conversation; a workspace holds files; a profile holds
browser login state. Their IDs are different. Create and reuse workspaces
through API V4. A V3 workspace ID is not a V4 workspace ID.

Workspace files are synchronized to storage between runs. This is not a live
shared filesystem between simultaneous sessions: finish one writer before
starting another run that needs its changes.

<img src="https://mintcdn.com/browseruse-0aece648/BCDzEtKfFmujvTtJ/cloud/images/v4-workspaces-light.svg?fit=max&auto=format&n=BCDzEtKfFmujvTtJ&q=85&s=3fae6fde0b7d2962b3fddeef34e7e29c" alt="Two independent sessions reading and writing people.csv, script.py, and output.json in one persistent workspace" noZoom className="block dark:hidden" width="1200" height="480" data-path="cloud/images/v4-workspaces-light.svg" />

<img src="https://mintcdn.com/browseruse-0aece648/BCDzEtKfFmujvTtJ/cloud/images/v4-workspaces-dark.svg?fit=max&auto=format&n=BCDzEtKfFmujvTtJ&q=85&s=d8f7380564247c9138a587d0935d7c43" alt="Two independent sessions reading and writing people.csv, script.py, and output.json in one persistent workspace" noZoom className="hidden dark:block" width="1200" height="480" data-path="cloud/images/v4-workspaces-dark.svg" />

## Upload and attach a file

<CodeGroup>
  ```python Python theme={null}
  from browser_use_sdk.v4 import BrowserUse

  client = BrowserUse()
  workspace = client.workspaces.create(name="research")
  client.workspaces.upload(workspace.id, "people.csv")

  run = client.runs.create(
      "Find everyone in the CSV who works at Google",
      workspace_id=workspace.id,
  )
  ```

  ```typescript TypeScript theme={null}
  import { BrowserUse } from "browser-use-sdk/v4";

  const client = new BrowserUse();
  const workspace = await client.workspaces.create({
    name: "research",
  });
  await client.workspaces.upload(
    workspace.id,
    "people.csv",
  );

  const run = await client.runs.create({
    task: "Find everyone in the CSV who works at Google",
    model: "grok-4.5",
    workspaceId: workspace.id,
  });
  ```
</CodeGroup>

V4 restores files uploaded to that workspace under `uploads/` when a run uses
its `workspaceId`. You do not need to repeat their IDs in `attachedFileIds`.

Staged attachments are different: attach their IDs when creating the run.
Files attached to a session remain available to its follow-ups. An explicitly
attached staged file takes precedence over a workspace upload with the same
stored filename. For a new conversation that needs persistent files, pass the
same `workspaceId`; reusing a workspace does not copy conversation history.

## Retrieve created files

Ask the agent to save its output, wait for the run to finish, then list the workspace:

<CodeGroup>
  ```python Python theme={null}
  result = client.runs.wait_for_completion(run.id)
  files = client.workspaces.files(
      workspace.id,
      include_urls=True,
  )
  for file in files.files:
      print(file.path, file.url)
  ```

  ```typescript TypeScript theme={null}
  const result = await client.runs.waitForCompletion(run.id);
  const files = await client.workspaces.files(
    workspace.id,
    { includeUrls: true },
  );
  for (const file of files.files) {
    console.log(file.path, file.url);
  }
  ```
</CodeGroup>

Download URLs expire after 60 seconds. See the [workspace API
reference](/cloud/api-v4/workspaces/list-workspace-files) for pagination and
limits.

## Storage and upload limits

Check `GET /api/v4/workspaces/{workspace_id}/size` for `usedBytes` and
`maxBytes`. The current V4 upload allowance is 950 MiB per workspace for every
account, with 50 MiB per file. It leaves room for runtime files on the agent's
1 GiB persistent disk. An upload quota is separate from the number of
workspaces you can create, and from temporary disk used by a running agent.

A 413 response means a file or workspace limit was exceeded. Remove unneeded
files, split large files, or use a fresh workspace. Do not retry an unchanged
oversized upload. Deleting a session, archiving a workspace, and deleting a
workspace are different operations; archiving is not a file-deletion request.

Download a file promptly or request a fresh URL when its link expires. A
short-lived download URL does not mean the stored file expires after 60 seconds.
