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
TBD: Replace with screenshot of simple flow in editor
Prerequisites
- Sciorex installed
- At least one agent created
Step 1: Create a New Flow
- Go to Flows in the sidebar
- Click + New Flow
- Name it "My First Flow"
- Click Create
Step 2: Add a Trigger Node
Every flow starts with a trigger.
- From the node palette, drag Trigger onto the canvas
- Click the node to configure:
triggerType: manual
triggerConfig:
inputSchema:
type: object
properties:
topic:
type: string
description: Topic to research
required:
- topicThe trigger defines:
- When the flow runs (manual = you click Run)
- What input it accepts (a topic string)
Available trigger types:
| Type | Description |
|---|---|
manual | Triggered by clicking Run |
schedule | Runs on a cron schedule |
ticket-created | Fires when a ticket is created |
ticket-updated | Fires when a ticket is updated |
Step 3: Add an Agent Node
- Drag Agent node onto the canvas
- Connect the Trigger to the Agent (drag from output to input)
- Configure the agent node:
agentId: research-assistant # Your agent's ID
inputMapping:
topic: "trigger.input.topic" # Maps trigger input to agent contextThe 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
- Drag End node onto the canvas
- Connect Agent → End
- Configure:
endType: successEnd nodes mark where a flow execution path terminates. The endType categorizes the outcome:
success— flow completed normallyfailure— flow ended in an error statecancelled— flow was manually stopped
Step 5: Save and Run
- Click Save in the toolbar
- Click Run
- Enter input when prompted:
{
"topic": "Latest developments in quantum computing"
}- Watch the flow execute!
Understanding the Flow
Your flow looks like this:
┌──────────┐ ┌───────────┐ ┌──────────┐
│ Manual │───▶│ Research │───▶│ End │
│ Trigger │ │ Agent │ │ (success)│
└──────────┘ └───────────┘ └──────────┘Data flow:
- Trigger provides
{topic: "..."} - Agent receives topic via
inputMapping: { topic: "trigger.input.topic" } - Agent runs and produces output (stored in flow context)
- End node marks the execution as complete
Input & Output Mapping
Agent nodes use inputMapping and outputMapping to wire data between nodes:
| Field | Purpose | Example |
|---|---|---|
inputMapping | Maps context paths → agent input fields | { topic: "trigger.input.topic" } |
outputMapping | Maps agent output fields → context paths | { summary: "research.summary" } |
Context paths reference the shared execution context. Common patterns:
| Path | Meaning |
|---|---|
trigger.input | All trigger input |
trigger.input.topic | Specific trigger field |
nodes.<nodeId>.output | A node's full output |
nodes.<nodeId>.output.field | Specific output field |
Common Patterns
Add a Second Agent
Trigger → Agent 1 → Agent 2 → EndAgent 2 inputMapping:
inputMapping:
research: "nodes.agent1.output"
instructions: "'Summarize the above research.'"Add Logging
Insert a Transform node to log intermediate data:
Trigger → Agent → Transform (log) → EndTransform configuration:
transformType: template
expression: "{{nodes.agent.output}}"Transform nodes support three types:
jq— JQ query expressionstemplate— Template string interpolationscript— 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:
| Setting | Description |
|---|---|
| Name | Flow identifier |
| Description | What the flow does |
| Max Iterations | Max times a node can execute in a loop (default: 5, prevents infinite loops) |
| Enabled | Whether automatic triggers are active (manual runs always work) |
| Labels | Organize 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
- Run with just the trigger
- Add one node, run again
- Verify output at each step
Example: Daily Report Flow
{
"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
- Conditional Branching - Add if/else logic
- Parallel Execution - Run nodes simultaneously
- Flows Reference - Full documentation
