Skip to main content

Workflows

A Workflow is an ordered sequence of stages executed by a team. It defines what work gets done, in what order, and by which agents.

In This Section

  • Stages -- Stage configuration: name, description, summary mode, runtime, capture protocol, max cycles.
  • Assignments -- Assigning agents to stages: task directives, capabilities, tools, documents, share result keys.
  • Hooks -- Entry and exit hooks: automated actions at stage boundaries.
  • Outcomes & Routing -- Stage outcomes, branching, looping, and loop guards.
  • Triggers -- Automated workflow execution: cron schedules, timezones, start/end dates.
  • Templates -- Pre-built workflow configurations for quick installation.

Creating a Workflow

Inside a project, create a new workflow:

  1. Give it a name and optional description.
  2. Assign it to a team — the agents available for stage assignments come from this team.
  3. Add stages in the order you want them executed.

Stages

Each stage represents a discrete step in the workflow. Stages execute in order -- the output of one stage becomes context for the next. See Stages for the full configuration reference.

A stage defines:

FieldDescription
NameLabel for the stage (e.g., "Research", "Draft", "Review")
TaskWhat the agents should accomplish. Be specific.
Agent AssignmentsWhich agents participate, in what order, and in which phase.
Entry / Exit HooksActions that run automatically when the stage begins or ends.
OutcomesPossible results the stage can produce.
Outcome RoutingWhere to go next based on the outcome — enabling branches and loops.
Summary Modeindividual (each agent summarizes) or shared (collective summary).
Max CyclesSafety limit on how many times the stage can execute in a single run (default: 30).
Max Stage VisitsHow many times the workflow can re-enter this stage via routing (default: 5).

Agent Assignments and Phases

You assign agents from the team to each stage. The order matters -- agents execute in the order they're assigned. See Assignments for details on task directives, capabilities, and tool access. Each assignment also has a phase that controls when the agent is active:

PhaseWhen it runs
defaultActive throughout the stage — the main working phase.
on_stage_startRuns once at the beginning of the stage, before other agents.
on_stage_completeRuns once when the stage finishes, after other agents.

Use phases to separate setup work (e.g., fetching data at stage start) from the core task and from cleanup or summarization at stage end.

Hooks

Stages support entry hooks and exit hooks -- actions that execute automatically when the stage begins or ends. See Hooks for details on hook types, configuration, and when to use hooks vs agent phases.

Outcomes and Routing

By default, stages execute in linear order. But with outcomes and outcome routing, workflows can branch and loop. See Outcomes & Routing for details on branching, looping, and loop guards.

  1. Define outcomes on a stage — the possible results it can produce (e.g., "approved", "needs_revision", "rejected").
  2. Define outcome routing — map each outcome to a target stage.

For example, a "Review" stage might route "approved" to "Publish" and "needs_revision" back to "Draft", creating an iterative review loop. The max_stage_visits setting prevents infinite loops.

Triggers

Workflows can be triggered automatically on a schedule using Triggers. See Triggers for details on cron expressions, timezones, and scheduling options.

  • Define a schedule using natural language ("every weekday at 9am") or a raw cron expression.
  • Set a timezone, and optional start/end dates.
  • Use Fire Now to manually trigger a scheduled workflow immediately.

Running a Workflow

Click Run on any workflow to start execution. This creates a Workflow Run that tracks:

  • Overall status: pendingrunningcompleted / stopped / error.
  • Per-stage status and results.
  • Timing information.

You can monitor runs from the project page or the workflow detail page.

Templates

Workflows can be exported as templates for reuse. See Templates for details on browsing the library, installing templates, and previewing sample runs.