Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Browser Use

Scalekit connector
Open markdown

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

Tools
19
What they doRead · write · destructive
11 · 7 · 111 read7 write1 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 Browser Use connection

    In AgentKit > Connections, create a Browser Use 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 = 'browseruse'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Browser Use:', 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: 'browseruse_list_browsers',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Browser Use 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
  • browseruse_get_browserGet a Browser Use cloud browser and its current state.Read-only

    Get Browser

    Get a Browser Use cloud browser and its current state. Returns id, status (active or stopped), cdpUrl, liveUrl, timeoutAt, startedAt, finishedAt, browserCost, proxyCost, proxyUsedMb, agentSessionId and, after it stops, recordingUrl when recording was on. Use this to check whether a browser is still running, get its connection URLs or fetch its recording. Use browseruse_list_browsers to find browser IDs.

    Inputs

    browser_idstringrequired
    ID of the cloud browser (a UUID), returned as id by browseruse_create_browser or listed by browseruse_list_browsers. Example: c4e9a1f7-5b2d-4c8e-9a3f-1d6b0e7c2a95
  • browseruse_get_runGet the full details and result of a Browser Use agent run.Read-only

    Get Run

    Get the full details and result of a Browser Use agent run. Returns the task, status, result (the agent's final answer as text), output (structured JSON when an output schema was set), error, model, token counts, totalCostUsd, sessionId and workspaceId. Use this once browseruse_get_run_status reports completed, failed or cancelled. Use browseruse_get_run_events for the step-by-step trace and browseruse_list_workspace_files for files the agent saved.

    Inputs

    run_idstringrequired
    ID of the agent run (a UUID), returned as id by browseruse_create_run or listed by browseruse_list_runs. Example: 6f1c2b9e-3d4a-4f8b-9c2e-7a5d1e0b8c34
  • browseruse_get_run_eventsRead the step-by-step event log of a Browser Use agent run, such as browser start, agent actions, tool output and the final answer.Read-only

    Get Run Events

    Read the step-by-step event log of a Browser Use agent run, such as browser start, agent actions, tool output and the final answer. Returns events (id, ts, type and data), plus nextAfter and hasMore for paging. Use this to follow progress or debug a run. Pass the nextAfter value as after to get only newer events. Use browseruse_get_run for the final result alone.

    Inputs

    run_idstringrequired
    ID of the agent run (a UUID), returned as id by browseruse_create_run or listed by browseruse_list_runs. Example: 6f1c2b9e-3d4a-4f8b-9c2e-7a5d1e0b8c34
    afterinteger
    Return only events with an id greater than this. Pass the nextAfter value from the previous response; omit or 0 to start from the beginning. Example: 42
    include_outputboolean
    Set false to leave out tool output in each event, which keeps the response small. Default true.
    limitinteger
    Maximum number of events to return. The API default is 200. Example: 100
  • browseruse_get_run_statusCheck the status of a Browser Use agent run.Read-only

    Get Run Status

    Check the status of a Browser Use agent run. Returns only status: queued, dispatching, running, completed, failed or cancelled. Use this to poll a run started by browseruse_create_run; it is cheap and fast. Use browseruse_get_run once the status is final to read the answer, cost and error.

    Inputs

    run_idstringrequired
    ID of the agent run (a UUID), returned as id by browseruse_create_run or listed by browseruse_list_runs. Example: 6f1c2b9e-3d4a-4f8b-9c2e-7a5d1e0b8c34
  • browseruse_get_sessionGet a Browser Use agent session and the state of its latest run.Read-only

    Get Session

    Get a Browser Use agent session and the state of its latest run. Returns sessionId, title, task, status and latestRunId of the latest run, workspaceId and timestamps. Use this to check whether a session is busy or idle before sending a follow-up. Use browseruse_get_run with latestRunId for the result, and browseruse_get_session_cost for spending.

    Inputs

    session_idstringrequired
    ID of the agent session (a UUID). Every run belongs to a session; it is returned as sessionId by browseruse_create_run and browseruse_get_run, and listed by browseruse_list_sessions. Example: 2b7e4c1a-9f3d-4e6b-8a2c-5d1f0e9b7a63
  • browseruse_get_session_costGet everything a Browser Use agent session has cost so far, split by source.Read-only

    Get Session Cost

    Get everything a Browser Use agent session has cost so far, split by source. Returns numRuns, llmCostUsd, searchCostUsd, browserCostUsd, proxyCostUsd, proxyUsedMb and totalCostUsd as decimal strings. Use this for the full cost of a session including browser time and proxy traffic. A run's totalCostUsd from browseruse_get_run covers model and search charges only. Costs can still rise for about 90 seconds after a run finishes and while its browser stays open.

    Inputs

    session_idstringrequired
    ID of the agent session (a UUID). Every run belongs to a session; it is returned as sessionId by browseruse_create_run and browseruse_get_run, and listed by browseruse_list_sessions. Example: 2b7e4c1a-9f3d-4e6b-8a2c-5d1f0e9b7a63
  • browseruse_list_browser_downloadsList files a Browser Use cloud browser downloaded during its session.Read-only

    List Browser Downloads

    List files a Browser Use cloud browser downloaded during its session. Returns files with path, size and lastModified, plus a download url for each when include_urls is true (valid for 15 minutes), and nextCursor and hasMore for paging. Use this to collect files saved by a browser you drove over CDP. Use browseruse_list_workspace_files for files an agent run saved.

    Inputs

    browser_idstringrequired
    ID of the cloud browser (a UUID), returned as id by browseruse_create_browser or listed by browseruse_list_browsers. Example: c4e9a1f7-5b2d-4c8e-9a3f-1d6b0e7c2a95
    cursorstring
    Pagination cursor. Pass the nextCursor value from the previous response to get the next page of downloads; omit for the first page.
    include_urlsboolean
    Set true to include a presigned download url for each file, valid for 15 minutes. Default false.
    limitinteger
    Maximum number of files to return, from 1 to 100. The API default is 50. Example: 50
  • browseruse_list_browsersList Browser Use cloud browsers in the project, optionally only active or stopped ones, those of one agent session, or those with given labels.Read-only

    List Browsers

    List Browser Use cloud browsers in the project, optionally only active or stopped ones, those of one agent session, or those with given labels. Returns browsers with id, status, liveUrl, cdpUrl, timeoutAt, startedAt, finishedAt, costs and labels, plus paging totals. Use this to find running browsers to stop or to review usage. Use browseruse_get_browser for one browser's recording URL.

    Inputs

    agent_session_idstring
    Only list browsers started by this agent session (a UUID). Example: 2b7e4c1a-9f3d-4e6b-8a2c-5d1f0e9b7a63
    metadataarray
    Only list browsers that carry every one of these labels. Use key to match any value or key=value to match exactly. Example: ["customer=acme"]
    page_numberinteger
    Page to return, starting at 1. The API default is 1. Example: 2
    page_sizeinteger
    Browsers per page, from 1 to 100. The API default is 10. Example: 20
    statusstring
    Only list browsers in this state: active (still running) or stopped.one of activestopped