---
title: Browserbase API Integration on Truto
slug: browserbase
category: Application Development
canonical: "https://truto.one/integrations/detail/browserbase/"
---

# Browserbase API Integration on Truto



**Category:** Application Development  
**Status:** Generally available

## MCP-ready AI tools

Truto exposes 52 tools for Browserbase that AI agents can call directly.

- **create_a_browserbase_session** — Create a new Browserbase session with optional browser settings, proxy configuration, region, and user metadata. Returns: id, createdAt, updatedAt, projectId, startedAt, expiresAt, proxyBytes, keepAlive, connectUrl, seleniumRemoteUrl, signingKey, endedAt, contextId, userMetadata. All body fields are optional; if projectId is omitted it is inferred from the API key. Timeout must be between 60 and…
- **list_all_browserbase_sessions** — List Browserbase sessions, optionally filtered by status or a user metadata query. Returns: id, createdAt, updatedAt, projectId, startedAt, expiresAt, proxyBytes, keepAlive, connectUrl, seleniumRemoteUrl, signingKey, endedAt, contextId, userMetadata.
- **get_single_browserbase_session_by_id** — Get a single Browserbase session by id. Returns: id, createdAt, updatedAt, projectId, startedAt, expiresAt, proxyBytes, keepAlive, connectUrl, seleniumRemoteUrl, signingKey, endedAt, contextId, userMetadata. Required: id.
- **update_a_browserbase_session_by_id** — Close or update a Browserbase session by id. Send status REQUEST_RELEASE to end the session before its timeout and avoid unnecessary usage charges. Returns: id, createdAt, updatedAt, projectId, startedAt, expiresAt, proxyBytes, keepAlive, connectUrl, seleniumRemoteUrl, signingKey, endedAt, contextId, userMetadata. Required: id, status.
- **browserbase_sessions_get_logs** — Retrieve Chrome DevTools Protocol (CDP) logs for a Browserbase session. Returns: method, pageId, sessionId, request, response, timestamp, frameId, loaderId. Required: session_id.
- **browserbase_sessions_get_debug_urls** — Get live debug URLs for a Browserbase session, including the debugger URL, fullscreen debugger URL, per-page debug URLs, and the WebSocket connection URL. Returns: debuggerFullscreenUrl, debuggerUrl, pages, wsUrl. Required: session_id.
- **browserbase_sessions_get_recording** — Get the rrweb recording events for a Browserbase session. Returns an array of event objects, each containing: data, sessionId, timestamp, type. Required: session_id.
- **browserbase_sessions_get_replays** — Get replay page metadata for a Browserbase session. Returns a list of pages (each with pageId, url, startTimeMs, endTimeMs) and a pageCount. Required: session_id.
- **browserbase_sessions_get_replay_page** — Get an HLS VOD media playlist (.m3u8) for a specific page of a Browserbase session replay. Returns the raw m3u8 playlist string. Required: session_id, page_id.
- **create_a_browserbase_session_recording_download** — Enqueue recording downloads (MP4) for a Browserbase session. Returns: downloads, statusCode, error, message. Required: session_id. Poll the list endpoint to check download completion status.
- **list_all_browserbase_session_recording_downloads** — List per-page recording download status for a Browserbase session, with a short-lived signed URL for each completed page on standard (non-BYOS) projects. Returns: downloads, statusCode, error, message. Required: session_id.
- **create_a_browserbase_session_upload** — Upload a file to a Browserbase session for use during the browser session. Returns: message. Required: session_id, file.
- **create_a_browserbase_context** — Create a Browserbase context for uploading a custom user-data-directory. Returns: id, uploadUrl, publicKey, cipherAlgorithm, initializationVectorSize. Accepts an optional projectId (inferred from the API key if omitted).
- **get_single_browserbase_context_by_id** — Get a single Browserbase context by id. Returns: id, createdAt, updatedAt, projectId. Required: id.
- **update_a_browserbase_context_by_id** — Update a Browserbase context by id, refreshing the upload URL and encryption credentials for the user-data-directory. Returns: id, uploadUrl, publicKey, cipherAlgorithm, initializationVectorSize. Required: id.
- **delete_a_browserbase_context_by_id** — Delete a Browserbase context by id. Returns an empty 204 response on success. Required: id.
- **list_all_browserbase_projects** — List Browserbase projects. Returns: id, createdAt, updatedAt, name, ownerId, defaultTimeout, concurrency. Max 1000 per page.
- **get_single_browserbase_project_by_id** — Get a single Browserbase project by id. Returns: id, createdAt, updatedAt, name, ownerId, defaultTimeout, concurrency. Required: id.
- **browserbase_projects_get_usage** — Get usage statistics for a Browserbase project. Returns: browserMinutes, proxyBytes. Required: project_id.
- **create_a_browserbase_agent** — Create a new reusable Browserbase agent with a system prompt and optional result schema. Returns: agentId, name, createdAt, updatedAt, systemPrompt, resultSchema. Required: name.
- **list_all_browserbase_agents** — List Browserbase agents across your account, filterable by creation time. Returns: agentId, name, createdAt, updatedAt, systemPrompt, resultSchema.
- **get_single_browserbase_agent_by_id** — Get a single Browserbase agent by id. Returns: agentId, name, createdAt, updatedAt, systemPrompt, resultSchema. Required: id.
- **update_a_browserbase_agent_by_id** — Update an existing Browserbase agent by id. Only the fields provided in the body are modified; omitted fields are left unchanged. Returns: agentId, name, createdAt, updatedAt, systemPrompt, resultSchema. Required: id.
- **delete_a_browserbase_agent_by_id** — Delete a Browserbase agent by id. Runs that already referenced this agent are unaffected. Returns an empty 204 response on success. Required: id.
- **create_a_browserbase_agent_run** — Create a Browserbase agent run from a natural language task. Returns the created run in PENDING state including runId, task, status, createdAt, updatedAt, agentId, sessionId, sandboxId, resultSchema, result, cause, startedAt, and endedAt. Required: task.
- **list_all_browserbase_agent_runs** — List Browserbase agent runs with optional filtering by status, agent ID, and creation time range. Returns: runId, task, status, createdAt, updatedAt, agentId, sessionId, sandboxId, resultSchema, result, cause, startedAt, endedAt.
- **get_single_browserbase_agent_run_by_id** — Get a single Browserbase agent run by id. Returns the full run object including runId, task, status, createdAt, updatedAt, sessionId, result, cause, startedAt, and endedAt. Required: id.
- **browserbase_agent_runs_list_messages** — List messages produced by a Browserbase agent run in chronological order with oldest messages first. Returns: id, createdAt, message, runId, task, updatedAt, agentId, sessionId, sandboxId, resultSchema, result, cause, startedAt, endedAt. Required: run_id.
- **browserbase_agent_runs_stop** — Stop an in-progress Browserbase agent run by run_id. Returns the run object including runId, task, status, createdAt, updatedAt, sessionId, and result. Required: run_id. Stopping a run that has already finished returns a conflict.
- **browserbase_certificates_upload** — Upload a PEM-encoded CA certificate file to a Browserbase project via multipart form data. Browserbase validates that the file is a parseable PEM certificate at upload time (up to 100 MB). Returns: id, createdAt, updatedAt, projectId. Required: file.
- **list_all_browserbase_certificates** — List all certificates in Browserbase. Returns: id, createdAt, updatedAt, projectId. Max 1000 per page.
- **get_single_browserbase_certificate_by_id** — Get a single Browserbase certificate by id. Returns: id, createdAt, updatedAt, projectId. Required: id.
- **delete_a_browserbase_certificate_by_id** — Delete a Browserbase certificate by id. Returns an empty 204 response on success. Required: id.
- **browserbase_extensions_upload** — Upload a browser extension file to Browserbase as multipart form data. Returns: id, createdAt, updatedAt, fileName, projectId. Required: file.
- **get_single_browserbase_extension_by_id** — Get a single Browserbase extension by id. Returns: id, createdAt, updatedAt, fileName, projectId. Required: id.
- **delete_a_browserbase_extension_by_id** — Delete a Browserbase extension by id. Returns an empty 204 response on success. Required: id.
- **list_all_browserbase_downloads** — List Browserbase downloads for a session, with optional filters by filename, MIME type, file size, and creation date. Returns: id, sessionId, filename, mimeType, size, checksum, createdAt. Required: sessionId. Max 100 per page.
- **get_single_browserbase_download_by_id** — Get a single Browserbase download by id. Returns: id, sessionId, filename, mimeType, size, checksum, createdAt. Required: id.
- **delete_a_browserbase_download_by_id** — Delete a Browserbase download by id, removing the file from storage and marking it as deleted. Returns an empty 204 response on success. Required: id.
- **list_all_browserbase_functions** — List Browserbase functions. Returns: id, projectId, name, createdAt, updatedAt. Max 100 per page.
- **get_single_browserbase_function_by_id** — Get a single Browserbase function by id. Returns: id, projectId, name, createdAt, updatedAt. Required: id.
- **browserbase_functions_invoke** — Invoke a Browserbase function by id, triggering asynchronous execution with optional parameters and session creation settings. Returns: id, projectId, functionId, versionId, sessionId, status, createdAt, updatedAt, startedAt, expiresAt, region, params, results, endedAt. Required: function_id.
- **list_all_browserbase_function_versions** — List Browserbase function versions for a given function. Returns: id, projectId, functionId, functionBuildId, createdAt, updatedAt, sessionCreateParams, userParamsSchema. Required: function_id. Max 100 per page.
- **get_single_browserbase_function_version_by_id** — Get a single Browserbase function version by id. Returns: id, projectId, functionId, functionBuildId, createdAt, updatedAt, sessionCreateParams, userParamsSchema. Required: id.
- **browserbase_function_versions_list_invocations** — List invocations for a Browserbase function version. Returns each invocation's id, projectId, functionId, versionId, sessionId, createdAt, updatedAt, startedAt, expiresAt, region, params, results, and endedAt. Required: version_id.
- **list_all_browserbase_function_builds** — List Browserbase function builds, optionally filtered by status. Returns: id, projectId, request, status, createdAt, updatedAt, startedAt, expiresAt, endedAt, builtFunctions, cause. Max 100 per page.
- **get_single_browserbase_function_build_by_id** — Get a single Browserbase function build by id. Returns: id, projectId, request, status, createdAt, updatedAt, startedAt, expiresAt, endedAt, builtFunctions, cause. Required: id.
- **browserbase_function_builds_get_logs** — Get build logs for a Browserbase function build. Returns: logs, total. Required: build_id.
- **get_single_browserbase_function_invocation_by_id** — Get a Browserbase function invocation by id. Returns the full invocation object including id, projectId, functionId, versionId, sessionId, status, createdAt, updatedAt, startedAt, expiresAt, region, params, results, endedAt, and cause. Required: id.
- **browserbase_function_invocations_get_logs** — Get execution logs for a Browserbase function invocation. Returns an object containing the logs array (each entry has a message and timestamp) and the total count of log entries. Required: invocation_id.
- **browserbase_fetch_fetch_page** — Fetch a page through Browserbase's proxy infrastructure and retrieve the response content in raw, JSON, or markdown format. Returns: id, statusCode, headers, content, contentType, encoding. Required: url.
- **browserbase_search_web_search** — Search the web via Browserbase. Returns: requestId, query, results. Required: query. Query length 1–200 characters; numResults range 1–25 (default 10).

