Skip to main content
Agents are saved, multi-step automations (called workflows in older SDK versions and in method names). Agent IDs start with wpid_; agent run IDs start with wr_. Every method here also accepts request_options (Python) or a final requestOptions argument (TypeScript) to override the timeout, retries or headers for one call; see request options.

Run an agent

run_workflow

Run an agent
Parameters Returns WorkflowRunResponse · TypeScript Promise<WorkflowRunResponse>
Example

retry_workflow_run

Retry a workflow run using the original run parameters.
Parameters Returns WorkflowRunResponse · TypeScript Promise<WorkflowRunResponse>
Example

Manage agents

create_workflow

Create a new agent
Parameters Returns Workflow · TypeScript Promise<Workflow>
Example

get_workflow

Get an agent by id
Parameters Returns Workflow · TypeScript Promise<Workflow>
Example

get_workflows

Get all workflows with the latest version for the organization. Search semantics:
  • If search_key is provided, its value is used as a unified search term for workflows.title, folders.title, and workflow parameter metadata (key, description, and default_value for WorkflowParameterModel).
  • Falls back to deprecated title (title-only search) if search_key is not provided.
  • Parameter metadata search excludes soft-deleted parameter rows across all parameter tables.
Parameters Returns list[Workflow] · TypeScript Promise<Workflow[]>
Example

get_workflow_versions

Get all versions of a workflow by its permanent ID.
Parameters Returns list[Workflow] · TypeScript Promise<Workflow[]>
Example

update_workflow

Update an agent
Parameters Returns Workflow · TypeScript Promise<Workflow>
Example

delete_workflow

Delete an agent
Parameters Returns Any \| None · TypeScript Promise<unknown> Example

Agent runs

get_workflow_runs

List workflow runs across all workflows for the current organization. Results are paginated and can be filtered by status, search_key, and error_code. All filters are combined with AND logic — a run must match every supplied filter to be returned. search_key A case-insensitive substring search that matches against any of the following fields: Soft-deleted parameter definitions are excluded from key/description matching. A run is returned if any of the fields above contain the search term. error_code An exact-match filter against the error_code field inside each task’s errors JSON array. A run matches if any of its tasks contains an error object with a matching error_code value. Error codes are user-defined strings set during workflow execution (e.g. INVALID_CREDENTIALS, LOGIN_FAILED, CAPTCHA_DETECTED). Combining filters All query parameters use AND logic:
  • ?status=failed — only failed runs
  • ?status=failed&error_code=LOGIN_FAILED — failed runs and have a LOGIN_FAILED error
  • ?status=failed&error_code=LOGIN_FAILED&search_key=prod_credential — all three conditions must match
Parameters Returns list[WorkflowRun] · TypeScript Promise<WorkflowRun[]>
Example

get_workflow_runs_by_id

List runs for a specific workflow. Supports filtering by status, search_key, and error_code. All filters are combined with AND logic. search_key Case-insensitive substring search across: workflow run ID, parameter key, parameter description, run parameter value, and extra HTTP headers. Soft-deleted parameter definitions are excluded. error_code Exact-match filter on the error_code field inside each task’s errors JSON array. A run matches if any of its tasks contains an error with a matching error_code.
Parameters Returns list[WorkflowRun] · TypeScript Promise<WorkflowRun[]>
Example