Sequences let you chain multiple agent prompts into a single automated workflow. Instead of manually sending follow-up prompts after each agent run, you define all the steps upfront, optionally add template variables to make the sequence reusable, and choose whether the agent should apply each checkpoint automatically or pause for your approval between steps. AgentSwarm then orchestrates the full run from start to finish.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/coretracker/agentswarm/llms.txt
Use this file to discover all available pages before exploring further.
Sequence Structure
A sequence has a name, an execution mode, an ordered list of steps, and an optional list of variables.Display name for the sequence. Maximum 120 characters.
Controls how checkpoints between steps are handled. Either
auto_apply_changes or approve_before_continuing. See Execution Modes below.Ordered list of steps to execute. Minimum 1 step, maximum 100 steps. Each step is either an
inline prompt or a reference to a saved snippet.Template variables that can be substituted into step prompts at run time. Maximum 100 variables. See Variables below.
Step Types
Each step in a sequence has atype field that determines where its prompt content comes from.
inline — Direct Prompt
inline — Direct Prompt
An inline step contains the prompt text directly. The
prompt field is required and must not be empty. Maximum prompt length is 20,000 characters.snippet — Reference to Saved Snippet
snippet — Reference to Saved Snippet
A snippet step references a saved snippet by its ID. The snippet’s content is resolved at sequence execution time, so updating the snippet automatically affects all sequences that reference it. The
snippetId field is required.Variables
Variables make sequences reusable across different contexts. Define variables on the sequence and reference them in step prompts using{{variable_name}} syntax. When a sequence is run, the caller supplies values for each variable, which are substituted into the prompts before execution.
Variable identifier. Must match the pattern
/^[A-Za-z_][A-Za-z0-9_]*$/. Maximum 128 characters. Must be unique within the sequence.Either
text (single-line input) or multiline (multi-line input). text variables must not have a default value containing line breaks.Human-readable label shown in the sequence run form. Maximum 200 characters.
Explanatory text shown alongside the variable input. Maximum 200 characters.
Pre-filled value used when the caller does not supply a value. Maximum 2,000 characters.
Variable Syntax
Reference a variable in any step prompt by wrapping its name in double curly braces:{{component_name}} and {{file_path}} are replaced with the values provided by the caller.
Execution Modes
auto_apply_changes
After each step’s agent run completes, any pending checkpoint is applied automatically and the next step starts immediately. The full sequence runs end-to-end without human intervention.If a checkpoint cannot be auto-applied (for example, because the task is in an unexpected state), the sequence pauses and waits for manual resolution before recovering.
approve_before_continuing
After each step completes, the sequence pauses with status
waiting_for_approval. A human must explicitly approve before the next step is allowed to run. This lets you inspect intermediate changes between steps before the agent continues.Creating a Sequence
Set name and execution mode
Give the sequence a name (up to 120 characters) and choose whether steps should auto-apply or require approval between them.
Add steps
Add one or more steps. For each step, choose
inline and write a prompt, or choose snippet and select a saved snippet. Step IDs are assigned automatically if not provided.Add variables (optional)
Define template variables if you want the sequence to be parameterized. Variable names must match
/^[A-Za-z_][A-Za-z0-9_]*$/.Running a Sequence
To run a sequence, create a task withtask_source set to sequence and provide the sequence_id. If the sequence defines variables, pass their values in sequence_variables.
Sequence Run Statuses
| Status | Description |
|---|---|
running | A step is currently executing. |
waiting_for_approval | approve_before_continuing mode: paused between steps, awaiting human approval. |
waiting_for_checkpoint_resolution | Auto-apply mode: a checkpoint is pending and must be resolved before the sequence can continue. |
succeeded | All steps completed successfully. |
failed | A step failed; the sequence stopped. |