> ## Documentation Index
> Fetch the complete documentation index at: https://skyvern.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Page agent

> Run a full AI task, login, download or agent in the current page.

`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.

```python Python theme={null}
await page.agent.run_task(
    prompt: str,
    engine: RunEngine = RunEngine.skyvern_v1,
    model: dict[str, Any] | None = None,
    url: str | None = None,
    webhook_url: str | None = None,
    totp_identifier: str | None = None,
    totp_url: str | None = None,
    title: str | None = None,
    error_code_mapping: dict[str, str] | None = None,
    data_extraction_schema: dict[str, Any] | str | None = None,
    max_steps: int | None = None,
    timeout: float = 1800,
    user_agent: str | None = None,
) -> TaskRunResponse
```

```typescript TypeScript theme={null}
page.agent.runTask(prompt: string, options?: { engine?: RunEngine; model?: Record<string, unknown>; url?: string; webhookUrl?: string; totpIdentifier?: string; totpUrl?: string; title?: string; errorCodeMapping?: Record<string, string>; dataExtractionSchema?: Record<string, unknown> | string; maxSteps?: number; timeout?: number; }): Promise<TaskRunResponse>
```

**Parameters**

**prompt** `str` *required*

Natural language description of the task to perform.

**engine** `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` is also accepted.

Default: `RunEngine.skyvern_v1`

**model** `dict[str, Any] | None`

LLM model configuration options.

Default: `None`

**url** `str | None`

URL to navigate to. If not provided, uses the current page URL.

Default: `None`

**webhook\_url** `str | None`

URL to receive webhook notifications about task progress.

Default: `None` · TypeScript: `webhookUrl`

**totp\_identifier** `str | None`

Identifier for TOTP (Time-based One-Time Password) authentication.

Default: `None` · TypeScript: `totpIdentifier`

**totp\_url** `str | None`

URL to fetch TOTP codes from.

Default: `None` · TypeScript: `totpUrl`

**title** `str | None`

Human-readable title for this task run.

Default: `None`

**error\_code\_mapping** `dict[str, str] | None`

Mapping of error codes to custom error messages.

Default: `None` · TypeScript: `errorCodeMapping`

**data\_extraction\_schema** `dict[str, Any] | str | None`

Schema defining what data to extract from the page.

Default: `None` · TypeScript: `dataExtractionSchema`

**max\_steps** `int | None`

Maximum number of steps the agent can take.

Default: `None` · TypeScript: `maxSteps`

**timeout** `float`

Maximum time in seconds to wait for task completion.

Default: `1800`

**user\_agent** `str | None`

Custom user agent string to use.

Default: `None` · Python only

**Returns** `TaskRunResponse` · TypeScript `Promise<TaskRunResponse>` — TaskRunResponse containing the task execution results.

> [accordion] TaskRunResponse fields
>
> | Field | Type | Description |
> | - | - | - |
> | `run_id` | `str` | Unique identifier for this run. Run ID starts with `tsk_` for task runs and `wr_` for workflow runs. |
> | `status` | `"created" \| "queued" \| "running" \| "paused" \| "timed_out" \| "failed" \| "terminated" \| "completed" \| "canceled"` | Current status of the run |
> | `output` | `dict[str, Any \| None] \| list[Any \| None] \| str \| None` | Output data from the run, if any. Format/schema depends on the data extracted by the run. |
> | `downloaded_files` | `list[FileInfo] \| None` | List of files downloaded during the run |
> | `recording_url` | `str \| None` | URL to the recording of the run |
> | `recording_archived` | `bool \| None` | True when the recording exists but has been archived to cold storage and is not currently accessible. |
> | `screenshot_urls` | `list[str] \| None` | List of last n screenshot URLs in reverse chronological order - the first one the list is the latest screenshot. |
> | `failure_reason` | `str \| None` | Reason for failure if the run failed or terminated |
> | `created_at` | `datetime` | Timestamp when this run was created |
> | `modified_at` | `datetime` | Timestamp when this run was last modified |
> | `queued_at` | `datetime \| None` | Timestamp when this run was queued |
> | `started_at` | `datetime \| None` | Timestamp when this run started execution |
> | `finished_at` | `datetime \| None` | Timestamp when this run finished |
> | `app_url` | `str \| None` | URL to the application UI where the run can be viewed |
> | `browser_session_id` | `str \| None` | ID of the Skyvern persistent browser session used for this run |
> | `browser_profile_id` | `str \| None` | ID of the browser profile used for this run |
> | `max_screenshot_scrolls` | `int \| None` | The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot |
> | `script_run` | `ScriptRunResponse \| None` | The script run result |
> | `errors` | `list[dict[str, Any \| None]] \| None` | The errors for the run |
> | `step_count` | `int \| None` | Total number of steps executed in this run |
> | `run_request` | `TaskRunRequestOutput \| None` | The original request parameters used to start this task run |

**Example**

```python Python theme={null}
import asyncio

