Custom Variables
Create reusable variables to personalize your AI agent prompts across interviews.
What are Custom Variables?
Custom variables let you define placeholders like {{company_background}} or {{research_focus}} that can be filled in differently for each interview. This allows you to:
Reuse prompts across different research projects
Customize interviews without editing the agent prompt each time
Ensure consistency with required fields that must be filled in
Provide defaults for optional information
System Variables vs Custom Variables
System Variables (Built-in)
InsightAgent provides these variables automatically:
{{expert_name}}
Expert's full name
{{client_name}}
Your organization name
{{questions_list}}
Interview questions
{{call_subject}}
Interview topic
{{compliance_disclaimer}}
Legal disclaimer
{{expert_current_role}}
Expert's current position
{{expert_employment_history}}
Expert's work history
Custom Variables (Your Own)
Create your own variables for project-specific information:
{{company_background}}
Target company context
{{research_focus}}
Specific research area
{{competitor_list}}
Competitors to explore
{{industry_context}}
Industry-specific details
Creating Variables
Navigate to Settings
Go to Settings in the sidebar
Click Variables
Click Add Variable
Define the Variable
Name
Variable key used in prompts (e.g., company_background)
Yes
Display Name
Human-readable label shown in forms (e.g., "Company Background")
Yes
Description
Help text explaining what to enter
No
Required
Whether a value must be provided for each interview
No
Default Value
Fallback value if not specified
No
Variable Name Rules
Variable names must:
Start with a letter (a-z, A-Z)
Contain only letters, numbers, and underscores
Be unique within your account
Valid examples: company_name, targetMarket, research_focus_2024
Invalid examples: 123name, has-hyphen, has spaces
Using Variables in Prompts
Reference variables in your agent prompts using double curly braces:
Required vs Optional Variables
Required Variables
Mark a variable as required when every interview using that agent needs a value:
Interviews cannot be created without providing a value
The form shows a red asterisk (*) next to required fields
Save button is disabled until all required fields are filled
Use for: Critical context the AI needs to conduct the interview properly.
Optional Variables
Leave a variable as optional when it's helpful but not essential:
Interviews can be created without a value
If no value is provided, the default value (if set) is used
If no default exists, the variable is replaced with empty text
Use for: Additional context that enhances but isn't critical to the interview.
Default Values
Set a default value for optional variables to ensure the prompt always has meaningful content:
Interview Workflow
Creating an Interview
When creating an interview with an agent that uses custom variables:
Select the agent for your interview
A Custom Variables section appears with fields for each variable
Required fields are marked with a red asterisk (*)
Default values are pre-filled (you can change them)
Fill in the values and save
Editing an Interview
You can update variable values before the interview is conducted:
Open the interview detail page
Find the Custom Variables section
Click Edit to modify values
Click Save to apply changes
Changing Agents
When changing an interview's agent to one with different variables:
Click Change Agent on the interview
A preview modal shows the new agent's variables
Fill in any required values
Confirm to apply the change
Deleting Variables
Variables that are used by agent prompts cannot be deleted. To delete a variable:
Remove the
{{variable_name}}reference from all agent promptsReturn to Settings → Variables
The Delete option becomes available
Best Practices
Naming Conventions
Use descriptive, consistent names:
Required vs Optional
Make variables required when the AI cannot perform well without them
Make variables optional when they add context but aren't critical
Always provide default values for optional variables when possible
Organization
Create variables at the account level so they can be reused across agents
Use similar variable names across related agents for consistency
Document variable purposes in the description field
Prompt Writing
Reference variables where they make sense contextually
Don't overload prompts with too many variables
Test prompts with different variable values to ensure they work well
Troubleshooting
"Missing required variables" error
This occurs when trying to save an interview without filling in all required variable values. Fill in all fields marked with (*).
Variable not being replaced
Check that:
The variable name in the prompt exactly matches the defined name
The syntax is correct:
{{variable_name}}with double curly bracesThe variable is linked to the agent version being used
Can't delete a variable
The variable is still referenced in one or more agent prompts. The error message shows which agents use the variable. Remove the references first, then delete.
Last updated