Skip to content

Automate browser based workflows with AI

9.8 KB
Raw Blame

Reference

client.getWorkflowVersions(workflowPermanentId, { ...params }) -> Skyvern.Workflow[]

πŸ“ Description

Get all versions of a workflow by its permanent ID.

πŸ”Œ Usage

await client.getWorkflowVersions("workflow_permanent_id", {
    template: true
});

βš™οΈ Parameters

workflowPermanentId: string

request: Skyvern.GetWorkflowVersionsRequest

requestOptions: SkyvernClient.RequestOptions

Artifacts

client.artifacts.getArtifactContent(artifactId) -> unknown

πŸ“ Description

Download the raw content of an artifact (supports bundled artifacts).

πŸ”Œ Usage

await client.artifacts.getArtifactContent("artifact_id");

βš™οΈ Parameters

artifactId: string

requestOptions: Artifacts.RequestOptions

Scripts

client.scripts.runScript(scriptId) -> unknown

πŸ“ Description

Run a script

πŸ”Œ Usage

await client.scripts.runScript("s_abc123");

βš™οΈ Parameters

scriptId: string β€” The unique identifier of the script

requestOptions: Scripts.RequestOptions

Schedules

client.schedules.listAll({ ...params }) -> Skyvern.OrganizationScheduleListResponse

πŸ”Œ Usage

await client.schedules.listAll({
    page: 1,
    page_size: 1,
    status: "active",
    search: "search"
});

βš™οΈ Parameters

request: Skyvern.SchedulesListAllRequest

requestOptions: Schedules.RequestOptions

client.schedules.list(workflowPermanentId) -> Skyvern.WorkflowScheduleListResponse

πŸ”Œ Usage

await client.schedules.list("workflow_permanent_id");

βš™οΈ Parameters

workflowPermanentId: string

requestOptions: Schedules.RequestOptions

client.schedules.create(workflowPermanentId, { ...params }) -> Skyvern.WorkflowScheduleResponse

πŸ“ Description

Create a cron, fixed-interval or one-time schedule that runs the given agent automatically with a fixed set of parameters. An interval schedule first runs at first_fire_at, or one interval after creation. A one-time schedule runs once at run_at. Returns the stored schedule and its next upcoming run times.

πŸ”Œ Usage

await client.schedules.create("workflow_permanent_id", {
    timezone: "timezone"
});

βš™οΈ Parameters

workflowPermanentId: string

request: Skyvern.WorkflowScheduleUpsertRequest

requestOptions: Schedules.RequestOptions

client.schedules.get(workflowPermanentId, workflowScheduleId) -> Skyvern.WorkflowScheduleResponse

πŸ“ Description

Fetch one schedule belonging to an agent. Returns the schedule's cron expression or interval, timezone, parameters, enabled state, and next upcoming run times.

πŸ”Œ Usage

await client.schedules.get("workflow_permanent_id", "workflow_schedule_id");

βš™οΈ Parameters

workflowPermanentId: string

workflowScheduleId: string

requestOptions: Schedules.RequestOptions

client.schedules.update(workflowPermanentId, workflowScheduleId, { ...params }) -> Skyvern.WorkflowScheduleResponse

πŸ“ Description

Replace a schedule's cron expression, interval or one-time run_at, timezone, run parameters, and enabled state. A one-time schedule stays one-time and can change only until it fires; afterwards this returns 409. Returns the updated schedule and its next upcoming run times.

πŸ”Œ Usage

await client.schedules.update("workflow_permanent_id", "workflow_schedule_id", {
    timezone: "timezone"
});

βš™οΈ Parameters

workflowPermanentId: string

workflowScheduleId: string

request: Skyvern.WorkflowScheduleUpsertRequest

requestOptions: Schedules.RequestOptions

client.schedules.delete(workflowPermanentId, workflowScheduleId) -> Skyvern.DeleteScheduleResponse

πŸ”Œ Usage

await client.schedules.delete("workflow_permanent_id", "workflow_schedule_id");

βš™οΈ Parameters

workflowPermanentId: string

workflowScheduleId: string

requestOptions: Schedules.RequestOptions

client.schedules.enable(workflowPermanentId, workflowScheduleId) -> Skyvern.WorkflowScheduleResponse

πŸ”Œ Usage

await client.schedules.enable("workflow_permanent_id", "workflow_schedule_id");

βš™οΈ Parameters

workflowPermanentId: string

workflowScheduleId: string

requestOptions: Schedules.RequestOptions

client.schedules.disable(workflowPermanentId, workflowScheduleId) -> Skyvern.WorkflowScheduleResponse

πŸ”Œ Usage

await client.schedules.disable("workflow_permanent_id", "workflow_schedule_id");

βš™οΈ Parameters

workflowPermanentId: string

workflowScheduleId: string

requestOptions: Schedules.RequestOptions

client.schedules.cancel(workflowPermanentId, workflowScheduleId) -> Skyvern.WorkflowScheduleResponse

πŸ“ Description

Cancel a one-time schedule that has not fired yet. The schedule stays readable with dispatch_status canceled. Returns 409 once it has fired or was already canceled, and 422 for a recurring schedule.

πŸ”Œ Usage

await client.schedules.cancel("workflow_permanent_id", "workflow_schedule_id");

βš™οΈ Parameters

workflowPermanentId: string

workflowScheduleId: string

requestOptions: Schedules.RequestOptions

Agents

client.agents.resetWorkflowBrowserProfile(workflowPermanentId) -> void

πŸ“ Description

Clear the persisted browser profile for a workflow that uses Save & Reuse Session. The next run will start from a fresh browser state. Use when a saved profile is corrupted.

πŸ”Œ Usage

await client.agents.resetWorkflowBrowserProfile("wpid_123");

βš™οΈ Parameters

workflowPermanentId: string β€” The permanent ID of the workflow. Starts with wpid_.

requestOptions: Agents.RequestOptions