Skip to main content

Overview

Natural language or Playwright. Describe the task; the AI navigates, clicks, fills forms, extracts data. Output files (extracted data, downloads, screenshots) are returned automatically. For full tool parameters and schemas, see the browser-automation server reference.

Tools

All browser automation tools are on the /browser-automation server path. Use Browser Operator (natural language) by default. Use Playwright for precise programmatic control.

Browser Operator

Step 1: Start the task

Response:

Step 2: Poll for completion

Call this every 3-5 seconds. While running, you’ll get "status": "RUNNING". When finished: Completed response:

Step 3: Download the files

Every file in the files array has a signed S3 URL:

File Output

Browser automation automatically captures three categories of files: All files are returned in a unified files array on completion. Each file includes:
  • url — Signed S3 URL (valid for ~1 hour)
  • fileName — Original filename
  • mimeType — File type
  • size — File size in bytes
  • source — How the file was generated

Parameters Reference

Browser Operator (operator_run)

Writing Good Tasks

The task parameter is the most important input. Write it as a single line with specific instructions: Good examples:
Bad examples (too vague):

Playwright: Code-Based Automation

For precise programmatic control, use Playwright. A page variable is pre-configured — you don’t need to launch a browser.

Start a Playwright task

Then poll with browser-automation_playwright_run_continue using the sessionId, exactly like the Browser Operator flow.

Saving files from Playwright

Return this structure from your code to save files:
Browser downloads (clicking download links) are automatically captured — no special code needed.

Reusing Saved Logins

For sites that require authentication, you can reuse saved login contexts instead of re-authenticating each time.

List available logins

Response:

Use a saved login

Pass the id as the useContextService parameter:
The browser session starts already logged in — no credentials in your task description.

Caching

Browser Operator supports intelligent caching to avoid redundant executions:
  • cacheKey (required) — A unique 8-character alphanumeric string that identifies this task variant. Generate a new cacheKey whenever you change the task text.
  • disableCache — Set to true to bypass the cache and force a fresh execution.
  • cacheDurationDays — How long cached results remain valid (1-30 days, default: 7).
Caching is automatically disabled if the task contains the word “screenshot” (cached screenshots wouldn’t reflect current page state).

Complete Python Example

Requires: pip install requests

Using Browser Automation in Workflows

Browser automation works inside Pinkfish workflows (see Workflows). The key pattern: put the entire run + poll + file saving loop in a single node function.