Goldilocks Docs
AI Agents

Persona Variables

Use dynamic placeholders in persona prompts

Persona variables let you insert dynamic content into your persona's prompts and instructions. They're especially useful when using master persona templates.

What Are Variables?

Variables are placeholders that get replaced with your specific values. For example:

Template prompt:

You are a support agent for {{company_name}}. Help customers with {{product_name}} questions.

Your values:

company_name: "Acme Corp"
product_name: "Widget Pro"

Result:

You are a support agent for Acme Corp. Help customers with Widget Pro questions.

Using Variables

From Templates

When you create a persona from a master template:

  1. Select the template
  2. You'll see required and optional variables
  3. Fill in your values
  4. Save the persona

Required variables must be filled; optional variables have defaults.

Variable Types

TypeExampleDescription
Company Name"Acme Corp"Your company/brand name
Product Name"Widget Pro"Specific product
Support Email"help@acme.com"Where to direct inquiries
Support Hours"9am-5pm EST"Business hours
CustomVariousAny text value

Common Variables

Company Information

  • {{company_name}} - Your company name
  • {{company_description}} - Brief description
  • {{industry}} - Your industry

Product Information

  • {{product_name}} - Product being supported
  • {{product_description}} - What it does
  • {{product_features}} - Key features

Contact Information

  • {{support_email}} - Support email address
  • {{support_phone}} - Phone number
  • {{support_hours}} - When support is available
  • {{support_url}} - Link to support page

Policies

  • {{return_policy}} - Return policy summary
  • {{shipping_info}} - Shipping information
  • {{warranty_terms}} - Warranty details

Editing Variables

To update variable values:

  1. Go to AI Agents > Personas
  2. Open the persona
  3. Find the Variables section
  4. Update values
  5. Save

Changes take effect immediately.

Creating Custom Variables

If using custom prompts (not templates):

In Custom Instructions

You can reference variables in custom instructions:

Always mention that customers can reach us at {{support_email}} 
for complex issues.

Defining Variables

Define what variables exist:

  1. Open persona configuration
  2. Find custom variables section
  3. Add variable name and value
  4. Reference using {{variable_name}}

Best Practices

Use Consistent Naming

Follow a naming convention:

  • company_name
  • CompanyName
  • company-name

Keep Values Updated

When company information changes:

  1. Update variable values
  2. Changes apply to all prompts using that variable

Document Your Variables

Maintain a list of:

  • All variables used
  • Current values
  • Where they appear

Test After Changes

After updating variables:

  1. Test in preview
  2. Verify values appear correctly
  3. Check for formatting issues

Variable Inheritance

When using master templates:

Template Variables

Defined by the template creator:

  • Usually required
  • Have specific purposes

Your Values

Your specific values for those variables:

  • Must meet any requirements (length, format)
  • Override template defaults

Updates

If the template is updated:

  • New variables may appear
  • Existing variable values are preserved

Troubleshooting

Variable Not Replacing

If you see {{variable_name}} in outputs:

  1. Check variable name matches exactly
  2. Verify value is set
  3. Check for typos in curly braces

Value Too Long

Some variables have length limits:

  1. Shorten your value
  2. Or use abbreviated version

Special Characters

If values contain special characters:

  1. Test in preview
  2. Some characters may need escaping
  3. Avoid quotes within quoted values