Overview
Variable Inputs enable AI agents to collect specific information from users before starting a conversation. By defining variables that users must complete, agents receive essential context upfront—eliminating repetitive questions and delivering personalized, relevant responses from the first message.
Learning Objectives:
Define variables using
{{variable_name}}syntax in system promptsConfigure input types (text, dropdown, number, date) for each variable
Apply validation rules to ensure data quality
Design user-friendly input forms that streamline conversations
Implement advanced features like API-sourced dropdowns
Prerequisites
You'll Need:
An existing AI agent you own and can edit
Understanding of the information your agent needs before chatting
For API dropdowns: accessible endpoint that returns options in correct format
Clear use case for why pre-chat data collection improves agent performance
Define Variables in System Prompt
Add Variables to Agent Instructions
Open agent edit interface
Navigate to the "Agents" icon
Find your agent in the list
Click three-dot menu (⋯) → Select "Edit Agent"
Access Instructions or System Prompt
In agent edit interface, locate "Instructions" field
Insert variables using double curly braces
You are a support agent helping with {{product_name}} issues. The customer's account type is {{account_tier}} and they're using version {{version_number}}. Their primary use case is {{use_case}}.Use variables naturally in context
Reference variables where they make grammatical sense
Include multiple variables throughout prompt
Ensure each variable serves a clear purpose
Result: Variables are automatically detected by system and appear in Variable Inputs configuration tab.
Tip: Use descriptive names like {{project_name}} instead of {{pn}} for clarity.
Configure Variable Inputs Settings
Access Variable Configuration
Navigate to Variable Inputs tab
In agent edit interface, find tabs across the top
Click "Variable Inputs" tab
Form appears with detected variables listed
Configure each variable
Setting | Purpose | Example |
Display Name | Label users see | "Product Name" |
Input Type | Field format | Text, Dropdown, Number, Date |
Required | Mandatory field | Checkbox (checked = mandatory) |
Default Value | Pre-populated info | "Premium Plan" |
Description | Helper text | "Which product are you contacting us about?" |
Validation Rules | Input constraints | Pattern, min/max, error message |
Configure Input Types
Text Inputs
Select "Text" in Input Type dropdown
Recommended for: Free-form information like names, IDs, descriptions
Enable pattern validation (optional)
Best for: Names, email addresses, project IDs, descriptions
Dropdown Inputs
Select "Dropdown" in Input Type dropdown
Choose option source:
Static Options: Manually entered list
API Source: Dynamic loading from endpoint
Configure static options
Configure API source (advanced)
Best for: Product names, issue categories, account tiers, departments
Number Inputs
Select "Number" in Input Type dropdown
Set minimum and maximum values
Set decimal places (optional)
Best for: Team size, budget amounts, quantity, percentages
Date Inputs
Select "Date" in Input Type dropdown
Configure date
Best for: Project deadlines, report date ranges, milestone dates
Set Validation Rules
Ensure Data Quality
Mark required fields
Add custom error messages
Test validation logic
Result: Users cannot proceed with invalid or missing data.
User Experience
What End Users See
Agent profile and description
Users see agent name, avatar, and description first
Input form appears
Form submission
Conversation begins
Agent receives all variable values in system prompt
Agent immediately uses context in responses
No repetitive questions needed
Result: Streamlined experience with all context pre-loaded.
Best Practices
Writing Good Variable Names
Use clear, descriptive names:
{{project_name}}instead of{{pn}}Use underscores for multi-word:
{{account_tier}}not{{accountTier}}Stay consistent across all agents
Creating User-Friendly Forms
Keep required fields minimal - Only collect essential information
Provide clear descriptions - Explain why information is needed
Use appropriate input types - Match field type to data format
Group related variables - Configure in logical order
Set smart defaults - Pre-populate when possible to reduce user effort
System Prompt Integration
Reference variables naturally: "You're helping with {{product_name}} issues"
Use variables to create conditional instructions
Ensure variable substitution reads grammatically correctly
Test prompt with sample values
Example Use Cases
Customer Support Agent
Variables Collected:
{{account_id}}- Text input with pattern validation{{issue_category}}- Dropdown: "Technical, Billing, Account"{{urgency_level}}- Dropdown: "Low, Medium, High, Critical"
Agent Benefit: Immediately knows customer context and prioritization
Sales Assistant
Variables Collected:
{{industry}}- Dropdown from API (industry database){{company_size}}- Dropdown: "1-10, 11-50, 51-200, 200+"{{current_tools}}- Text input (comma-separated list)
Agent Benefit: Provides tailored product recommendations based on company profile
Project Management Bot
Variables Collected:
{{project_name}}- Text input (required){{team_size}}- Number input (min: 1, max: 100){{timeline_date}}- Date input (cannot be past date)
Agent Benefit: Suggests appropriate methodologies and tools based on project scope
Analytics Assistant
Variables Collected:
{{data_source}}- Dropdown: "CRM, Database, Analytics Platform"{{time_period}}- Text (date range format: "YYYY-MM-DD to YYYY-MM-DD"){{metrics}}- Dropdown: "Revenue, Users, Conversion, All"
Agent Benefit: Immediately generates relevant reports with specified parameters
Troubleshooting
Variable Not Appearing in Form
Cause: Variable not properly formatted in system prompt
Solution:
Verify variable uses correct format:
{{variable_name}}Check that you didn't delete it from the prompt
Ensure no spaces in variable name:
{{product_name}}not{{product name}}Save agent settings and refresh page
Dropdown Options Not Loading
For Static Options:
Verify at least one option is added
Check that label and value are both populated
For API Source:
Ensure API endpoint is accessible (not blocked by CORS)
Verify API returns correct JSON format
Check label/value mappings match response structure
Add authentication headers if API requires them
Validation Rules Not Working
Cause: Incorrect rule configuration
Solution:
Check required field toggle is enabled
Verify pattern regex is valid
Ensure number ranges are logical (min < max)
Test with preview form if available
Form Layout Issues
Cause: Too many variables or poor ordering
Solution:
Reduce number of required fields
Reorder variables in more logical sequence
Group related fields together
Use clear descriptions to reduce confusion
Common Questions
Q: Can I add variables after creating the agent?
A: Yes. Edit agent → Update system prompt with new {{variables}} → Configure them in Variable Inputs tab.
Q: Can I make variables optional?
A: Yes. Toggle "Required" off for any variable. Users can skip optional fields.
Q: Can I change variable order after creation?
A: Yes. In Variable Inputs tab, drag variable rows to reorder. Order affects form display.
Q: Can I hide certain variables from end users?
A: No. All defined variables appear in the form. To hide data, use default values or connect datastores instead.
Q: Can variables have default values that users can override?
A: Yes. Enter default value in configuration. Users can accept it or change it.
Q: Can I use the same variable across multiple agents?
A: Yes, but each agent must define it in its own Variable Inputs tab. Variable scope is per-agent.
Q: How many variables can I add?
A: No hard limit, but forms with 6+ variables become cumbersome. Keep required fields under 5.
Q: Can I use variables in agent instructions AND system prompt?
A: Yes. Variables are replaced throughout the agent configuration wherever {{variable_name}} appears.















