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.
Variable References
Use double curly braces in text fields:
Valid Examples
"Hello {{customer_name}}, your appointment is at {{appointment_time}}"
"Your order #{{order_id}} will arrive on {{delivery_date}}"
Invalid Examples
{user_input} ❌ Single braces
{{User Input}} ❌ Spaces
{{user-input}} ❌ Hyphens
{{userInput}} ❌ camelCase not allowed
{{ user_input }} ❌ Spaces inside braces
Template Validation
The system checks:
- Existence: Referenced variable exists
- Syntax: Valid
{{name}} form
- Types: Value matches declared type where relevant
- Availability: Variable is available at the current node (flow agent)
Naming Conventions
All variables must follow these rules:
Rules
- Format:
snake_case only
- Start: Lowercase letter (a–z)
- Characters: Lowercase letters, digits, underscores
- Length: 1–50 characters
- Reserved: Do not reuse system variable names
Valid Examples
customer_name ✅
appointment_date_1 ✅
user_phone_number ✅
api_response_data ✅
is_premium_user ✅
Invalid Examples
customerName ❌ camelCase
Customer_Name ❌ Capital letters
customer-name ❌ Hyphens
customer name ❌ Spaces
123_customer ❌ Starts with number
_customer_name ❌ Starts with underscore
customer_name! ❌ Special characters
See System Variables for reserved names and Validation for how errors are shown.
Jinja2 Template Syntax
Prompts support full Jinja2 template syntax beyond simple {{variable_name}} substitution. You can use conditionals, filters, and any standard Jinja2 expression:
{% if direction == "outbound" %}
Hi {{customer_name}}, I'm calling from Acme Corporation.
{% else %}
Thanks for calling! How can I help you today?
{% endif %}
Your balance is {{balance | default("unavailable")}}.
Templates are processed server-side — the LLM receives the rendered output, not the template. For the full syntax reference including all filters, tests, and operators, see the Jinja2 Template Designer Documentation.