Skip to content

Automate browser based workflows with AI

Update API specifications with fern api update (#5346)

Shuchang Zheng18811a7175fa
diff --git a/fern/openapi/skyvern_openapi.json b/fern/openapi/skyvern_openapi.json
index 2627a9d2a..5a64fddc3 100644
--- a/fern/openapi/skyvern_openapi.json
+++ b/fern/openapi/skyvern_openapi.json
@@ -3907,6 +3907,69 @@
}
}
}
+ },
+ "/v1/sdk/run_action": {
+ "post": {
+ "tags": [
+ "SDK"
+ ],
+ "summary": "Run an SDK action",
+ "description": "Execute a single SDK action with the specified parameters",
+ "operationId": "run_sdk_action_v1_sdk_run_action_post",
+ "parameters": [
+ {
+ "name": "x-api-key",
+ "in": "header",
+ "required": false,
+ "schema": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.",
+ "title": "X-Api-Key"
+ },
+ "description": "Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings."
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RunSdkActionRequest"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RunSdkActionResponse"
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HTTPValidationError"
+ }
+ }
+ }
+ }
+ },
+ "x-fern-sdk-method-name": "run_sdk_action"
+ }
}
},
"components": {
@@ -4015,6 +4078,41 @@
],
"title": "AWSSecretParameterYAML"
},
+ "ActAction": {
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "ai_act",
+ "title": "Type",
+ "default": "ai_act"
+ },
+ "intention": {
+ "type": "string",
+ "title": "Intention",
+ "description": "Natural language prompt for the action",
+ "default": ""
+ },
+ "data": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Data",
+ "description": "Additional context data"
+ }
+ },
+ "type": "object",
+ "title": "ActAction",
+ "description": "AI act action parameters."
+ },
"Action": {
"properties": {
"action_type": {
@@ -6353,6 +6451,60 @@
"title": "BrowserSessionResponse",
"description": "Response model for browser session information."
},
+ "ClickAction": {
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "ai_click",
+ "title": "Type",
+ "default": "ai_click"
+ },
+ "selector": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Selector",
+ "description": "CSS selector for the element",
+ "default": ""
+ },
+ "intention": {
+ "type": "string",
+ "title": "Intention",
+ "description": "The intention or goal of the click",
+ "default": ""
+ },
+ "data": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Data",
+ "description": "Additional context data"
+ },
+ "timeout": {
+ "type": "number",
+ "title": "Timeout",
+ "description": "Timeout in milliseconds",
+ "default": 10000
+ }
+ },
+ "type": "object",
+ "title": "ClickAction",
+ "description": "Click action parameters."
+ },
"ClickContext": {
"properties": {
"thought": {
@@ -7742,6 +7894,88 @@
],
"title": "Extensions"
},
+ "ExtractAction": {
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "extract",
+ "title": "Type",
+ "default": "extract"
+ },
+ "prompt": {
+ "type": "string",
+ "title": "Prompt",
+ "description": "Extraction prompt",
+ "default": ""
+ },
+ "extract_schema": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "items": {},
+ "type": "array"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Extract Schema",
+ "description": "Schema for extraction"
+ },
+ "error_code_mapping": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Error Code Mapping",
+ "description": "Error code mapping for extraction"
+ },
+ "intention": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Intention",
+ "description": "The intention or goal of the extraction"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Data",
+ "description": "Additional context data"
+ }
+ },
+ "type": "object",
+ "title": "ExtractAction",
+ "description": "Extract data action parameters."
+ },
"ExtractionBlock": {
"properties": {
"label": {
@@ -10776,19 +11010,15 @@
"type": "object",
"title": "InputOrSelectContext"
},
- "JinjaBranchCriteria": {
+ "InputTextAction": {
"properties": {
- "criteria_type": {
- "type": "string",
- "const": "jinja2_template",
- "title": "Criteria Type",
- "default": "jinja2_template"
- },
- "expression": {
+ "type": {
"type": "string",
- "title": "Expression"
+ "const": "ai_input_text",
+ "title": "Type",
+ "default": "ai_input_text"
},
- "description": {
+ "selector": {
"anyOf": [
{
"type": "string"
@@ -10797,24 +11027,11 @@
"type": "null"
}
],
- "title": "Description"
- }
- },
- "type": "object",
- "required": [
- "expression"
- ],
- "title": "JinjaBranchCriteria",
- "description": "Jinja2-templated branch criteria (only supported criteria type for now)."
- },
- "LoginBlock": {
- "properties": {
- "label": {
- "type": "string",
- "title": "Label",
- "description": "Author-facing identifier for a block; unique within a workflow."
+ "title": "Selector",
+ "description": "CSS selector for the element",
+ "default": ""
},
- "next_block_label": {
+ "value": {
"anyOf": [
{
"type": "string"
@@ -10823,25 +11040,21 @@
"type": "null"
}
],
- "title": "Next Block Label",
- "description": "Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted."
+ "title": "Value",
+ "description": "Value to input",
+ "default": ""
},
- "block_type": {
+ "intention": {
"type": "string",
- "const": "login",
- "title": "Block Type",
- "default": "login"
- },
- "output_parameter": {
- "$ref": "#/components/schemas/OutputParameter"
- },
- "continue_on_failure": {
- "type": "boolean",
- "title": "Continue On Failure",
- "default": false
+ "title": "Intention",
+ "description": "The intention or goal of the input",
+ "default": ""
},
- "model": {
+ "data": {
"anyOf": [
+ {
+ "type": "string"
+ },
{
"additionalProperties": true,
"type": "object"
@@ -10850,24 +11063,155 @@
"type": "null"
}
],
- "title": "Model"
- },
- "disable_cache": {
- "type": "boolean",
- "title": "Disable Cache",
- "default": false
- },
- "next_loop_on_failure": {
- "type": "boolean",
- "title": "Next Loop On Failure",
- "default": false
- },
- "task_type": {
- "type": "string",
- "title": "Task Type",
- "default": "general"
+ "title": "Data",
+ "description": "Additional context data"
},
- "url": {
+ "totp_identifier": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Totp Identifier",
+ "description": "TOTP identifier for input_text actions"
+ },
+ "totp_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Totp Url",
+ "description": "TOTP URL for input_text actions"
+ },
+ "timeout": {
+ "type": "number",
+ "title": "Timeout",
+ "description": "Timeout in milliseconds",
+ "default": 10000
+ }
+ },
+ "type": "object",
+ "title": "InputTextAction",
+ "description": "Input text action parameters."
+ },
+ "JinjaBranchCriteria": {
+ "properties": {
+ "criteria_type": {
+ "type": "string",
+ "const": "jinja2_template",
+ "title": "Criteria Type",
+ "default": "jinja2_template"
+ },
+ "expression": {
+ "type": "string",
+ "title": "Expression"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Description"
+ }
+ },
+ "type": "object",
+ "required": [
+ "expression"
+ ],
+ "title": "JinjaBranchCriteria",
+ "description": "Jinja2-templated branch criteria (only supported criteria type for now)."
+ },
+ "LocateElementAction": {
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "locate_element",
+ "title": "Type",
+ "default": "locate_element"
+ },
+ "prompt": {
+ "type": "string",
+ "title": "Prompt",
+ "description": "Natural language prompt to locate an element",
+ "default": ""
+ }
+ },
+ "type": "object",
+ "title": "LocateElementAction",
+ "description": "Locate element action parameters."
+ },
+ "LoginBlock": {
+ "properties": {
+ "label": {
+ "type": "string",
+ "title": "Label",
+ "description": "Author-facing identifier for a block; unique within a workflow."
+ },
+ "next_block_label": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Next Block Label",
+ "description": "Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted."
+ },
+ "block_type": {
+ "type": "string",
+ "const": "login",
+ "title": "Block Type",
+ "default": "login"
+ },
+ "output_parameter": {
+ "$ref": "#/components/schemas/OutputParameter"
+ },
+ "continue_on_failure": {
+ "type": "boolean",
+ "title": "Continue On Failure",
+ "default": false
+ },
+ "model": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Model"
+ },
+ "disable_cache": {
+ "type": "boolean",
+ "title": "Disable Cache",
+ "default": false
+ },
+ "next_loop_on_failure": {
+ "type": "boolean",
+ "title": "Next Loop On Failure",
+ "default": false
+ },
+ "task_type": {
+ "type": "string",
+ "title": "Task Type",
+ "default": "general"
+ },
+ "url": {
"anyOf": [
{
"type": "string"
@@ -12859,6 +13203,53 @@
],
"title": "PrintPageBlockYAML"
},
+ "PromptAction": {
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "prompt",
+ "title": "Type",
+ "default": "prompt"
+ },
+ "prompt": {
+ "type": "string",
+ "title": "Prompt",
+ "description": "The prompt to send to the LLM"
+ },
+ "response_schema": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Response Schema",
+ "description": "Optional JSON schema to structure the response"
+ },
+ "model": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Model",
+ "description": "Optional model configuration"
+ }
+ },
+ "type": "object",
+ "required": [
+ "prompt"
+ ],
+ "title": "PromptAction",
+ "description": "Prompt action parameters."
+ },
"PromptBranchCriteria": {
"properties": {
"criteria_type": {
@@ -12952,6 +13343,130 @@
],
"title": "RunEngine"
},
+ "RunSdkActionRequest": {
+ "properties": {
+ "url": {
+ "type": "string",
+ "title": "Url",
+ "description": "The URL where the action should be executed"
+ },
+ "browser_session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Browser Session Id",
+ "description": "The browser session ID"
+ },
+ "browser_address": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Browser Address",
+ "description": "The browser address"
+ },
+ "workflow_run_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Workflow Run Id",
+ "description": "Optional workflow run ID to continue an existing workflow run"
+ },
+ "action": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ClickAction"
+ },
+ {
+ "$ref": "#/components/schemas/InputTextAction"
+ },
+ {
+ "$ref": "#/components/schemas/SelectOptionAction"
+ },
+ {
+ "$ref": "#/components/schemas/UploadFileAction"
+ },
+ {
+ "$ref": "#/components/schemas/ActAction"
+ },
+ {
+ "$ref": "#/components/schemas/ExtractAction"
+ },
+ {
+ "$ref": "#/components/schemas/LocateElementAction"
+ },
+ {
+ "$ref": "#/components/schemas/ValidateAction"
+ },
+ {
+ "$ref": "#/components/schemas/PromptAction"
+ }
+ ],
+ "title": "Action",
+ "description": "The action to execute with its specific parameters",
+ "discriminator": {
+ "propertyName": "type",
+ "mapping": {
+ "ai_act": "#/components/schemas/ActAction",
+ "ai_click": "#/components/schemas/ClickAction",
+ "ai_input_text": "#/components/schemas/InputTextAction",
+ "ai_select_option": "#/components/schemas/SelectOptionAction",
+ "ai_upload_file": "#/components/schemas/UploadFileAction",
+ "extract": "#/components/schemas/ExtractAction",
+ "locate_element": "#/components/schemas/LocateElementAction",
+ "prompt": "#/components/schemas/PromptAction",
+ "validate": "#/components/schemas/ValidateAction"
+ }
+ }
+ }
+ },
+ "type": "object",
+ "required": [
+ "url",
+ "action"
+ ],
+ "title": "RunSdkActionRequest",
+ "description": "Request to run a single SDK action."
+ },
+ "RunSdkActionResponse": {
+ "properties": {
+ "workflow_run_id": {
+ "type": "string",
+ "title": "Workflow Run Id",
+ "description": "The workflow run ID used for this action"
+ },
+ "result": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Result",
+ "description": "The result from the action (e.g., selector, value, extracted data)"
+ }
+ },
+ "type": "object",
+ "required": [
+ "workflow_run_id"
+ ],
+ "title": "RunSdkActionResponse",
+ "description": "Response from running an SDK action."
+ },
"RunStatus": {
"type": "string",
"enum": [
@@ -13178,6 +13693,73 @@
"type": "object",
"title": "SelectOption"
},
+ "SelectOptionAction": {
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "ai_select_option",
+ "title": "Type",
+ "default": "ai_select_option"
+ },
+ "selector": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Selector",
+ "description": "CSS selector for the element",
+ "default": ""
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Value",
+ "description": "Value to select",
+ "default": ""
+ },
+ "intention": {
+ "type": "string",
+ "title": "Intention",
+ "description": "The intention or goal of the selection",
+ "default": ""
+ },
+ "data": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Data",
+ "description": "Additional context data"
+ },
+ "timeout": {
+ "type": "number",
+ "title": "Timeout",
+ "description": "Timeout in milliseconds",
+ "default": 10000
+ }
+ },
+ "type": "object",
+ "title": "SelectOptionAction",
+ "description": "Select option action parameters."
+ },
"SendEmailBlock": {
"properties": {
"label": {
@@ -15609,6 +16191,73 @@
"title": "UpdateWorkflowFolderRequest",
"description": "Request model for updating a workflow's folder assignment"
},
+ "UploadFileAction": {
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "ai_upload_file",
+ "title": "Type",
+ "default": "ai_upload_file"
+ },
+ "selector": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Selector",
+ "description": "CSS selector for the element",
+ "default": ""
+ },
+ "file_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "File Url",
+ "description": "File URL for upload",
+ "default": ""
+ },
+ "intention": {
+ "type": "string",
+ "title": "Intention",
+ "description": "The intention or goal of the upload",
+ "default": ""
+ },
+ "data": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Data",
+ "description": "Additional context data"
+ },
+ "timeout": {
+ "type": "number",
+ "title": "Timeout",
+ "description": "Timeout in milliseconds",
+ "default": 10000
+ }
+ },
+ "type": "object",
+ "title": "UploadFileAction",
+ "description": "Upload file action parameters."
+ },
"UploadFileResponse": {
"properties": {
"s3_uri": {
@@ -16144,6 +16793,40 @@
],
"title": "UserDefinedError"
},
+ "ValidateAction": {
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "validate",
+ "title": "Type",
+ "default": "validate"
+ },
+ "prompt": {
+ "type": "string",
+ "title": "Prompt",
+ "description": "Validation criteria or condition to check"
+ },
+ "model": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Model",
+ "description": "Optional model configuration"
+ }
+ },
+ "type": "object",
+ "required": [
+ "prompt"
+ ],
+ "title": "ValidateAction",
+ "description": "Validate action parameters."
+ },
"ValidationBlock": {
"properties": {
"label": {