Skip to content

Executions

The Executions page allows you to view the complete history of all KAI-Flow workflow executions.

Executions Page

Filter: Used to narrow down execution results. You can filter by execution status, workflow, date range, or input text. A Clear Filters button is available to reset all filters.

Use the selection checkbox to select all executions and delete multiple executions at once.

Executions List: It displays executions in a table with the following details:

  • Execution ID
  • Workflow name (clickable)
  • Execution status
  • Input text preview
  • Output text preview (Click to view full output)
  • Execution duration
  • Start time

Each execution includes a Delete option. The list supports pagination for easy navigation through execution history.

At the top of the page, there is an Export CSV button which allows you to download execution data for external reporting and analysis.

Execution statuses are indicated with color-coded badges:

  • Pending (yellow)
  • Running (blue, animated)
  • Completed (green)
  • Failed (red)
  • Cancelled (an execution stopped before it finished)

Execution Details: Click an execution to view detailed information, including the full input and output text, error messages (if any), and a step-by-step execution trace.


Cancel an execution

An execution can be cancelled while its status is Pending or Running. Cancellation requests stop its active task when one exists, record the status as cancelled, and release its execution queue slot. Work already performed by earlier steps, such as an external API call, is not rolled back.

From the Executions page

Find the pending or running execution and click the Cancel execution button in its actions column. Confirm Cancel execution in the dialog, or choose Keep running to leave it active. The list refreshes after a successful request. Completed, failed, and already cancelled executions do not show this action.

From the workflow canvas

While a workflow is executing, click Cancel beside the Executing... indicator in the top bar and confirm. The canvas stops reading the live execution stream and clears pending node and edge indicators. When the execution ID is available, it requests cancellation of that execution; otherwise it requests cancellation of the workflow's active executions. Check the Executions page to confirm the final server status if the request fails or the connection is interrupted.

Cancellation API

External callers can use either a signed-in user's Bearer token or the configured MASTER_API_KEY in the X-API-KEY header. A normal user can cancel only executions and workflows they own. The examples below use the master key for automation. Requests have no body.

Cancel one execution

Send POST /kai/api/v1/executions/{execution_id}/cancel with the execution UUID:

curl -X POST "https://your-domain.com/kai/api/v1/executions/550e8400-e29b-41d4-a716-446655440000/cancel" \
  -H "X-API-KEY: YOUR_MASTER_API_KEY"

The endpoint accepts pending and running executions and returns the updated execution object (200 OK). It returns 404 when the execution is absent or not accessible to the user, and 400 when its status can no longer be cancelled.

Cancel all active executions of a workflow

Send POST /kai/api/v1/executions/workflows/{workflow_id_or_name}/cancel. The path can contain the workflow UUID or its name. Name matching ignores case, spaces, punctuation, and Turkish character differences. If several accessible workflows have the same normalized name, the endpoint cancels active executions for all of them; use the UUID to target just one workflow.

curl -X POST "https://your-domain.com/kai/api/v1/executions/workflows/your-workflow-name/cancel" \
  -H "X-API-KEY: YOUR_MASTER_API_KEY"

The response is a JSON array of the workflow's pending and running executions that were cancelled. An existing workflow with no active executions returns an empty array. An unknown or inaccessible workflow returns 404.

For both endpoints, each cancelled execution has status: "cancelled", a completion timestamp, and error_message: "Execution cancelled manually". A Bearer token can be used instead of the master key header: Authorization: Bearer YOUR_ACCESS_TOKEN.