Skip to main content
page.agent runs Skyvern’s agents against the page you already have open, then returns control to your script on the same page.

page.agent.run_task

Run a task in the context of this page and wait for it to finish.
Parameters
str
required
Natural language description of the task to perform.
RunEngine
The engine that runs the task. Defaults to skyvern_v1 ("skyvern-1.0"), suited to simple, single-goal tasks. skyvern_v3 ("skyvern-3.0") is the newest engine; the REST API and the Python SDK accept it, but the published TypeScript client’s type does not list it yet. skyvern_v2 remains for existing 2.0 runs. openai_cua and anthropic_cua use OpenAI’s and Anthropic’s computer-use models; ui_tars and yutori_navigator are also accepted.Default: RunEngine.skyvern_v1
dict[str, Any] | None
LLM model configuration options.Default: None
str | None
URL to navigate to. If not provided, uses the current page URL.Default: None
str | None
URL to receive webhook notifications about task progress.Default: None · TypeScript: webhookUrl
str | None
Identifier for TOTP (Time-based One-Time Password) authentication.Default: None · TypeScript: totpIdentifier
str | None
URL to fetch TOTP codes from.Default: None · TypeScript: totpUrl
str | None
Human-readable title for this task run.Default: None
dict[str, str] | None
Mapping of error codes to custom error messages.Default: None · TypeScript: errorCodeMapping
dict[str, Any] | str | None
Schema defining what data to extract from the page.Default: None · TypeScript: dataExtractionSchema
int | None
Maximum number of steps the agent can take.Default: None · TypeScript: maxSteps
float
Maximum time in seconds to wait for task completion.Default: 1800
str | None
Custom user agent string to use.Default: None · Python only
Returns TaskRunResponse · TypeScript Promise<TaskRunResponse> — TaskRunResponse containing the task execution results.
Example

page.agent.login

Run a login task in the context of this page and wait for it to finish. This method has multiple overloaded signatures for different credential types:
  1. Skyvern credentials (default):
  2. Bitwarden credentials:
  3. 1Password credentials:
  4. Azure Vault credentials:
Parameters
CredentialType | str
Type of credential store to use. Defaults to CredentialType.skyvern.Default: CredentialType.skyvern · TypeScript: credentialType (required)
str | None
URL to navigate to for login. If not provided, uses the current page URL.Default: None
str | None
ID of the Skyvern credential to use (required for skyvern credential_type).Default: None · TypeScript: credentialId
str | None
Bitwarden collection ID (optional for bitwarden credential_type).Default: None · TypeScript: bitwardenCollectionId
str | None
Bitwarden item ID (required for bitwarden credential_type).Default: None · TypeScript: bitwardenItemId
str | None
1Password vault ID (required for onepassword credential_type).Default: None · TypeScript: onepasswordVaultId
str | None
1Password item ID (required for onepassword credential_type).Default: None · TypeScript: onepasswordItemId
str | None
Azure Vault name (required for azure_vault credential_type).Default: None · TypeScript: azureVaultName
str | None
Azure Vault username key (required for azure_vault credential_type).Default: None · TypeScript: azureVaultUsernameKey
str | None
Azure Vault password key (required for azure_vault credential_type).Default: None · TypeScript: azureVaultPasswordKey
str | None
Azure Vault TOTP secret key (optional for azure_vault credential_type).Default: None · TypeScript: azureVaultTotpSecretKey
str | None
Additional instructions for the login process.Default: None
str | None
URL to receive webhook notifications about login progress.Default: None · TypeScript: webhookUrl
str | None
Identifier for TOTP authentication.Default: None · TypeScript: totpIdentifier
str | None
URL to fetch TOTP codes from.Default: None · TypeScript: totpUrl
dict[str, str] | None
Additional HTTP headers to include in requests.Default: None · TypeScript: extraHttpHeaders
float
Maximum time in seconds to wait for login completion.Default: 1800
Returns WorkflowRunResponse · TypeScript Promise<WorkflowRunResponse> — WorkflowRunResponse containing the login workflow execution results.
Example

page.agent.download_files

Run a file download task in the context of this page and wait for it to finish.
Parameters
str
required
Instructions for navigating to and downloading the file.
str | None
URL to navigate to for file download. If not provided, uses the current page URL.Default: None
str | None
Complete filename for the downloaded file. Supports {{ original_filename }} to keep the name the site gave the file.Default: None · TypeScript: downloadSuffix
float | None
Timeout in seconds for the download operation.Default: None · TypeScript: downloadTimeout
int | None
Maximum number of steps to execute.Default: None · TypeScript: maxStepsPerRun
str | None
URL to receive webhook notifications about download progress.Default: None · TypeScript: webhookUrl
str | None
Identifier for TOTP authentication.Default: None · TypeScript: totpIdentifier
str | None
URL to fetch TOTP codes from.Default: None · TypeScript: totpUrl
dict[str, str] | None
Additional HTTP headers to include in requests.Default: None · TypeScript: extraHttpHeaders
float
Maximum time in seconds to wait for download completion.Default: 1800
Returns WorkflowRunResponse · TypeScript Promise<WorkflowRunResponse> — WorkflowRunResponse containing the file download workflow execution results.
Example

page.agent.run_workflow

Run a workflow in the context of this page and wait for it to finish.
Parameters
str
required
ID of the workflow to execute.TypeScript: workflowId
dict[str, Any] | None
Dictionary of parameters to pass to the workflow.Default: None
bool | None
Whether this is a workflow template.Default: None
str | None
Human-readable title for this workflow run.Default: None
str | None
URL to receive webhook notifications about workflow progress.Default: None · TypeScript: webhookUrl
str | None
URL to fetch TOTP codes from.Default: None · TypeScript: totpUrl
str | None
Identifier for TOTP authentication.Default: None · TypeScript: totpIdentifier
int | None
Timeout this workflow run after the configured elapsed runtime in minutes.Default: None · Python only
dict[str, str] | None
String key/value metadata to attach to this workflow run.Default: None · Python only
float
Maximum time in seconds to wait for workflow completion.Default: 1800
Returns WorkflowRunResponse · TypeScript Promise<WorkflowRunResponse> — WorkflowRunResponse containing the workflow execution results.
Example