from skyvern import Skyvern


async def main() -> None:
    skyvern = Skyvern(api_key="YOUR_API_KEY")
    browser = await skyvern.launch_cloud_browser()
    page = await browser.get_working_page()
    await page.goto("https://example.com")
    result = await page.agent.run_task(prompt="Find the top post and return its title")
    print(result)
    await browser.close()


asyncio.run(main())
```

```typescript TypeScript theme={null}
import { Skyvern } from "@skyvern/client";

const skyvern = new Skyvern({ apiKey: "YOUR_API_KEY" });
const browser = await skyvern.launchCloudBrowser();
const page = await browser.getWorkingPage();
await page.goto("https://example.com");
const result = await page.agent.runTask("Find the top post and return its title");
console.log(result);
await browser.close();
```

***

## 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):
   ```python theme={null}
   await page.agent.login(credential_id="cred_123")
   ```

2. Bitwarden credentials:
   ```python theme={null}
   await page.agent.login(
       credential_type=CredentialType.bitwarden,
       bitwarden_collection_id="collection_id",
       bitwarden_item_id="item_id",
   )
   ```

3. 1Password credentials:
   ```python theme={null}
   await page.agent.login(
       credential_type=CredentialType.onepassword,
       onepassword_vault_id="vault_id",
       onepassword_item_id="item_id",
   )
   ```

4. Azure Vault credentials:
   ```python theme={null}
   await page.agent.login(
       credential_type=CredentialType.azure_vault,
       azure_vault_name="vault_name",
       azure_vault_username_key="username_key",
       azure_vault_password_key="password_key",
   )
   ```

```python Python theme={null}
await page.agent.login(
    *,
    credential_type: CredentialType | str = CredentialType.skyvern,
    url: str | None = None,
    credential_id: str | None = None,
    bitwarden_collection_id: str | None = None,
    bitwarden_item_id: str | None = None,
    onepassword_vault_id: str | None = None,
    onepassword_item_id: str | None = None,
    azure_vault_name: str | None = None,
    azure_vault_username_key: str | None = None,
    azure_vault_password_key: str | None = None,
    azure_vault_totp_secret_key: str | None = None,
    prompt: str | None = None,
    webhook_url: str | None = None,
    totp_identifier: str | None = None,
    totp_url: str | None = None,
    extra_http_headers: dict[str, str] | None = None,
    timeout: float = 1800,
) -> WorkflowRunResponse
```

```typescript TypeScript theme={null}
page.agent.login(credentialType: "skyvern", options: { credentialId: string; url?: string; prompt?: string; webhookUrl?: string; totpIdentifier?: string; totpUrl?: string; extraHttpHeaders?: Record<string, string>; timeout?: number; }): Promise<WorkflowRunResponse>
page.agent.login(credentialType: "bitwarden", options: { bitwardenItemId: string; bitwardenCollectionId?: string; url?: string; prompt?: string; webhookUrl?: string; totpIdentifier?: string; totpUrl?: string; extraHttpHeaders?: Record<string, string>; timeout?: number; }): Promise<WorkflowRunResponse>
page.agent.login(credentialType: "1password", options: { onepasswordVaultId: string; onepasswordItemId: string; url?: string; prompt?: string; webhookUrl?: string; totpIdentifier?: string; totpUrl?: string; extraHttpHeaders?: Record<string, string>; timeout?: number; }): Promise<WorkflowRunResponse>
page.agent.login(credentialType: "azure_vault", options: { azureVaultName: string; azureVaultUsernameKey: string; azureVaultPasswordKey: string; azureVaultTotpSecretKey?: string; url?: string; prompt?: string; webhookUrl?: string; totpIdentifier?: string; totpUrl?: string; extraHttpHeaders?: Record<string, string>; timeout?: number; }): Promise<WorkflowRunResponse>
```

**Parameters**

**credential\_type** `CredentialType | str`

Type of credential store to use. Defaults to CredentialType.skyvern.

Default: `CredentialType.skyvern` · TypeScript: `credentialType` (required)

**url** `str | None`

URL to navigate to for login. If not provided, uses the current page URL.

Default: `None`

**credential\_id** `str | None`

ID of the Skyvern credential to use (required for skyvern credential\_type).

Default: `None` · TypeScript: `credentialId`

**bitwarden\_collection\_id** `str | None`

Bitwarden collection ID (optional for bitwarden credential\_type).

Default: `None` · TypeScript: `bitwardenCollectionId`

**bitwarden\_item\_id** `str | None`

Bitwarden item ID (required for bitwarden credential\_type).

Default: `None` · TypeScript: `bitwardenItemId`

**onepassword\_vault\_id** `str | None`

1Password vault ID (required for onepassword credential\_type).

Default: `None` · TypeScript: `onepasswordVaultId`

**onepassword\_item\_id** `str | None`

1Password item ID (required for onepassword credential\_type).

Default: `None` · TypeScript: `onepasswordItemId`

**azure\_vault\_name** `str | None`

Azure Vault name (required for azure\_vault credential\_type).

Default: `None` · TypeScript: `azureVaultName`

**azure\_vault\_username\_key** `str | None`

Azure Vault username key (required for azure\_vault credential\_type).

Default: `None` · TypeScript: `azureVaultUsernameKey`

**azure\_vault\_password\_key** `str | None`

Azure Vault password key (required for azure\_vault credential\_type).

Default: `None` · TypeScript: `azureVaultPasswordKey`

**azure\_vault\_totp\_secret\_key** `str | None`

Azure Vault TOTP secret key (optional for azure\_vault credential\_type).

Default: `None` · TypeScript: `azureVaultTotpSecretKey`

**prompt** `str | None`

Additional instructions for the login process.

Default: `None`

**webhook\_url** `str | None`

URL to receive webhook notifications about login progress.

Default: `None` · TypeScript: `webhookUrl`

**totp\_identifier** `str | None`

Identifier for TOTP authentication.

Default: `None` · TypeScript: `totpIdentifier`

**totp\_url** `str | None`

URL to fetch TOTP codes from.

Default: `None` · TypeScript: `totpUrl`

**extra\_http\_headers** `dict[str, str] | None`

Additional HTTP headers to include in requests.

Default: `None` · TypeScript: `extraHttpHeaders`

**timeout** `float`

Maximum time in seconds to wait for login completion.

Default: `1800`

**Returns** `WorkflowRunResponse` · TypeScript `Promise<WorkflowRunResponse>` — WorkflowRunResponse containing the login workflow execution results.

> [accordion] WorkflowRunResponse fields
>
> | Field | Type | Description |
> | - | - | - |
> | `run_id` | `str` | Unique identifier for this run. Run ID starts with `tsk_` for task runs and `wr_` for workflow runs. |
> | `status` | `"created" \| "queued" \| "running" \| "paused" \| "timed_out" \| "failed" \| "terminated" \| "completed" \| "canceled"` | Current status of the run |
> | `output` | `dict[str, Any \| None] \| list[Any \| None] \| str \| None` | Output data from the run, if any. Format/schema depends on the data extracted by the run. |
> | `downloaded_files` | `list[FileInfo] \| None` | List of files downloaded during the run |
> | `recording_url` | `str \| None` | URL to the recording of the run |
> | `recording_archived` | `bool \| None` | True when the recording exists but has been archived to cold storage and is not currently accessible. |
> | `screenshot_urls` | `list[str] \| None` | List of last n screenshot URLs in reverse chronological order - the first one the list is the latest screenshot. |
> | `failure_reason` | `str \| None` | Reason for failure if the run failed or terminated |
> | `created_at` | `datetime` | Timestamp when this run was created |
> | `modified_at` | `datetime` | Timestamp when this run was last modified |
> | `queued_at` | `datetime \| None` | Timestamp when this run was queued |
> | `started_at` | `datetime \| None` | Timestamp when this run started execution |
> | `finished_at` | `datetime \| None` | Timestamp when this run finished |
> | `app_url` | `str \| None` | URL to the application UI where the run can be viewed |
> | `browser_session_id` | `str \| None` | ID of the Skyvern persistent browser session used for this run |
> | `browser_profile_id` | `str \| None` | ID of the browser profile used for this run |
> | `max_screenshot_scrolls` | `int \| None` | The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot |
> | `script_run` | `ScriptRunResponse \| None` | The script run result |
> | `errors` | `list[dict[str, Any \| None]] \| None` | The errors for the run |
> | `step_count` | `int \| None` | Total number of steps executed in this run |
> | `run_with` | `str \| None` | Whether the workflow run was executed with agent or code |
> | `ai_fallback` | `bool \| None` | Whether to fallback to AI if code run fails. |
> | `script_id` | `str \| None` | ID of the cached script used for this workflow run, if any. |
> | `run_request` | `WorkflowRunRequestOutput \| None` | The original request parameters used to start this workflow run |

**Example**

```python Python theme={null}
import asyncio

