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:
- Give it a name and optional description.
- Assign it to a team — the agents available for stage assignments come from this team.
- 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:
| Field | Description |
|---|---|
| Name | Label for the stage (e.g., "Research", "Draft", "Review") |
| Task | What the agents should accomplish. Be specific. |
| Agent Assignments | Which agents participate, in what order, and in which phase. |
| Entry / Exit Hooks | Actions that run automatically when the stage begins or ends. |
| Outcomes | Possible results the stage can produce. |
| Outcome Routing | Where to go next based on the outcome — enabling branches and loops. |
| Summary Mode | individual (each agent summarizes) or shared (collective summary). |
| Max Cycles | Safety limit on how many times the stage can execute in a single run (default: 30). |
| Max Stage Visits | How 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:
| Phase | When it runs |
|---|---|
default | Active throughout the stage — the main working phase. |
on_stage_start | Runs once at the beginning of the stage, before other agents. |
on_stage_complete | Runs 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.
- Define outcomes on a stage — the possible results it can produce (e.g., "approved", "needs_revision", "rejected").
- 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:
pending→running→completed/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.