Workflows

Sequential step-based orchestration with conditional branching and agent integration.

Overview

Workflows in Fiberwise are sequential execution systems that orchestrate multiple steps in a predefined order. Note: The Workflow system is currently in planning phase - the current implementation focuses on Pipelines (node-based DAGs) and Functions.

🔄 Workflows vs Pipelines (Current Implementation)

Workflows (Planned)

  • Sequential execution - steps run one after another
  • Step-based - composed of individual steps
  • Conditional branching - if/then logic
  • Manual triggers - user-initiated
  • Business processes - complex multi-stage workflows

Pipelines (Implemented)

  • Node-based execution - agent and function nodes
  • DAG structure - directed acyclic graph
  • Dependency resolution - based on node connections
  • REST API - full CRUD operations
  • Data processing - transform and route data

Workflow Structure

Workflows are composed of steps that execute in sequence with optional conditional branching:

Step Types

🟢 START

Entry point for the workflow execution

🤖 AGENT

Execute an AI agent with input data

⚙️ FUNCTION

Run a specific function with parameters

🔀 CONDITION

Conditional branching - choose next step based on logic

🔴 END

Terminal step - workflow completion

Execution Model

Workflows follow a strictly sequential execution model:

  1. Start - Begin at the START step
  2. Execute - Process current step
  3. Evaluate - Check conditions (if applicable)
  4. Navigate - Move to next step based on result
  5. Repeat - Continue until END step reached

📊 Execution Flow Example

START → Extract Text → Check Length → [If > 1000] → Summarize → Classify → END
                                              ↓ [If ≤ 1000]
                                              → Classify → END

Workflow Definition

Workflows are defined using JSON manifest with steps, variables, and execution logic:

{
  "name": "Document Processing Workflow",
  "description": "Process documents with AI analysis",
  "version": "1.0.0",
  "trigger_type": "manual",
  "steps": [
    {
      "id": "start",
      "name": "Start",
      "type": "start",
      "next": "extract"
    },
    {
      "id": "extract",
      "name": "Extract Text",
      "type": "function",
      "function_name": "text_extractor",
      "next": "check_length"
    },
    {
      "id": "check_length",
      "name": "Check Document Length",
      "type": "condition",
      "condition": "len(extracted_text) > 1000",
      "next": "summarize",
      "next_on_false": "classify"
    },
    {
      "id": "end",
      "name": "End",
      "type": "end"
    }
  ],
  "variables": {
    "extracted_text": {
      "type": "string",
      "description": "Extracted text content"
    }
  }
}

Key Features

🔄 Sequential Processing

Steps execute in strict order, ensuring predictable workflow behavior

🎯 Conditional Logic

Branch execution paths based on data conditions or step results

📊 Variable Management

Pass data between steps using workflow variables

🏃 Manual Triggers

User-initiated workflow execution with input parameters

Development Status

The Workflow system is currently in planning phase. Current development focuses on:

✅ Currently Available:

  • Functions: REST API for function management and execution
  • Pipelines: Basic CRUD operations and node-based workflow definition
  • Database Schema: Tables for functions, pipelines, and executions

⏳ In Development:

  • Pipeline Execution Engine: Full node dependency resolution and execution
  • Advanced Node Types: Conditional, loop, and webhook nodes

📋 Planned (Workflows):

  • Sequential Workflow System: Step-based execution with branching
  • Workflow Builder UI: Visual workflow designer
  • Business Process Templates: Pre-built workflow patterns
# Current available commands:
# Function management via REST API
curl -X GET "https://api.fiberwise.ai/api/v1/functions" \
  -H "Authorization: Bearer {token}"

# Pipeline management via REST API  
curl -X GET "https://api.fiberwise.ai/api/v1/pipelines" \
  -H "Authorization: Bearer {token}"

# Workflow CLI - planned for future release
# fiber workflows create --template business-process
# fiber workflows deploy workflow.yaml
# fiber workflows execute workflow-id --input data.json