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

# Browser agents

> When to reach for a browser agent, and which Browserbase products solve each use case.

Most of the web has no API. A browser agent does real work on the web where scripts break: it reasons about each page instead of following fixed selectors, so it adapts to sites that change, block bots, or hide data behind forms and JavaScript.

Browserbase is the browser agent platform. One API key gives your agent everything it needs: headless browsers, Agents, Search, Fetch, Agent Identity, Functions, and the Model Gateway.

## Agent or script?

Browser agents are a spectrum, not one thing. The decision axis is **risk versus scale**: risk pushes toward deterministic control, and scale pushes toward agency. If a wrong click costs money or fails an audit, you want a script. If you can't enumerate the sites, layouts, or workflows ahead of time, scripting becomes a losing fight and you want an agent. The [browser agent autonomy levels](https://www.browserbase.com/blog/browser-agent-autonomy-levels) post covers the full spectrum.

| Where you sit                                     | What it looks like                                                        | Browserbase tool                                                                  |
| ------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| Script owns the flow, AI handles individual steps | Deterministic code with self-healing `act` and `extract` calls            | [Stagehand](/welcome/quickstarts/stagehand)                                       |
| Script hands off to an agent for the hard steps   | A scripted backbone that calls an agent for the steps that need reasoning | [Stagehand](/welcome/quickstarts/stagehand) + [Agents](/platform/agents/overview) |
| Agent owns the loop, you ask for a result         | A fully autonomous run from a natural language goal                       | [Agents](/platform/agents/overview)                                               |

The rest of this page maps concrete technical challenges to the right tool.

## Use cases and technical solutions

| Use case                                | Browserbase solution                                                                                                                                                                  |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Automate sites that constantly change   | An [Agent](/platform/agents/overview) renders the page and reacts to popups and layout changes                                                                                        |
| Reach data behind logins and forms      | An [Agent](/platform/agents/overview) navigates and fills forms; [variables](/platform/agents/integrate-api-sdk) for inputs; [downloads](/platform/browser/files/downloads) for files |
| Extract data from JavaScript-heavy apps | A real [browser](/platform/browser/getting-started/create-browser-session) executes JavaScript so dynamic content renders                                                             |
| Pull the same data on a schedule        | [Find the underlying request](/platform/browser/observability/observability), then replay it with [Fetch](/platform/fetch/overview)                                                   |
| Run deep research across the web        | [Search](/platform/search/overview) to discover, [Fetch](/platform/fetch/overview) for cheap context, an [Agent](/platform/agents/overview) to act                                    |
| Scale across hundreds of sites          | One reusable [Agent](/platform/agents/overview) instead of N brittle scripts                                                                                                          |

### Automate sites that constantly change

Sites like squareup.com change their markup often and throw interstitials, cookie banners, and modal popups that break selector-based scripts. A browser agent reads each page and decides what to do, so it dismisses the popup, waits for the right state, and adapts when the layout shifts. For protected sites, [Agent Identity](/platform/identity/overview) gets the agent past anti-bot systems and CAPTCHAs.

Use [Agents](/platform/agents/overview) for a fully autonomous run, or [Stagehand](/welcome/quickstarts/stagehand) when you want self-healing steps inside your own code.

### Reach data behind logins and forms

When the data sits behind a login, a multi-step form, or a series of nested pages, there is no URL to fetch. A browser agent works through the flow the way a person would: it logs in, fills fields, advances steps, and opens the record. Pass dynamic inputs like URLs or instructions as [variables](/platform/agents/integrate-api-sdk) so the agent fills them without exposing them inline. When the result is a file, the agent works with it in its sandbox and you retrieve it through [Downloads](/platform/browser/files/downloads). See [managing files](/platform/agents/managing-files) for the document workflow.

### Extract data from JavaScript-heavy apps

Plenty of pages load their real content after the initial HTML, through XHR or POST calls fired by JavaScript. A plain HTTP fetch sees an empty shell. A real headless [browser session](/platform/browser/getting-started/create-browser-session) executes that JavaScript, so the dynamic content renders and an [Agent](/platform/agents/overview) can read it. Reach for [Fetch](/platform/fetch/overview) when a simple GET already returns what you need, and a browser when it does not.

### Pull the same data on a schedule

When you need the same data repeatedly, such as monitoring prices or inventory, driving the full UI on every run is slow and expensive. Drive the page once in a browser and watch the network traffic through [session observability](/platform/browser/observability/observability) to find the request that returns the data. Once you know that endpoint, replay it cheaply with the [Fetch API](/platform/fetch/overview) for repeat pulls, no browser required.

### Run deep research across the web

Research tasks combine discovery and reading. Use the [Search API](/platform/search/overview) to find relevant pages without a browser, the [Fetch API](/platform/fetch/overview) to pull page content cheaply for recon, and then hand off to a browser [Agent](/platform/agents/overview) for the pages that need interaction or structured extraction. This keeps token usage and latency low while still reaching the parts of the web that need a real browser.

### Scale across hundreds of sites

Writing and maintaining one script per site stops scaling once you reach dozens of targets that each change on their own schedule. Create one reusable [Agent](/platform/agents/overview) with a `systemPrompt` and `resultSchema` and run it across hundreds of portals instead of maintaining hundreds of scripts. Deploy it with [Functions](/platform/runtime/overview) for low-latency execution next to the browser, and scale across concurrent [browser sessions](/platform/browser/getting-started/create-browser-session) on demand.

## Agent Identity and trust

Different Agents need different levels of trust. Browserbase supports a layered identity model, so you can match the access level to your use case.

| What your Agent needs                    | How to get it                                                                                     |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------- |
| Access Browserbase browsers              | [API key](/welcome/getting-started): standard SDK authentication                                  |
| Log into third-party sites               | [1Password](/integrations/1password/introduction): secure credential access from vaults           |
| Bypass bot detection on partner sites    | [Web Bot Auth](/platform/identity/overview): Cloudflare Signed Agents                             |
| Prove it's human-backed (permissionless) | [AgentKit](/integrations/agentkit/introduction): proof-of-humanity via Tools for Humanity on x402 |

The [x402 integration](/integrations/x402/introduction) pairs well with autonomous agents: pay with crypto, prove humanity with AgentKit, and get premium Verified browsers with residential proxies.

<Card title="Agent Identity overview" icon="shield-check" iconType="sharp-solid" href="/platform/identity/overview">
  Learn about every identity layer available to your agents
</Card>

## Next steps

<CardGroup cols={3}>
  <Card title="Agents quickstart" icon="rocket" iconType="sharp-solid" href="/welcome/quickstarts/agents">
    Run your first browser agent with one API call
  </Card>

  <Card title="How it works" icon="gear" iconType="sharp-solid" href="/platform/agents/how-it-works">
    The execution loop, built-in tools, and run lifecycle
  </Card>

  <Card title="Stagehand" icon="wand-magic-sparkles" iconType="sharp-solid" href="/welcome/quickstarts/stagehand">
    The SDK for browser agents
  </Card>

  <Card title="Agent Identity" icon="shield-check" iconType="sharp-solid" href="/platform/identity/overview">
    Access any website without getting blocked
  </Card>

  <Card title="Functions" icon="function" iconType="sharp-solid" href="/platform/runtime/overview">
    Deploy and run agents on Browserbase
  </Card>

  <Card title="Model Gateway" icon="key" iconType="sharp-solid" href="/platform/model-gateway/overview">
    One API key, access to every model
  </Card>
</CardGroup>
