Skip to content

Understanding Workflows (Flows)

Flows let you chain agents together into automated pipelines. Instead of manually running each step, you define the sequence once and let it run on its own.

What is a Flow?

A flow is a visual diagram that defines:

  1. When to start (trigger)
  2. What to do (agents and actions)
  3. How to decide (conditions)
  4. Where to go next (connections)

Flow Editor — Visual workflow builder

Common Use Cases

Flow TypeExample
Research PipelineFind papers Summarize Create ticket
Code ReviewAnalyze code Check security Wait for approval Merge
Data ProcessingFetch data Clean Analyze Generate report
Ticket AutomationNew ticket Triage Assign Notify team
Research AutomationSearch papers Annotate PDFs Update references Create summary

Building Blocks

Triggers

Every flow starts with a trigger:

TriggerWhen it fires
ManualYou click "Run" (supports inputSchema for defining expected input fields)
ScheduleAt specific times using cron expressions
Ticket CreatedWhen a new ticket is created (with optional ticket filter)
Ticket UpdatedWhen a ticket changes (with optional ticket filter)

Nodes

Nodes are the steps in your flow:

Node TypeWhat it does
AgentRuns an AI agent with input/output mapping and optional worktree isolation
ConditionRoutes based on conditions using JSONPath, operators (eq, ne, gt, lt, contains, matches), and logic (AND/OR/XOR with optional negation)
WaitPauses for human approval, user input, or a timeout
ParallelSplits into multiple concurrent branches
MergeJoins branches with strategy: wait for all, any, or first
Ticket ActionCreates, updates, comments, labels, or links resources on tickets
TransformModifies data using jq queries, templates, or scripts
EndMarks the end of an execution path (success, failure, or cancelled)

Connections

Lines between nodes show the execution order. For condition nodes, you'll have two paths: one for "yes" and one for "no".

Creating Your First Flow

  1. Go to Flows in the sidebar
  2. Click New Flow
  3. Drag a Trigger node onto the canvas
  4. Drag an Agent node and connect it
  5. Configure each node's settings
  6. Click Save
  7. Click Run to test

Passing Data Between Nodes

Agent nodes use input mapping and output mapping to pass data through a shared execution context:

  • inputMapping maps agent input schema fields to context paths (e.g., { "topic": "trigger.input.topic" })
  • outputMapping maps agent output schema fields back to context paths (e.g., { "summary": "nodes.summarizer.output" })

The execution context is a shared data store that all nodes read from and write to as the flow progresses.

Controlling Execution

Flow execution status progresses through: Pending, Running, Paused, Completed, Failed, or Cancelled.

While a flow runs, you can:

  • Pause it to inspect progress
  • Resume after pausing
  • Cancel to stop entirely
  • Inject data when a Wait node needs input

Debug Mode

Enable Debug Mode to step through your flow node by node:

  • Step — execute the next node and pause
  • Continue — run until the next breakpoint or completion
  • Stop — cancel the execution
  • Skip — skip a node and provide mock output
  • Modify Input — change a node's resolved inputs before it runs
  • Modify Output — change a node's output after it runs

Debug Mode shows resolved inputs, expected next nodes, and actual output at each breakpoint (before or after node execution).

Error Recovery

When a node fails during execution (outside Debug Mode), the flow pauses and presents recovery options:

  • Retry — re-execute the failed node
  • Skip — skip the node and provide mock output to continue the flow
  • Stop — cancel the entire execution

Best Practices

Start simple. Build a linear flow first, then add conditions and parallelism.

Name nodes clearly. "Summarize Papers" is better than "Agent 1".

Test incrementally. Run after adding each node to catch problems early.

Handle errors. Use error recovery to retry or skip failed nodes, or add condition nodes to check for failures.

Use worktrees for isolation. Agent nodes support worktree mode (none, new, or inherit) to give each agent its own Git worktree. New worktrees can auto-merge on success and clean up on completion. Use inherit to share a worktree between nodes.

Use labels. Organize flows with labels for easy filtering and discovery.

Avoid infinite loops

If you create cycles in your flow, set the maxIterations property (default: 5) to limit how many times a node can execute in a loop.

Next Steps

Sciorex is proprietary software.