from skyvern import Skyvern


async def main() -> None:
    skyvern = Skyvern(api_key="YOUR_API_KEY")
    browser = await skyvern.launch_cloud_browser()
    page = await browser.get_working_page()
    await page.goto("https://example.com")
    result = await page.agent.login(credential_id="cred_123", url="https://example.com/login")
    print(result)
    await browser.close()


asyncio.run(main())
```

```typescript TypeScript theme={null}
import { Skyvern } from "@skyvern/client";

const skyvern = new Skyvern({ apiKey: "YOUR_API_KEY" });
const browser = await skyvern.launchCloudBrowser();
const page = await browser.getWorkingPage();
await page.goto("https://example.com");
const result = await page.agent.login("skyvern", {
    credentialId: "cred_123",
    url: "https://example.com/login",
});
console.log(result);
await browser.close();
```

***

## page.agent.download\_files

Run a file download task in the context of this page and wait for it to finish.

```python Python theme={null}
await page.agent.download_files(
    prompt: str,
    *,
    url: str | None = None,
    download_suffix: str | None = None,
    download_timeout: float | None = None,
    max_steps_per_run: int | None = None,
    webhook_url: str | None = None,
    totp_identifier: str | None = None,
    totp_url: str | None = None,
    extra_http_headers: dict[str, str] | None = None,
    timeout: float = 1800,
) -> WorkflowRunResponse
```

```typescript TypeScript theme={null}
page.agent.downloadFiles(prompt: string, options?: { url?: string; downloadSuffix?: string; downloadTimeout?: number; maxStepsPerRun?: number; webhookUrl?: string; totpIdentifier?: string; totpUrl?: string; extraHttpHeaders?: Record<string, string>; timeout?: number; }): Promise<WorkflowRunResponse>
```

**Parameters**

**prompt** `str` *required*

Instructions for navigating to and downloading the file.

**url** `str | None`

URL to navigate to for file download. If not provided, uses the current page URL.

Default: `None`

**download\_suffix** `str | None`

Complete filename for the downloaded file. Supports \{\{ original\_filename }} to keep the name the site gave the file.

Default: `None` · TypeScript: `downloadSuffix`

**download\_timeout** `float | None`

Timeout in seconds for the download operation.

Default: `None` · TypeScript: `downloadTimeout`

**max\_steps\_per\_run** `int | None`

Maximum number of steps to execute.

Default: `None` · TypeScript: `maxStepsPerRun`

**webhook\_url** `str | None`

URL to receive webhook notifications about download progress.

Default: `None` · TypeScript: `webhookUrl`

**totp\_identifier** `str | None`

Identifier for TOTP authentication.

Default: `None` · TypeScript: `totpIdentifier`

**totp\_url** `str | None`

URL to fetch TOTP codes from.

Default: `None` · TypeScript: `totpUrl`

**extra\_http\_headers** `dict[str, str] | None`

Additional HTTP headers to include in requests.

Default: `None` · TypeScript: `extraHttpHeaders`

**timeout** `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.

