Steps & Prompts
Steps are the building blocks of every agent. Each step runs an LLM prompt or executes a tool, and passes its output to the next step in the chain.
Step Structure
Every step has a runtime type, a prompt (for LLM steps), and an execution order. Steps run sequentially from lowest to highest order.
{
"id": "step-research",
"name": "research", // URL-safe identifier
"displayName": "Research Phase", // Shown in the UI
"runtime": "llm", // "llm" or "tool"
"phase": "research", // UI label (optional)
"prompt": "Research this topic: {{input}}",
"order": 0, // Execution order
"enabled": true // Toggle on/off without deleting
}LLM Prompt
Sends the prompt to your router, which selects the best model. The response becomes the step's output. This is the most common step type.
Tool Execution
Runs a built-in tool (e.g. builtin_calculator) or a custom webhook tool. Requires a toolId instead of a prompt. Useful for deterministic operations like calculations or API calls.
Phase Labels
Phases are optional UI labels that help organize steps visually. They don't affect execution logic — they're purely for categorization.
Use double-brace variables in your prompts. These are replaced at runtime with actual values.
{{input}}The original user message. Available in every step.
{{previous_output}}Output from the immediately preceding step. Empty for the first step.
{{step_N_output}}Output from a specific step by index (e.g. {{step_0_output}} for the first step).
Example: Multi-Step Research Agent
// Step 0: Research (phase: research)
"Research the following topic thoroughly: {{input}}
List key facts, statistics, and expert opinions."
// Step 1: Outline (phase: plan)
"Based on your research: {{previous_output}}
Create a structured outline with sections and sub-points."
// Step 2: Write (phase: execute)
"Using this outline: {{previous_output}}
And the original research: {{step_0_output}}
Write a comprehensive, well-cited article."
// Step 3: Review (phase: review)
"Review this article for accuracy and clarity: {{previous_output}}
Fix any issues and output the final version."Toggling & Reordering
Disable without deleting
Click the step number circle to toggle a step on/off. Disabled steps are skipped during execution but kept in the configuration.
Drag to reorder
Use the grip handle on the left of each step card to drag and drop steps into a new order. The order field is updated automatically.
Tips
- Keep prompts focused — one task per step works better than cramming everything into one.
- Use the
reviewphase as a final quality gate to catch hallucinations. - The
{{input}}variable lets any step reference the original user message. - Set
streamFinalOnly: truein settings to only stream the last step's output.