## How it works

1. **Link your customer's Browserbase account.** Use Truto's frontend SDK; we handle every OAuth and API key flow so you don't need to create the OAuth app.
2. **Authentication is automatic.** Truto refreshes tokens, stores credentials securely, and injects them into every API request.
3. **Call Truto's API to reach Browserbase.** The Proxy API is a 1-to-1 mapping of the Browserbase API.
4. **Get a unified response format.** Every response uses a single shape, with cursor-based pagination and data in the `result` field.

## Use cases

- **Give AI copilots real web browsing powers** — Let your end users connect their own Browserbase account so your AI product can execute natural-language web tasks — logging into portals, navigating pages, and returning structured JSON — without you operating browser infrastructure.
- **Automate workflows on sites without APIs** — Offer your workflow or RPA users a native 'Web Action' step that runs Playwright/Puppeteer scripts in managed cloud browsers, so they can automate any vendor dashboard, admin portal, or legacy tool that lacks a public API.
- **Add auditable session replays to automated tasks** — For compliance, QA, or support automation products, surface MP4 recordings and rrweb replays of every browser session directly in your UI so end users can review exactly what the automation saw and did.
- **Persist end-user logins securely across runs** — Use Browserbase Contexts on behalf of each customer to store cookies and localStorage, so recurring scrapes and automations skip login screens and 2FA challenges after the first successful auth.
- **Ship LLM-ready web fetch and search as a feature** — Expose one-click web search and page-to-Markdown fetching inside your product, powered by your user's Browserbase key, so their LLM prompts always have fresh, clean, scrape-resistant context.

