Skip to content

Simple Sequential Flow

Build your first flow with a linear sequence of steps.

Difficulty: Beginner Time: 10 minutes

What You'll Build

A basic flow that:

  • Triggers manually
  • Runs an agent
  • Ends with a result

Simple FlowTBD: Replace with screenshot of simple flow in editor

Prerequisites

Step 1: Create a New Flow

  1. Go to Flows in the sidebar
  2. Click + New Flow
  3. Name it "My First Flow"
  4. Click Create

Step 2: Add a Trigger Node

Every flow starts with a trigger.

  1. From the node palette, drag Trigger onto the canvas
  2. Click the node to configure:
yaml
triggerType: manual
triggerConfig:
  inputSchema:
    type: object
    properties:
      topic:
        type: string
        description: Topic to research
    required:
      - topic

The trigger defines:

  • When the flow runs (manual = you click Run)
  • What input it accepts (a topic string)

Available trigger types:

TypeDescription
manualTriggered by clicking Run
scheduleRuns on a cron schedule
ticket-createdFires when a ticket is created
ticket-updatedFires when a ticket is updated

Step 3: Add an Agent Node

  1. Drag Agent node onto the canvas
  2. Connect the Trigger to the Agent (drag from output to input)
  3. Configure the agent node:
yaml
agentId: research-assistant  # Your agent's ID
inputMapping:
  topic: "trigger.input.topic"  # Maps trigger input to agent context

The inputMapping maps fields from the flow context into the agent's input. Each key is a field name and each value is a context path (e.g., trigger.input.topic).

Step 4: Add an End Node

  1. Drag End node onto the canvas
  2. Connect Agent → End
  3. Configure:
yaml
endType: success

End nodes mark where a flow execution path terminates. The endType categorizes the outcome:

  • success — flow completed normally
  • failure — flow ended in an error state
  • cancelled — flow was manually stopped

Step 5: Save and Run

  1. Click Save in the toolbar
  2. Click Run
  3. Enter input when prompted:
json
{
  "topic": "Latest developments in quantum computing"
}
  1. Watch the flow execute!

Understanding the Flow

Your flow looks like this:

┌──────────┐    ┌───────────┐    ┌──────────┐
│  Manual  │───▶│  Research │───▶│   End    │
│ Trigger  │    │   Agent   │    │ (success)│
└──────────┘    └───────────┘    └──────────┘

Data flow:

  1. Trigger provides {topic: "..."}
  2. Agent receives topic via inputMapping: { topic: "trigger.input.topic" }
  3. Agent runs and produces output (stored in flow context)
  4. End node marks the execution as complete

Input & Output Mapping

Agent nodes use inputMapping and outputMapping to wire data between nodes:

FieldPurposeExample
inputMappingMaps context paths → agent input fields{ topic: "trigger.input.topic" }
outputMappingMaps agent output fields → context paths{ summary: "research.summary" }

Context paths reference the shared execution context. Common patterns:

PathMeaning
trigger.inputAll trigger input
trigger.input.topicSpecific trigger field
nodes.<nodeId>.outputA node's full output
nodes.<nodeId>.output.fieldSpecific output field

Common Patterns

Add a Second Agent

Trigger → Agent 1 → Agent 2 → End

Agent 2 inputMapping:

yaml
inputMapping:
  research: "nodes.agent1.output"
  instructions: "'Summarize the above research.'"

Add Logging

Insert a Transform node to log intermediate data:

Trigger → Agent → Transform (log) → End

Transform configuration:

yaml
transformType: template
expression: "{{nodes.agent.output}}"

Transform nodes support three types:

  • jq — JQ query expressions
  • template — Template string interpolation
  • script — JavaScript-like script execution

Add Error Handling

Wrap with a condition:

Agent → Condition → [match] → End (success)
                └──→ [default] → End (failure)

Flow Settings

Configure in the flow settings panel:

SettingDescription
NameFlow identifier
DescriptionWhat the flow does
Max IterationsMax times a node can execute in a loop (default: 5, prevents infinite loops)
EnabledWhether automatic triggers are active (manual runs always work)
LabelsOrganize flows with label tags

Debugging

Debug Mode

Enable debug mode to step through your flow node-by-node:

  • Step — Execute the next node and pause
  • Continue — Resume normal execution
  • Skip — Skip a node with mock output
  • Modify Input/Output — Adjust data mid-execution

Error Recovery

When a node fails during execution, the flow pauses and offers recovery options:

  • Retry — Re-execute the failed node
  • Skip — Skip the node and provide mock output
  • Stop — Halt the flow entirely

View Execution

Click Runs to see execution history:

  • Input received
  • Each node's output
  • Timing information
  • Any errors

Test Incrementally

  1. Run with just the trigger
  2. Add one node, run again
  3. Verify output at each step

Example: Daily Report Flow

json
{
  "name": "Daily Report",
  "description": "Generates a daily summary",
  "nodes": [
    {
      "id": "trigger",
      "type": "trigger",
      "label": "Daily Schedule",
      "config": {},
      "position": { "x": 0, "y": 0 },
      "triggerType": "schedule",
      "triggerConfig": { "cron": "0 9 * * *" }
    },
    {
      "id": "gather",
      "type": "agent",
      "label": "Data Gatherer",
      "config": {},
      "position": { "x": 300, "y": 0 },
      "agentId": "data-gatherer",
      "inputMapping": { "task": "'Gather metrics for today'" },
      "outputMapping": {}
    },
    {
      "id": "summarize",
      "type": "agent",
      "label": "Summarizer",
      "config": {},
      "position": { "x": 600, "y": 0 },
      "agentId": "summarizer",
      "inputMapping": { "data": "nodes.gather.output" },
      "outputMapping": {}
    },
    {
      "id": "end",
      "type": "end",
      "label": "Done",
      "config": {},
      "position": { "x": 900, "y": 0 },
      "endType": "success"
    }
  ],
  "edges": [
    { "id": "e1", "source": "trigger", "target": "gather" },
    { "id": "e2", "source": "gather", "target": "summarize" },
    { "id": "e3", "source": "summarize", "target": "end" }
  ],
  "variables": {},
  "maxIterations": 5
}

Tips

  • Start simple: Get a basic flow working before adding complexity
  • Name nodes clearly: "Research Agent" not "Agent 1"
  • Test with sample data: Use realistic inputs
  • Check the runs tab: See exactly what happened
  • Use debug mode: Step through flows to understand data flow

Next Steps

Sciorex is proprietary software.