Runs
Execute Tasks with specific inputs.
Runs represent a specific execution instance of a Task. When you want Vern to perform an action defined by a Task, you create a Run.
Purpose of Runs
- Task Execution: Trigger the actual performance of a defined Task.
- Input Provision: Provide the specific data (inputs) required by the Task for this particular execution.
- Tracking: Each Run represents a traceable instance of a workflow execution, allowing you to monitor its status and results.
Creating Runs
Runs can be created via the Vern SDK or REST API, as they typically correspond to real-time events or user actions in your application.
Using the SDK
Using the REST API
Key Components:
taskId
: Required. Specifies which Task definition to execute.inputs
: An object containing the data required by the specified Task. The structure must match the inputs defined when the Task was created in the UI.
Run ID and Asynchronous Execution
Upon successful submission of a Run creation request, the API immediately returns a response containing a unique Run ID (e.g., run_mno123pqr456
).
Important: Vern executes tasks asynchronously. The immediate API response only confirms that the run request was received and queued. It does not mean the task has completed.
The Run ID is used to:
- Check the status of the run (e.g.,
queued
,running
,completed
,failed
). - Retrieve the results or output of the run once it has completed.
Polling for Run Completion
You can poll for run completion using our SDK:
Example: Running “Find Property Details”
Using the property search example:
- We provide the
taskId
for “Find Property Details”. - We provide the
inputs
(likeaddress
andinclude_photos
) for the property search.
Vern receives this, queues the job, and executes the browser-based task to search for and extract the property details.
Next Steps
Understanding Runs completes the core workflow: Define browser actions (Tasks) and execute them (Runs). Explore the API reference for details on managing and monitoring runs.