## What you can build

- **Natural-language web agent runs** — Let users define an agent with a task prompt and a JSON result schema, kick off runs, stream messages, and retrieve structured output — all from inside your product.
- **Managed browser session orchestration** — Create, list, inspect, and update Browserbase sessions on demand, with live debug WebSocket URLs surfaced in your UI for real-time troubleshooting.
- **Session replay viewer** — Embed MP4 recordings, rrweb event streams, and replay pages directly in your dashboard so users can audit every automated browsing session.
- **Persistent auth contexts per end user** — Create and reuse Browserbase Contexts to keep each customer's cookies and login state isolated and warm across sessions.
- **Serverless browser function runner** — Let users invoke Browserbase Functions (Playwright/Puppeteer scripts) as workflow steps, track versions and builds, and pull invocation logs back into your product for observability.
- **One-call web search and page fetch tool** — Ship an LLM tool that performs web search and returns cleaned Markdown or DOM from any URL, with uploads, downloads, extensions, and certificates supported for advanced scenarios.

## FAQs

### How do end users authenticate their Browserbase account?

End users connect by providing their Browserbase API key and project ID. Truto stores and injects these credentials per connected account, so each of your customers' requests hit their own Browserbase workspace.

### Which Browserbase resources can I manage through this integration?

You get tool-level access to Sessions (create, list, get, update, logs, debug URLs, recordings, replays, downloads, uploads), Contexts, Projects and usage, Agents and Agent Runs (including messages and stop), Certificates, Extensions, Downloads, Functions (with versions, builds, invocations, and logs), plus web fetch and search.