> [accordion] WorkflowRunResponse fields
>
> | Field | Type | Description |
> | - | - | - |
> | `run_id` | `str` | Unique identifier for this run. Run ID starts with `tsk_` for task runs and `wr_` for workflow runs. |
> | `status` | `"created" \| "queued" \| "running" \| "paused" \| "timed_out" \| "failed" \| "terminated" \| "completed" \| "canceled"` | Current status of the run |
> | `output` | `dict[str, Any \| None] \| list[Any \| None] \| str \| None` | Output data from the run, if any. Format/schema depends on the data extracted by the run. |
> | `downloaded_files` | `list[FileInfo] \| None` | List of files downloaded during the run |
> | `recording_url` | `str \| None` | URL to the recording of the run |
> | `recording_archived` | `bool \| None` | True when the recording exists but has been archived to cold storage and is not currently accessible. |
> | `screenshot_urls` | `list[str] \| None` | List of last n screenshot URLs in reverse chronological order - the first one the list is the latest screenshot. |
> | `failure_reason` | `str \| None` | Reason for failure if the run failed or terminated |
> | `created_at` | `datetime` | Timestamp when this run was created |
> | `modified_at` | `datetime` | Timestamp when this run was last modified |
> | `queued_at` | `datetime \| None` | Timestamp when this run was queued |
> | `started_at` | `datetime \| None` | Timestamp when this run started execution |
> | `finished_at` | `datetime \| None` | Timestamp when this run finished |
> | `app_url` | `str \| None` | URL to the application UI where the run can be viewed |
> | `browser_session_id` | `str \| None` | ID of the Skyvern persistent browser session used for this run |
> | `browser_profile_id` | `str \| None` | ID of the browser profile used for this run |
> | `max_screenshot_scrolls` | `int \| None` | The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot |
> | `script_run` | `ScriptRunResponse \| None` | The script run result |
> | `errors` | `list[dict[str, Any \| None]] \| None` | The errors for the run |
> | `step_count` | `int \| None` | Total number of steps executed in this run |
> | `run_with` | `str \| None` | Whether the workflow run was executed with agent or code |
> | `ai_fallback` | `bool \| None` | Whether to fallback to AI if code run fails. |
> | `script_id` | `str \| None` | ID of the cached script used for this workflow run, if any. |
> | `run_request` | `WorkflowRunRequestOutput \| None` | The original request parameters used to start this workflow run |

