Documentation Index
Fetch the complete documentation index at: https://docs.tryhamsa.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Set Local Variables nodes assign values to variables without any conversation. They execute instantly and automatically advance to the next connected node. Use them to initialize data, transform values, or prepare variables before they’re needed downstream. Key characteristic: No conversation, no user interaction. The node sets variables and immediately moves on.When to Use
Use Set Local Variables nodes to:- Initialize variables before a conversation or tool node needs them
- Transform data — reformat, combine, or compute values from existing variables
- Set defaults — provide fallback values for variables that may not be extracted yet
- Prepare API parameters — assemble values before a tool node call
- Store computed results — save derived data for later use in the flow
Core Configuration
Variables set in this node are available to all downstream nodes in the flow.
Variable Configuration
Each variable has four fields:| Field | Required | Description |
|---|---|---|
| Name | Yes | Variable name in snake_case format |
| Type | Yes | Data type: String, Number, Boolean, Array (JSON), Object (JSON) |
| Value | Yes | The value to assign — static or {{variable}} reference |
| Description | No | Optional description for documentation |
Value Input by Type
| Type | Input | Example |
|---|---|---|
| String | Text input with variable support | "hello" or {{user_name}} |
| Number | Numeric input with variable support | 42 or {{order_total}} |
| Boolean | Toggle switch | true / false |
| Array | JSON editor | ["item1", "item2"] |
| Object | JSON editor | {"key": "value"} |
{{variable}} references, allowing you to set a variable based on another variable’s value.
Use Cases & Examples
Example 1: Initialize Variables Before a Loop
Example 2: Combine Variables
Example 3: Set Defaults
Example 4: Prepare API Parameters
Transitions
Set Local Variables nodes use an automatic transition — they execute and immediately advance to the next connected node. You cannot add, remove, or edit transitions on this node type. Connect the node’s output to the next node in your flow. The connection is always unconditional.Flow Examples
Pattern: Initialize → Collect → Process
Pattern: Transform Between Nodes
Next Steps
Change Agent Settings
Override agent settings mid-flow
Variables
Learn about the variable system
Tool Node
Execute tools with variable parameters
Router Node
Route based on variable values