> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kapso.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflow execution events

> Workflow execution tracking and debugging

Workflow execution events automatically track every step of execution - from start to finish, including decisions, actions, and errors. Use them to debug workflows and understand what happened during execution.

> Workflow execution events are internal logs for a workflow run. To record durable custom facts or trigger workflows, use [project events](/docs/platform/events).

## Event categories

**Execution events** - Workflow lifecycle

* `execution_started` - Workflow begins
* `execution_ended` - Workflow completes
* `execution_failed` - Workflow crashes

**Step events** - Step transitions

* `step_entered` - Entering a step
* `step_completed` - Step finishes successfully
* `step_failed` - Step encounters error

**Action events** - Node actions

* `action_preparing` - Setting up action
* `action_executing` - Running action
* `action_performed` - Action completes
* `decision_evaluated` - Decide node chooses path

## Accessing events

### Test workflows

Events appear in the Workflow Events tab when testing workflows. They show step-by-step execution with timestamps and details.

### Production workflows

View events in execution logs dashboard:

* Project → Execution logs → Click execution → Events tab
* Real-time updates for active workflows
* Full execution history

## Key event types

**Decision tracking**

* `decision_evaluating` - AI evaluating conditions
* `decision_evaluated` - Path chosen with reasoning

**Variable changes**

* `variables_set` - Variables updated
* Shows old/new values and source

**AI field resolution**

* `ai_field_resolving` - Processing AI prompt
* `ai_field_resolved` - AI response received

**User interactions**

* `user_input_received` - User responded
* `timeout_scheduled` - Timeout scheduled for wait step
* `timeout_cancelled` - Timeout cancelled (user responded before timeout)
* `timeout_triggered` - Timeout fired (no user response received)

**Errors**

* `step_failed` - Step error with details
* `action_failed` - Action error

## Event structure

Each event includes:

```json theme={null}
{
  "id": "uuid",
  "eventType": "step_entered", 
  "createdAt": "2024-01-01T12:00:00Z",
  "step": {
    "identifier": "welcome_step",
    "stepableType": "FlowSendTextStep"
  },
  "edgeLabel": "next",
  "payload": {
    "step_identifier": "welcome_step",
    "duration_ms": 150
  }
}
```

**Core fields**

* `eventType` - What happened
* `createdAt` - Exact timestamp
* `step` - Associated step (if any)
* `edgeLabel` - Transition taken
* `payload` - Event-specific data

**Payload examples**

* Decision events include prompt, response, model used
* Action events show parameters and results
* Error events contain error message and stack trace
* Variable events show before/after values

Events provide complete audit trail of workflow execution for debugging and monitoring.