**Example**

```python Python theme={null}
import asyncio

from skyvern import Skyvern


async def main() -> None:
    skyvern = Skyvern(api_key="YOUR_API_KEY")
    browser = await skyvern.launch_cloud_browser()
    page = await browser.get_working_page()
    await page.goto("https://example.com")
    result = await page.agent.download_files(prompt="Download the latest invoice")
    print(result)
    await browser.close()


asyncio.run(main())
```

```typescript TypeScript theme={null}
import { Skyvern } from "@skyvern/client";

const skyvern = new Skyvern({ apiKey: "YOUR_API_KEY" });
const browser = await skyvern.launchCloudBrowser();
const page = await browser.getWorkingPage();
await page.goto("https://example.com");
const result = await page.agent.downloadFiles("Download the latest invoice");
console.log(result);
await browser.close();
```

***

## page.agent.run\_workflow

Run a workflow in the context of this page and wait for it to finish.

```python Python theme={null}
await page.agent.run_workflow(
    workflow_id: str,
    parameters: dict[str, Any] | None = None,
    template: bool | None = None,
    title: str | None = None,
    webhook_url: str | None = None,
    totp_url: str | None = None,
    totp_identifier: str | None = None,
    max_elapsed_time_minutes: int | None = None,
    run_metadata: dict[str, str] | None = None,
    timeout: float = 1800,
) -> WorkflowRunResponse
```

```typescript TypeScript theme={null}
page.agent.runWorkflow(workflowId: string, options?: { parameters?: Record<string, unknown>; template?: boolean; title?: string; webhookUrl?: string; totpUrl?: string; totpIdentifier?: string; timeout?: number; }): Promise<WorkflowRunResponse>
```

**Parameters**

**workflow\_id** `str` *required*

ID of the workflow to execute.

TypeScript: `workflowId`

**parameters** `dict[str, Any] | None`

Dictionary of parameters to pass to the workflow.

Default: `None`

**template** `bool | None`

