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

> ## Agent Instructions
> To act on a user's behalf in Guild, use the Guild REST API at https://api.guild.ai/v1.
> The OpenAPI spec is unauthenticated: https://docs.guild.ai/openapi.json (or openapi.yaml).
> Authenticate with an account API key, sent as HTTP Basic (key id as username, secret as password) or as `Authorization: Bearer <api_key_id>:<api_key_secret>`. See https://docs.guild.ai/api-reference/introduction#authentication.
> To run one agent on demand without account-wide access, use an API trigger instead: https://docs.guild.ai/platform/api-triggers.
> To act on Guild from an MCP client, connect to https://api.guild.ai/mcp (OAuth) or run `guild mcp` locally. Setup: https://docs.guild.ai/api-reference/mcp.
> To search these docs from an MCP client, connect to https://docs.guild.ai/mcp. The full page index is https://docs.guild.ai/llms.txt.

# Run Browserbase cloud browser sessions from Guild agents

> Connect Guild agents to Browserbase with an API key to create cloud browser sessions, fetch pages, search the web, and read session logs and recordings.

Integrations · Browserbase

Guild agents fetch web pages, search the web, and manage Browserbase cloud browser sessions, contexts, and functions. Guild stores your Browserbase API key and injects it server-side, so agent code never sees it. Credential policies decide which Browserbase operations each agent may call.

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use Browserbase.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect Browserbase to your first agent.

## What the Browserbase integration exposes

The integration is `guildai~browserbase`. Two tools return content directly: `browserbase_fetch_create` fetches a page with its headers and metadata, and `browserbase_search_web` returns structured search results. The rest manage Browserbase resources: sessions and their logs, recordings, and replays, contexts, downloads, extensions, certificates, functions and their invocations, and projects and usage. Requests go to `https://api.browserbase.com`.

## How it works

**1. Copy your Browserbase API key**

Sign in to [Browserbase](https://www.browserbase.com) and copy the API key from the dashboard.

**2. Connect the key in Guild**

Go to **Access & setup > Credentials**, click **Connect**, select **browserbase**, and paste the key into **API Key**.

**3. Import the tools you need**

Import `BrowserbaseTools` from `@guildai-services/guildai~browserbase` and use `pick()` to give the agent only the tools its job needs.

## Authentication

* **Type:** API key
* **Header:** Guild sends the key as `x-bb-api-key: <key>`

See [Credentials](https://docs.guild.ai/platform/credentials.md) for workspace, member, and agent-scoped credentials.

## Usage

```typescript theme={null}
import { BrowserbaseTools } from "@guildai-services/guildai~browserbase"
import { llmAgent, pick } from "@guildai/agents-sdk"

export default llmAgent({
  systemPrompt: "You research a topic on the web and summarize what you find, with links.",
  tools: {
    ...pick(BrowserbaseTools, [
      "browserbase_search_web",
      "browserbase_fetch_create",
    ]),
  },
})
```

Tools are named with the `browserbase_` prefix.

## Tools

Tools in the latest published version of `guildai~browserbase`:

> [accordion] All 37 tools
>
> | Tool | What it does |
> | - | - |
> | `browserbase_certificates_delete` | Certificates delete. |
> | `browserbase_certificates_get` | Certificates get. |
> | `browserbase_certificates_list` | Certificates list. |
> | `browserbase_contexts_create` | Contexts create. |
> | `browserbase_contexts_delete` | Contexts delete. |
> | `browserbase_contexts_get` | Contexts get. |
> | `browserbase_contexts_update` | Contexts update. |
> | `browserbase_downloads_delete` | Delete a download file from storage and mark as deleted. |
> | `browserbase_downloads_get` | Get download metadata (Accept: application/json) or file content (Accept: application/octet-stream). |
> | `browserbase_downloads_list` | List all downloads for a session with optional filtering and pagination. |
> | `browserbase_extensions_delete` | Extensions delete. |
> | `browserbase_extensions_get` | Extensions get. |
> | `browserbase_fetch_create` | Fetch a page and return its content, headers, and metadata. |
> | `browserbase_function_builds_get` | Function builds get. |
> | `browserbase_function_builds_get_logs` | Function builds get logs. |
> | `browserbase_function_builds_list` | Function builds list. |
> | `browserbase_functions_get` | Functions get. |
> | `browserbase_functions_invoke` | Functions invoke. |
> | `browserbase_functions_list` | Functions list. |
> | `browserbase_functions_list_versions` | Functions list versions. |
> | `browserbase_function_versions_get` | Function versions get. |
> | `browserbase_function_versions_list_invocations` | Function versions list invocations. |
> | `browserbase_invocations_get` | Invocations get. |
> | `browserbase_invocations_get_logs` | Invocations get logs. |
> | `browserbase_projects_get` | Projects get. |
> | `browserbase_projects_list` | Projects list. |
> | `browserbase_projects_usage` | Projects usage. |
> | `browserbase_search_web` | Perform a web search and return structured results. |
> | `browserbase_sessions_create` | Sessions create. |
> | `browserbase_sessions_get` | Sessions get. |
> | `browserbase_sessions_get_debug` | Sessions get debug. |
> | `browserbase_sessions_get_logs` | Sessions get logs. |
> | `browserbase_sessions_get_recording` | Sessions get recording. |
> | `browserbase_sessions_get_replay` | Returns page metadata for a session replay, including timing information and the URL of each page's HLS playlist. |
> | `browserbase_sessions_get_replay_page` | Returns an HLS VOD media playlist (.m3u8) for a specific page of a session replay. |
> | `browserbase_sessions_list` | Sessions list. |
> | `browserbase_sessions_update` | Sessions update. |

## Frequently asked questions

> [accordion] Can the agent click and type in a Browserbase session?
>
> No. `browserbase_sessions_create` starts a session and returns its connection details, but driving the page takes a Chrome DevTools Protocol client such as Playwright, which these tools don't include. Use `browserbase_fetch_create` to read a page, or deploy a Browserbase function and call it with `browserbase_functions_invoke`.

> [accordion] Do Browserbase sessions cost money when an agent forgets to close them?
>
> Yes. A session runs until it times out or you release it, and Browserbase bills for that time. Have the agent end sessions with `browserbase_sessions_update`, and set a timeout when it creates them.

> [accordion] Can I stop an agent from deleting contexts or downloads?
>
> Yes. Write a credential policy that denies the `delete` operations. See [Credential policies](https://docs.guild.ai/platform/credential-policies.md).

## Related

**Also runs on Guild:** [Firecrawl](https://docs.guild.ai/integrations/firecrawl.md) · [Pinecone](https://docs.guild.ai/integrations/pinecone.md)

**Read:** Docs: [Credential policies](https://docs.guild.ai/platform/credential-policies.md) · [Credentials](https://docs.guild.ai/platform/credentials.md) · [Tools in agents](https://docs.guild.ai/sdk/tools.md)
