Skip to main content
A
Docs

Workflow Builder

Define and configure AI workflows visually with the drag-and-drop builder.

Overview

The Workflow Builder is a visual editor for defining AI-powered workflows. Each workflow is composed of steps connected in a directed graph -- you define the step type, configure its parameters, and connect it to downstream steps.

Creating a Workflow

Every workflow starts with a name, description, trigger type, and an initial set of steps. Steps are added one at a time, each with a unique ID, display name, type, configuration, and optional connection to the next step.

{
  "name": "Citizen Inquiry Router",
  "description": "Classify and route citizen inquiries to departments",
  "trigger": "api",
  "steps": [
    {
      "id": "classify",
      "name": "Classify Inquiry",
      "type": "llm_call",
      "config": {
        "prompt": "Classify this citizen inquiry into one of: visa, permit, complaint, general.\n\nInquiry: {{input.message}}",
        "model": "llama-3.3-70b-versatile"
      },
      "next_step": "route",
      "timeout_seconds": 30
    },
    {
      "id": "route",
      "name": "Route to Department",
      "type": "conditional",
      "config": {
        "branches": [
          {"condition": "category == 'visa'", "next_step": "visa_handler"},
          {"condition": "category == 'permit'", "next_step": "permit_handler"}
        ]
      }
    }
  ],
  "variables": {"department": "general"},
  "tags": ["citizen-services", "routing"]
}

Step Configuration

Each step requires:

FieldDescription
idUnique identifier within the workflow
nameHuman-readable display name
typeStep type: llm_call, api_call, conditional, loop, transform, human_approval
configType-specific configuration object
next_stepID of the next step to execute (optional for terminal steps)
timeout_secondsMaximum execution time for this step (default: 30)

Variable Resolution

Steps share data through the execution context. Any step can reference outputs from previous steps using double-brace syntax:

  • {{input.message}} -- Data from the workflow trigger
  • {{classify.output.category}} -- Output from a previous step
  • {{variables.department}} -- Workflow-level variables

The engine resolves all template variables before executing each step, injecting runtime values from the shared context.

Workflow Statuses

StatusDescription
draftBeing designed in the builder, not yet executable
activeReady for execution via triggers
pausedTemporarily disabled, no new runs allowed
archivedRetired from use, preserved for audit history

Tags

Workflows can be tagged with arbitrary labels for organization and filtering. Common tags include department names (finance, immigration), process types (citizen-services, internal), and priority levels.

Templates

Use the pre-built government templates as a starting point. They can be customized in the builder after deployment.

Dashboard Builder View

The builder page provides:

  • A canvas area for arranging steps visually
  • A step configuration panel for editing parameters
  • Real-time validation that highlights misconfigured or disconnected steps
  • A preview mode showing the workflow topology as a directed graph