Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Browserless

Scalekit connector
Open markdown

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

Tools
36
What they doRead · write · destructive
20 · 9 · 720 read9 write7 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 Browserless connection

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

    Each user opens the link once and enters their Browserless 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
  • browserless_agent_run_getGet one agent run: its status, the latest result and step rationales, and the full turn transcript.Read-only

    Get Agent Run

    Get one agent run: its status, the latest result and step rationales, and the full turn transcript. Returns status (for example running, succeeded, failed or needs_human), the structured result and the transcript. Use this to poll a run started by browserless_agent_run_create.

    Inputs

    run_idstringrequired
    Agent run ID returned by browserless_agent_run_create or browserless_agent_runs_list. Example: ar_5d2e9f1c8b3a.
  • browserless_agent_runs_listList your Browserless agent runs, newest first, with a short preview of each.Read-only

    List Agent Runs

    List your Browserless agent runs, newest first, with a short preview of each. Returns run summaries with id, status and preview, plus a cursor for the next page. Use this to find a run id. Use browserless_agent_run_get for the full result.

    Inputs

    cursorstring
    Pagination cursor: the nextCursor value from the previous page. Example: eyJpZCI6ImNfN2YzYSJ9.
    limitinteger
    Maximum runs to return. Example: 20.
    statusstring
    Only return jobs with this status, for example running, completed, failed or cancelled. Example: completed.
  • browserless_batch_scrape_getGet the progress of a batch scrape job and a page of its results.Read-only

    Get Batch Scrape

    Get the progress of a batch scrape job and a page of its results. Returns status, counters and per-page results with content URLs, plus a next link that pages with skip. Use this to poll a job started by browserless_batch_scrape_create.

    Inputs

    batch_idstringrequired
    Batch scrape job ID returned by browserless_batch_scrape_create. Example: b_19c4e8a2f760.
    skipinteger
    Number of page results to skip, for paging through results. Use the next link from the previous response. Example: 0.
  • browserless_browser_pages_listList the open tabs of a running Browserless browser.Read-only

    List Browser Tabs

    List the open tabs of a running Browserless browser. Returns each tab's targetId, URL and title, plus a view-only live URL per tab when mint is true. Use this to pick a target_id for browserless_live_url_create.

    Inputs

    browser_idstringrequired
    ID of a running browser, for example the session or browser ID returned by browserless_session_create. Example: 9a8b7c6d-5e4f-3a2b-1c0d-ef9876543210.
    mintboolean
    Also create a view-only live URL for each tab. Example: false.
  • browserless_contentLoad a URL (or raw HTML) in a headless Chromium browser, run its JavaScript and return the fully rendered HTML.Read-only

    Get Rendered HTML

    Load a URL (or raw HTML) in a headless Chromium browser, run its JavaScript and return the fully rendered HTML. Returns the page's HTML as text, not JSON. Use this when you need the exact DOM. Use browserless_smart_scrape for clean markdown.

    Inputs

    best_attemptboolean
    Carry on when a wait (navigation, selector, event) fails or times out instead of returning an error. Example: true.
    block_adsboolean
    Block ads and trackers while the page loads. Example: true.
    cookiesarray
    Cookies to set before loading the page. Each needs name, value and a domain or url. Example: [{"name": "session", "value": "abc123", "domain": "example.com"}]
    extra_http_headersobject
    Extra HTTP headers sent with every request the page makes, as name-value pairs. Example: {"Accept-Language": "en-US"}
    goto_optionsobject
    Navigation options: waitUntil (load, domcontentloaded, networkidle0 or networkidle2), timeout in milliseconds and referer. Example: {"waitUntil": "networkidle2", "timeout": 30000}
    htmlstring
    Raw HTML to render instead of loading a URL. Send url or html. Example: <html><body><h1>Hello</h1></body></html>.
    proxystring
    Route the browser through Browserless's built-in proxy network. residential is best against bot detection; datacenter is cheaper. Uses proxy units on your plan. Example: residential.one of residentialdatacenter
    proxy_countrystring
    Two-letter country code for the proxy exit, used together with proxy. Example: us.
    reject_resource_typesarray
    Resource types to block, for example image, media, font or stylesheet, to speed up loading. Example: ["image", "media", "font"]
    set_javascript_enabledboolean
    Run the page's JavaScript. Defaults to true. Example: true.
    timeoutinteger
    Overall request timeout in milliseconds. Defaults to your plan's limit. Example: 60000.
    urlstring
    Page URL to load (http or https). Send url or html. Example: https://example.com.
    wait_for_selectorobject
    Wait for a CSS selector before continuing: selector, plus optional timeout (ms), visible and hidden. Example: {"selector": "#results", "timeout": 10000}
    wait_for_timeoutinteger
    Extra milliseconds to wait after the page loads. Example: 1000.
  • browserless_crawl_getGet the status of one crawl job and a page of its scraped results.Read-only

    Get Crawl

    Get the status of one crawl job and a page of its scraped results. Returns status, progress counters, per-page metadata with content URLs, and a next link that pages with skip. Use this to poll a crawl started by browserless_crawl_create.

    Inputs

    crawl_idstringrequired
    Crawl job ID returned by browserless_crawl_create or browserless_crawls_list. Example: c_7f3a2b91e4d5.
    skipinteger
    Number of page results to skip, for paging through results. Use the next link from the previous response. Example: 0.
  • browserless_crawls_listList the crawl jobs in your Browserless account, newest first.Read-only

    List Crawls

    List the crawl jobs in your Browserless account, newest first. Returns crawl summaries with id, status, progress counters and timestamps, plus nextCursor. Use this to find a crawl id. Use browserless_crawl_get for its pages.

    Inputs

    cursorstring
    Pagination cursor: the nextCursor value from the previous page. Example: eyJpZCI6ImNfN2YzYSJ9.
    limitinteger
    Maximum crawls to return. Example: 20.
    statusstring
    Only return jobs with this status, for example running, completed, failed or cancelled. Example: completed.
  • browserless_live_url_getGet the status of a live URL and, once finished, how it ended (for example the viewer clicked Done).Read-only

    Get Live URL Status

    Get the status of a live URL and, once finished, how it ended (for example the viewer clicked Done). Returns the live URL status and completion reason. Use this to wait for a person to finish a step in a live URL.

    Inputs

    browser_idstringrequired
    ID of a running browser, for example the session or browser ID returned by browserless_session_create. Example: 9a8b7c6d-5e4f-3a2b-1c0d-ef9876543210.
    live_idstringrequired
    Live URL ID returned by browserless_live_url_create. Example: lv_3e8d1a6f.