Whether this is a workflow template.

Default: `None`

**title** `str | None`

Human-readable title for this workflow run.

Default: `None`

**webhook\_url** `str | None`

URL to receive webhook notifications about workflow progress.

Default: `None` · TypeScript: `webhookUrl`

**totp\_url** `str | None`

URL to fetch TOTP codes from.

Default: `None` · TypeScript: `totpUrl`

**totp\_identifier** `str | None`

Identifier for TOTP authentication.

Default: `None` · TypeScript: `totpIdentifier`

**max\_elapsed\_time\_minutes** `int | None`

Timeout this workflow run after the configured elapsed runtime in minutes.

Default: `None` · Python only

**run\_metadata** `dict[str, str] | None`

String key/value metadata to attach to this workflow run.

Default: `None` · Python only

**timeout** `float`

Maximum time in seconds to wait for workflow completion.

Default: `1800`

**Returns** `WorkflowRunResponse` · TypeScript `Promise<WorkflowRunResponse>` — WorkflowRunResponse containing the workflow execution results.

> [accordion] WorkflowRunResponse fields
>
> | Field | Type | Description |
> | - | - | - |
> | `run_id` | `str` | Unique identifier for this run. Run ID starts with `tsk_` for task runs and `wr_` for workflow runs. |
> | `status` | `"created" \| "queued" \| "running" \| "paused" \| "timed_out" \| "failed" \| "terminated" \| "completed" \| "canceled"` | Current status of the run |
> | `output` | `dict[str, Any \| None] \| list[Any \| None] \| str \| None` | Output data from the run, if any. Format/schema depends on the data extracted by the run. |
> | `downloaded_files` | `list[FileInfo] \| None` | List of files downloaded during the run |
> | `recording_url` | `str \| None` | URL to the recording of the run |
> | `recording_archived` | `bool \| None` | True when the recording exists but has been archived to cold storage and is not currently accessible. |
> | `screenshot_urls` | `list[str] \| None` | List of last n screenshot URLs in reverse chronological order - the first one the list is the latest screenshot. |
> | `failure_reason` | `str \| None` | Reason for failure if the run failed or terminated |
> | `created_at` | `datetime` | Timestamp when this run was created |
> | `modified_at` | `datetime` | Timestamp when this run was last modified |
> | `queued_at` | `datetime \| None` | Timestamp when this run was queued |
> | `started_at` | `datetime \| None` | Timestamp when this run started execution |
> | `finished_at` | `datetime \| None` | Timestamp when this run finished |
> | `app_url` | `str \| None` | URL to the application UI where the run can be viewed |
> | `browser_session_id` | `str \| None` | ID of the Skyvern persistent browser session used for this run |
> | `browser_profile_id` | `str \| None` | ID of the browser profile used for this run |
> | `max_screenshot_scrolls` | `int \| None` | The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot |
> | `script_run` | `ScriptRunResponse \| None` | The script run result |
> | `errors` | `list[dict[str, Any \| None]] \| None` | The errors for the run |
> | `step_count` | `int \| None` | Total number of steps executed in this run |
> | `run_with` | `str \| None` | Whether the workflow run was executed with agent or code |
> | `ai_fallback` | `bool \| None` | Whether to fallback to AI if code run fails. |
> | `script_id` | `str \| None` | ID of the cached script used for this workflow run, if any. |
> | `run_request` | `WorkflowRunRequestOutput \| None` | The original request parameters used to start this workflow run |

**Example**

```python Python theme={null}
import asyncio

from skyvern import Skyvern


async def main() -> None:
    skyvern = Skyvern(api_key="YOUR_API_KEY")
    browser = await skyvern.launch_cloud_browser()
    page = await browser.get_working_page()
    await page.goto("https://example.com")
    result = await page.agent.run_workflow(workflow_id="wpid_123")
    print(result)
    await browser.close()


asyncio.run(main())
```

```typescript TypeScript theme={null}
import { Skyvern } from "@skyvern/client";

const skyvern = new Skyvern({ apiKey: "YOUR_API_KEY" });
const browser = await skyvern.launchCloudBrowser();
const page = await browser.getWorkingPage();
await page.goto("https://example.com");
const result = await page.agent.runWorkflow("wpid_123");
console.log(result);
await browser.close();
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.