Skip to main content

Overview

When a trace enters Velatir, it goes through several stages before reaching its final state. Understanding this lifecycle helps you configure policies and workflows effectively.

Lifecycle Stages

Trace Created → Policy Assessment → Workflow Execution → Final State

1. Trace Created (Status: Received)

Your system sends a trace to Velatir through the API, SDK, or integration. The trace is stored and marked as Received. At this point:
  • Trace data is captured
  • Session grouping happens
  • Processing begins

2. Policy Assessment (Status: Assessed)

Active policies evaluate the trace. Each policy produces an assessment with:
FieldDescription
CompliantDoes the trace comply with the policy?
Risk LevelLow, Medium, High, or Critical
ConfidenceHow confident is the assessment (0-1)
ReasonExplanation of the assessment
RecommendationSuggested action
TagsLabels for categorization
If no workflow is configured, the trace stays at Assessed status. You can review assessments manually in the dashboard.

3. Workflow Execution

If a workflow is active, triggers are evaluated against the trace and its assessments. Trigger Types:
TriggerEvaluates
Policy TriggerChecks if a specific policy matched
Conditional TriggerChecks trace fields, args, or assessment data
If no triggers match: The trace is auto-approved and marked Completed. If a trigger matches: The workflow executes its nodes sequentially.

4. Node Execution

Workflows contain nodes that process the trace:
Node TypeWhat It Does
Human InterventionCreates a review task, pauses workflow
NotificationSends alert to configured channels
RejectionMarks trace as rejected

5. Human Intervention (If Required)

When a workflow hits a Human Intervention node:
  1. A Review Task is created
  2. Notifications are sent to configured channels (Slack, Email, Teams)
  3. Workflow pauses until a decision is made
  4. Reviewer approves, declines, or requests changes
  5. Workflow continues based on the decision

6. Final State

StatusMeaning
CompletedTrace approved (auto or by human)
RejectedTrace rejected by workflow or human

Example Flow

1. User asks chatbot about competitor pricing
   └─ Trace created (Inlet, Received)

2. GDPR policy evaluates
   └─ Assessment: Compliant=false, Risk=High, Reason="Potential competitive intelligence"

3. Workflow trigger matches (GDPR High Risk)
   └─ Human Intervention node activated

4. Review task created, Slack notification sent
   └─ Manager sees: "High-risk trace needs review"

5. Manager approves with note
   └─ Decision recorded: Approved

6. Trace marked Completed
   └─ Audit trail complete

Processing Modes

Synchronous (Workflows Active)

When a workflow is configured:
  • Policies evaluate immediately
  • Workflow executes in-line
  • API response includes status and review task ID (if created)
{
  "traceId": "trace-123",
  "status": "RequiresIntervention",
  "reviewTaskId": "task-456"
}

Asynchronous (No Workflows)

When no workflow is configured:
  • Trace is queued for assessment
  • API response returns immediately
  • Check trace status later via API or dashboard
{
  "traceId": "trace-123",
  "status": "Received"
}

Monitoring Lifecycle

Track trace progress in the dashboard:
  1. Traces view - See status of all traces
  2. Trace detail - View assessments and workflow execution
  3. Sessions view - See all traces in a conversation
  4. Review Tasks - Manage pending human decisions