### Can I capture video or event-stream recordings of automated sessions?

Yes. Use the session recording, replays, replay page, and recording download tools to retrieve rrweb event streams and downloadable MP4s that you can render inside your own UI.

### Does this integration support running custom Playwright or Puppeteer code?

Yes. You can list and invoke Browserbase Functions, inspect function versions and builds, and pull build and invocation logs — so your users can run arbitrary browser automation scripts as part of your product.

### How do I keep users logged in across multiple browser runs?

Create a Browserbase Context per end user (or per site) with the context tools, then pass the context ID when creating a session. Cookies and localStorage persist securely across runs, avoiding repeated logins.

### How do I retrieve results from an AI agent task?

Create an agent with a task and result schema, start an agent run, then poll the agent run endpoint or list messages to retrieve the structured JSON result. You can also stop a running agent via the stop tool.

## Related reading

- [Connect Browserbase to ChatGPT: Orchestrate Agents and Sessions](https://truto.one/blog/connect-browserbase-to-chatgpt-orchestrate-agents-and-sessions/) — Learn how to connect Browserbase to ChatGPT using a managed MCP server. Automate headless browser sessions, run web agents, and parse CDP logs via LLMs.
- [Connect Browserbase to Claude: Analyze Session Logs and Recordings](https://truto.one/blog/connect-browserbase-to-claude-analyze-session-logs-and-recordings/) — Learn how to connect Browserbase to Claude using a managed MCP server. Automate browser sessions, analyze CDP logs, and debug rrweb recordings via natural language.
- [Connect Browserbase to AI Agents: Run functions and fetch web content](https://truto.one/blog/connect-browserbase-to-ai-agents-run-functions-and-fetch-web-content/) — Learn how to connect Browserbase to AI agents using Truto's /tools endpoint. Fetch web content, run headless sessions, and build automated workflows safely.
