Skip to main content
Run a complete AI task in the context of the current page.
result = await page.agent.run_task(
    "Fill out the contact form and submit it",
    data_extraction_schema={
        "type": "object",
        "properties": {
            "confirmation_number": {"type": "string"},
        },
    },
)
print(result.output)
ParameterTypeRequiredDescription
promptstr / stringYesNatural language task description.
engineRunEngineNoAI engine to use. Default: skyvern_v1.
modeldict / Record<string, unknown>NoLLM model configuration.
urlstr / stringNoURL to navigate to. Defaults to current page URL.
data_extraction_schema / dataExtractionSchemadict | strNoJSON schema for output.
max_steps / maxStepsint / numberNoMaximum AI steps.
timeoutfloat / numberNoMax wait time in seconds. Default: 1800.
webhook_url / webhookUrlstr / stringNoWebhook URL for notifications.
totp_identifier / totpIdentifierstr / stringNoTOTP identifier.
totp_url / totpUrlstr / stringNoTOTP URL.
titlestr / stringNoRun display name.
user_agentstr / stringNoCustom User-Agent header for the browser.
error_code_mapping / errorCodeMappingdict / Record<string, string>NoCustom error code mapping.
Returns TaskRunResponse.