Skip to main content
A task is a single browser automation. You describe what you want in natural language. Skyvern opens a browser, navigates to the URL, and executes the instructions with AI. For when to use tasks vs agents, see Run a Task.
Python uses snake_case (e.g., run_task, wait_for_completion); TypeScript uses camelCase (e.g., runTask, waitForCompletion) and wraps request params in a body object. Parameter tables show Python names. TypeScript names are the camelCase equivalents.

Start a browser automation. Skyvern opens a cloud browser, navigates to the URL, and executes your prompt with AI.

Parameters

Returns TaskRunResponse

Examples

Extract structured data:
Run inside an existing browser session:
Limit cost with max_steps:
Set an engine explicitly:
Legacy: publish a V2 task as a reusable workflow:

Polling pattern

If you don’t use wait_for_completion / waitForCompletion, poll get_run / getRun manually:
For production, prefer wait_for_completion=True / waitForCompletion: true or webhooks over manual polling.

wait_for_completion / waitForCompletion

By default, run_task / runTask and run_workflow / runWorkflow return immediately after the run is queued. You get a run_id and need to poll get_run / getRun yourself. Pass wait_for_completion=True / waitForCompletion: true to have the SDK poll automatically until the run reaches a terminal state (completed, failed, terminated, timed_out, or canceled):
Supported on run_task/runTask, run_workflow/runWorkflow, and login. In TypeScript, also supported on downloadFiles.

Request options

Override timeout, retries, or headers for this call by passing request_options (Python) or a second options argument (TypeScript).