For detailed documentation, please see Executions API Reference.Documentation Index
Fetch the complete documentation index at: https://docs.kineticsystems.ai/llms.txt
Use this file to discover all available pages before exploring further.
Definition
An execution is a single run of a workflow. A workflow can have multiple executions. An execution can be in one of the following states:pending: the execution is waiting to be queuedqueued: the execution is queued for processingrunning: the execution is currently runningcompleted: the execution has terminated, and successfully completed the workflowfailed: the execution has terminated, and failed to complete the workflow
Lifecycle
An Execution goes through the following states:pending → queued → running → completed or failed.
- Create: POST
/api/workflows/{id}/executecreates an execution and appends it to a queue for processing. You can also create an execution manually via the Kinetic dashboard. - Retry: POST
/api/executions/{executionId}/retrywill retry a prior execution. In practice, this works by cloning the current execution’s details, stopping it, then queueing the newly created execution. - Logs: GET
/api/executions/{executionId}returns logs from the execution.
Inputs
You can pass execution-specific inputs via theinputPayload field when creating an execution.
Outputs
The following information is returned when an execution is retrieved:status: the status of the executionduration_ms: the duration of the execution in millisecondsn_steps: the number of steps in the executionn_agent_actions: the number of agent actions in the executionn_screenshots: the number of screenshots in the executionoutput_url: the URL of the output of the executionvideo_url: the URL of the video of the executionlogs_url: the URL of the logs of the execution
How it Works
When an execution is created, we follow these steps:- We create the execution record in the database, and set its status to
pending. - We append the execution to a queue for processing, and set its status to
queued. - Once resources are available, we spawn a worker container to execute the execution, and set its status to
running. - The agent runs inside the container and executes the steps of the workflow. While executing, we log the actions taken by the agent.
- After the execution terminates (either due to success or failure), we spin down the container, and set its status to
completedorfailed.
