Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Browserbase

Scalekit connector
Open markdown

The Browserbase connector lets your AI agent act in each user's Browserbase account. Each user connects their own Browserbase API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 38 tools.

Tools
38
What they doRead · write · destructive
22 · 12 · 422 read12 write4 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Browserbase connection

    In AgentKit > Connections, create a Browserbase connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'browserbase'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Browserbase:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'browserbase_list_agent_runs',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Browserbase credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • browserbase_get_agentGet one Browserbase custom agent by ID.Read-only

    Get Agent

    Get one Browserbase custom agent by ID. Returns its agentId, name, systemPrompt, resultSchema, createdAt and updatedAt. Use this to read an agent's instructions. Use browserbase_list_agents to find agent IDs.

    Inputs

    agent_idstringrequired
    ID of the agent, from the agentId field returned by browserbase_create_agent or browserbase_list_agents. Example: a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
  • browserbase_get_agent_runGet one Browserbase agent run by ID.Read-only

    Get Agent Run

    Get one Browserbase agent run by ID. Returns its runId, agentId, task, status (PENDING, RUNNING, COMPLETED, FAILED, STOPPED, TIMED_OUT or PAUSED), sessionId, result, cause, and created, started and ended times; result is present once the run has finished. Use this to poll a run started with browserbase_run_agent. Use browserbase_list_agent_run_messages for its step-by-step messages.

    Inputs

    run_idstringrequired
    ID of the agent run, from the runId field returned by browserbase_run_agent or browserbase_list_agent_runs. Example: 5d6e7f80-91a2-4b3c-9d4e-5f6a7b8c9d0e
  • browserbase_get_contextGet one Browserbase context by ID.Read-only

    Get Context

    Get one Browserbase context by ID. Returns the context's id, name, projectId, createdAt and updatedAt. Use this to check that a context exists before passing it to browserbase_create_session. Browserbase has no endpoint that lists contexts.

    Inputs

    context_idstringrequired
    ID of the Browserbase context, as returned in the id field by browserbase_create_context. Example: 2b7e4c1a-9d3f-4e58-b6a0-7c8d9e0f1a2b
  • browserbase_get_downloadGet the metadata of one file a Browserbase session downloaded.Read-only

    Get Download

    Get the metadata of one file a Browserbase session downloaded. Returns id, sessionId, filename, mimeType, size, checksum (SHA-256) and createdAt. The file's contents are not returned. Use this to check one download. Use browserbase_list_session_downloads to find download IDs.

    Inputs

    download_idstringrequired
    ID of the download, from the id field returned by browserbase_list_session_downloads. Example: 9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d
  • browserbase_get_extensionGet one Chrome extension uploaded to Browserbase.Read-only

    Get Extension

    Get one Chrome extension uploaded to Browserbase. Returns its id, fileName, projectId, createdAt and updatedAt. Use this to check an extension before passing its ID as extension_id to browserbase_create_session.

    Inputs

    extension_idstringrequired
    ID of a Chrome extension uploaded to Browserbase (uploads happen outside this connector, for example with the Browserbase SDK). Example: 4c3b2a19-0817-4f6e-9d5c-4b3a29180716
  • browserbase_get_functionGet one Browserbase Function by ID.Read-only

    Get Function

    Get one Browserbase Function by ID. Returns its id, projectId, name, createdAt and updatedAt. Use this to check a function before invoking it. Use browserbase_list_functions to find function IDs.

    Inputs

    function_idstringrequired
    ID of the Browserbase Function, from browserbase_list_functions. Example: 0f1e2d3c-4b5a-4968-8776-655443322110
  • browserbase_get_function_invocationGet one Browserbase Function invocation by ID.Read-only

    Get Function Invocation

    Get one Browserbase Function invocation by ID. Returns its id, functionId, versionId, sessionId, region, params, status (PENDING, RUNNING, COMPLETED or FAILED), results, and created, started, ended and expiry times, and cause when it failed. Use this to poll an invocation started with browserbase_invoke_function and read its results. Use browserbase_get_function_invocation_logs for its log output.

    Inputs

    invocation_idstringrequired
    ID of the function invocation, from the id field returned by browserbase_invoke_function. Example: 7e6d5c4b-3a29-4180-9f7e-6d5c4b3a2918
  • browserbase_get_function_invocation_logsGet the log output of one Browserbase Function invocation.Read-only

    Get Function Invocation Logs

    Get the log output of one Browserbase Function invocation. Returns logs (each with message and timestamp) and total. Use this to debug an invocation. Use browserbase_get_function_invocation for its status and results.

    Inputs

    invocation_idstringrequired
    ID of the function invocation, from the id field returned by browserbase_invoke_function. Example: 7e6d5c4b-3a29-4180-9f7e-6d5c4b3a2918