Skip to content

Skyvern: Run an SDK action

Skyvern sdk.runSdkAction: arguments, response, policy and SDK examples.

← Sdk operations · Get started

Operation skyvern.run_sdk_action_v1_sdk_run_action_post

Provider route: POST /v1/sdk/run_action. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/skyvern with npm, or alter-sdk-skyvern with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { SkyvernIntegration } from "@alter-ai/skyvern";
async function execute(input: Parameters<SkyvernIntegration["sdk"]["runSdkAction"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new SkyvernIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.sdk.runSdkAction(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_skyvern import SkyvernIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = SkyvernIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.sdk.run_sdk_action(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
bodyModelRequired within parentExpand Run an SDK action — request body — body

Referenced models: Run an SDK action — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Run an SDK action — response body

Referenced models: Run an SDK action — response body

3 more schemas are linked from the tables above, on the schema pages.

Run an SDK action — response body
FieldTypePresenceDescription and constraints
$objectRootResponse from running an SDK action.
resultJSONOptionalThe result from the action (e.g., selector, value, extracted data)
result (anyOf 1)JSONAlternative
result (anyOf 2)nullAlternative
workflow_run_idstringRequired within parentThe workflow run ID used for this action
Run an SDK action — request body — body
FieldTypePresenceDescription and constraints
$objectRootRequest to run a single SDK action.
actionJSONRequired within parentThe action to execute with its specific parameters
action (oneOf 1)ModelAlternativeExpand Run an SDK action — request body — body action type ai click
action (oneOf 2)ModelAlternativeExpand Run an SDK action — request body — body action type ai input text
action (oneOf 3)ModelAlternativeExpand Run an SDK action — request body — body action type ai select option
action (oneOf 4)ModelAlternativeExpand Run an SDK action — request body — body action type ai upload file
action (oneOf 5)ModelAlternativeExpand Run an SDK action — request body — body action type ai act
action (oneOf 6)ModelAlternativeExpand Run an SDK action — request body — body action type extract
action (oneOf 7)ModelAlternativeExpand Run an SDK action — request body — body action type locate element
action (oneOf 8)ModelAlternativeExpand Run an SDK action — request body — body action type validate
action (oneOf 9)ModelAlternativeExpand Run an SDK action — request body — body action type prompt
browser_addressJSONOptionalThe browser address
browser_address (anyOf 1)stringAlternative
browser_address (anyOf 2)nullAlternative
browser_session_idJSONOptionalThe browser session ID
browser_session_id (anyOf 1)stringAlternative
browser_session_id (anyOf 2)nullAlternative
urlstringRequired within parentThe URL where the action should be executed
workflow_run_idJSONOptionalOptional workflow run ID to continue an existing workflow run
workflow_run_id (anyOf 1)stringAlternative
workflow_run_id (anyOf 2)nullAlternative

Referenced models: Run an SDK action — request body — body action type ai act, Run an SDK action — request body — body action type ai click, Run an SDK action — request body — body action type extract, Run an SDK action — request body — body action type ai input text, Run an SDK action — request body — body action type locate element, Run an SDK action — request body — body action type prompt, Run an SDK action — request body — body action type ai select option, Run an SDK action — request body — body action type ai upload file, Run an SDK action — request body — body action type validate

Run an SDK action — request body — body action type ai act
FieldTypePresenceDescription and constraints
$objectRootAI act action parameters.
dataJSONOptionalAdditional context data
data (anyOf 1)stringAlternative
data (anyOf 2)objectAlternativeAdditional keys: allowed
data (anyOf 3)nullAlternative
intentionstringOptionalNatural language prompt for the action
Default:
typestringRequired within parentMust equal: ai_act
Default: ai_act
Run an SDK action — request body — body action type ai click
FieldTypePresenceDescription and constraints
$objectRootClick action parameters.
dataJSONOptionalAdditional context data
data (anyOf 1)stringAlternative
data (anyOf 2)objectAlternativeAdditional keys: allowed
data (anyOf 3)nullAlternative
intentionstringOptionalThe intention or goal of the click
Default:
selectorJSONOptionalCSS selector for the element
Default:
selector (anyOf 1)stringAlternative
selector (anyOf 2)nullAlternative
timeoutnumberOptionalTimeout in milliseconds
Default: 10000
typestringRequired within parentMust equal: ai_click
Default: ai_click
Run an SDK action — request body — body action type extract
FieldTypePresenceDescription and constraints
$objectRootExtract data action parameters.
dataJSONOptionalAdditional context data
data (anyOf 1)stringAlternative
data (anyOf 2)objectAlternativeAdditional keys: allowed
data (anyOf 3)nullAlternative
error_code_mappingJSONOptionalError code mapping for extraction
error_code_mapping (anyOf 1)objectAlternativeAdditional keys: see wildcard field
error_code_mapping (anyOf 1).*stringAdditional keys
error_code_mapping (anyOf 2)nullAlternative
extract_schemaJSONOptionalSchema for extraction
extract_schema (anyOf 1)objectAlternativeAdditional keys: allowed
extract_schema (anyOf 2)arrayAlternative
extract_schema (anyOf 2)[]JSONEach item
extract_schema (anyOf 3)stringAlternative
extract_schema (anyOf 4)nullAlternative
intentionJSONOptionalThe intention or goal of the extraction
intention (anyOf 1)stringAlternative
intention (anyOf 2)nullAlternative
promptstringOptionalExtraction prompt
Default:
typestringRequired within parentMust equal: extract
Default: extract
Run an SDK action — request body — body action type ai input text
FieldTypePresenceDescription and constraints
$objectRootInput text action parameters.
dataJSONOptionalAdditional context data
data (anyOf 1)stringAlternative
data (anyOf 2)objectAlternativeAdditional keys: allowed
data (anyOf 3)nullAlternative
intentionstringOptionalThe intention or goal of the input
Default:
selectorJSONOptionalCSS selector for the element
Default:
selector (anyOf 1)stringAlternative
selector (anyOf 2)nullAlternative
timeoutnumberOptionalTimeout in milliseconds
Default: 10000
totp_identifierJSONOptionalTOTP identifier for input_text actions
totp_identifier (anyOf 1)stringAlternative
totp_identifier (anyOf 2)nullAlternative
totp_urlJSONOptionalTOTP URL for input_text actions
totp_url (anyOf 1)stringAlternative
totp_url (anyOf 2)nullAlternative
typestringRequired within parentMust equal: ai_input_text
Default: ai_input_text
valueJSONOptionalValue to input
Default:
value (anyOf 1)stringAlternative
value (anyOf 2)nullAlternative
Run an SDK action — request body — body action type locate element
FieldTypePresenceDescription and constraints
$objectRootLocate element action parameters.
promptstringOptionalNatural language prompt to locate an element
Default:
typestringRequired within parentMust equal: locate_element
Default: locate_element
Run an SDK action — request body — body action type prompt
FieldTypePresenceDescription and constraints
$objectRootPrompt action parameters.
modelJSONOptionalOptional model configuration
model (anyOf 1)objectAlternativeAdditional keys: allowed
model (anyOf 2)nullAlternative
promptstringRequired within parentThe prompt to send to the LLM
response_schemaJSONOptionalOptional JSON schema to structure the response
response_schema (anyOf 1)objectAlternativeAdditional keys: allowed
response_schema (anyOf 2)nullAlternative
typestringRequired within parentMust equal: prompt
Default: prompt

SDK function policy ID: skyvern.run_sdk_action_v1_sdk_run_action_post. Catalog operation: run_sdk_action_v1_sdk_run_action_post. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.