Skip to Content
SWARMIXDocs
Workflows

Build a workflow

Build a workflow in Studio's editor from steps, links and parameters, check it, and save it as your draft.

The workflow editor shows a workflow as steps on a canvas. You add steps, link them in the order they run, and mark the values that change from one run to the next as parameters. Then you check the workflow and save it as your draft.

Before you start

Open the Workflows tab and click New workflow, or Duplicate on a workflow you want to start from. See Workflows.

  1. Click a step kind after "Add a step:" in the toolbar. The step appears on the canvas.
  2. Fill in the step's panel on the right, starting with its Title.
  3. Drag from a step's right edge to the next step to link them.
  4. To remove a step or a link, select it and press Delete.
StepWhat it does
TaskWork for the agent. Write the Instructions for the agent. Add an Agent role for a crew; in a chat with one agent, that agent takes each role
Ask the userA step for you. Describe what you're asked to do, and add form fields (text, numbers, yes or no, pick one, pick several). With no fields, you do the work and press Done
ChoiceYou pick the next branch. Write the question and link the step to at least two next steps
Agent decidesThe agent picks the next branch, by the question you write
GateWaits for the steps before it: each of them, or a number of them. It can stop waiting after some minutes, and an agent can check the results first
LoopRepeats a step at most a number of times, within a token or time budget if you set one. You choose what happens when the budget is spent
Sub-workflowRuns another published workflow as one step

Under a task, Suggested tools tells the agent which tools to use for the step. Suggestions guide the agent; they don't give it any permission it doesn't have. Ends the run as failed on a step stops the run as failed when that step completes.

Use parameters

Parameters hold the values that change from run to run, such as a client name or a file.

  1. Click Parameters in the toolbar, then Add a parameter.
  2. Enter a key, such as client, and choose its type, such as Text, Number, File or Date.
  3. Choose where the value comes from: The user enters it, From an earlier step, Fixed value or The agent finds it.
  4. Write {{client}} in a step's instructions where the value goes.

For From an earlier step, the earlier step declares what it produces under "What this step produces".

Check and save

  1. Click Name and description and give the workflow a name.
  2. Click Check. Fix what it lists, such as a {{key}} that isn't a parameter, until it says "No problems found."
  3. Click Save draft.

If Data Shield is on for your organization, Studio first shows the values it will mask. Click Save masked to save the workflow with those values masked.

After saving, Studio says "Saved as a draft. Submit it for publishing when it is ready." Your draft stays yours until you submit it: see Publish a workflow.

Get help from the assistant

Click Assistant in the toolbar. The assistant reads your draft and proposes changes. Click Accept or Reject on each one.

Best practices

  • Start from a chat that worked. An organization admin can turn a chat into a first draft. See Turn a chat into a workflow.
  • Keep one task per step. Short instructions are easier for the agent to follow and for you to check in the run.
  • Run your draft before you submit it. Only you see its runs.

FAQ

On this page