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
- Outputs the 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:
yaml
triggerType: manual
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)
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:
yaml
agent: research-assistant # Your agent ID
input: "{{trigger.input.topic}}"Step 4: Add an Output Node
- Drag Output node onto the canvas
- Connect Agent → Output
- Configure:
yaml
output: "{{nodes.agent.output}}"Step 5: Save and Run
- Click Save in the toolbar
- Click Run
- Enter input when prompted:
json
{
"topic": "Latest developments in quantum computing"
}- Watch the flow execute!
Understanding the Flow
Your flow looks like this:
┌──────────┐ ┌───────────┐ ┌──────────┐
│ Manual │───▶│ Research │───▶│ Output │
│ Trigger │ │ Agent │ │ │
└──────────┘ └───────────┘ └──────────┘Data flow:
- Trigger provides
{topic: "..."} - Agent receives topic via
{{trigger.input.topic}} - Agent runs and produces output
- Output node captures the result
Template Syntax
Access data from other nodes using double curly braces:
| Expression | Meaning |
|---|---|
{{trigger.input}} | All trigger input |
{{trigger.input.topic}} | Specific field |
{{nodes.agent.output}} | Agent's full output |
{{nodes.myNode.output.field}} | Specific output field |
Common Patterns
Add a Second Agent
Trigger → Agent 1 → Agent 2 → OutputAgent 2 input:
yaml
input: |
Based on this research:
{{nodes.agent1.output}}
Provide a summary.Add Logging
Insert a Transform node to log intermediate data:
Trigger → Agent → Transform (log) → OutputTransform configuration:
javascript
console.log("Agent output:", input);
return input; // Pass through unchangedAdd Error Handling
Wrap with a condition:
Agent → Condition → [Success] → Output
└───→ [Error] → Error HandlerFlow Settings
Configure in the flow settings panel:
| Setting | Description |
|---|---|
| Name | Flow identifier |
| Description | What the flow does |
| Timeout | Max execution time |
| On Error | Stop, continue, or retry |
Debugging
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
yaml
name: Daily Report
description: Generates a daily summary
trigger:
type: schedule
cron: "0 9 * * *" # 9 AM daily
nodes:
- id: gather
type: agent
agent: data-gatherer
input: "Gather metrics for {{today}}"
- id: summarize
type: agent
agent: summarizer
input: "{{nodes.gather.output}}"
- id: output
type: output
value: "{{nodes.summarize.output}}"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
Next Steps
- Conditional Branching - Add if/else logic
- Parallel Execution - Run nodes simultaneously
- Flows Reference - Full documentation
