Configure step nodes
Instruction Node
An Instruction Node is your catch-all building block for any discrete “step” in a flow that isn’t purely a conditional fork or an API call. It’s where you tell the AI what to do or say, and optionally attach actions to execute.
Think of it like a general-purpose container: you give it a name, write instructions, wire in any variables, or action results, and the flow moves on once those actions complete (or immediately if there are none).
1. Purpose
-
Primary Use: Encapsulate a single, self-contained step—this could be a spoken reply, a data lookup, or triggering a function.
-
Versatility: an Instruction Node can combine a conversational instruction and one or more actions (API calls, database writes, etc.).
-
Flow Control: the node simply executes the instruction and immediately hands off to its next node
Instruction Node Fields & Configuration
-
Step Name
-
What It Is: The identifier for this step. The AI agent reads this first.
-
Best Practice: Use a short verb-driven phrase that describes this step’s role—e.g., “Gather Email,” “Fetch Recent Orders,” “Confirm Subscription,” “Send Follow-Up.”
-
Why It Matters: Clear step names make your flow easy to scan, debug, and maintain by you and also by the AI agent.
-
-
Instructions
-
What It Is: A free-form text box where you describe exactly what you want the AI Assistant to do or say at this step.
-
Formatting Options:
-
Variables {}: Insert any dynamic data placeholders (e.g., {user_name}, {order_id}). The flow replaces these with real values at runtime.
-
Action Results <: Pull in results from previously executed actions (e.g., <getUserProfile.name>, <fetchWeather.forecast>).
-
-
Guidelines:
-
Be Explicit: If you need the assistant to ask a question, say “Ask the user: ‘What is your email address?’ or ‘Ask the user email”
-
Keep It Focused: Don’t cram multiple responsibilities into one Instruction. If you need first to greet, then to validate data, consider splitting them into separate steps.
-
-
-
Variables
-
What They Are: Named data points that flow in or out of this step.
-
How They Work:
-
Inputs: Variables you reference in the Instruction (e.g., {user_id}) must be defined here—or inherited from an earlier node.
-
Outputs: If your Instruction or Custom Action sets a new variable (e.g., “Store the user’s answer in {email_address}”), declare it here so downstream nodes can read it.
-
-
Why It Matters: Properly declared variables ensure data flows predictably through your conversation. Undeclared/mismatched names cause runtime errors.
-
4. Extract Variables During Execution
-
What It Is: A mechanism to pull out and persist specific pieces of information from the AI’s generated response at runtime.
-
How to Configure:
-
Under Extract Variables, click Add Variable.
-
Name: Give the variable a clear identifier (e.g. issue_type, confirmation_code).
- ! Very important to have clear variable names,
-
Type: Choose String, Number, Integer, Boolean, List, Object
-
Extraction Rule: Provide a simple instruction that tells the system how to extract the user’s reply (e.g., “What is the user’s email?)
-
Required: If checked, the flow will loop back or trigger an error branch when extraction fails.
-
-
Runtime Behavior: After the AI sends its message, the engine applies your extraction rule, stores the result in {your_variable}, and makes it available to all downstream nodes—just like a collected or action-result variable.
Use Extract Variables when you need to capture free-form data directly from the AI’s generated text without an explicit “Ask the user…” prompt.
Best Practices & Tips
-
Name Consciously
-
Bad: “Step 7” or “Do Something.”
-
Good: “Validate Email Format,” “Charge Card,” “Present Upsell Offer.”
-
-
Single Responsibility
- Each Step Node should do one primary thing: either speak/ask, or set context. If you mix too many actions and a long prompt in one node, it becomes hard to manage.
-
Avoid Long, Block-Style Instructions
-
If your Instruction reads like a short essay (five sentences or more), consider breaking it into two smaller steps: one to outline context, another to ask/act.
-
You or any human should be able to glance at “Instructions” and understand what the AI is doing.
-