How to Use Variables in Sparkforge Agent Studio
Sparkforge Agent Studio supports five variable categories — Account, Custom Values, Right Now, Form Data, and Contact — that let you insert real data into prompts and messages with double curly braces.
Variables let an Agent Studio agent pull live data into prompts, messages, and tool inputs instead of hard-coding business details or contact information. Wrap a placeholder in double curly braces ({{contact.first_name}}) and the system replaces it with real data when the agent runs.
The five variable categories
- Account — business name, phone, address, website, logo from Location settings.
- Custom Values — reusable key/value pairs you define under Settings.
- Right Now — live date and time, respecting the sub-account timezone.
- Form Data — populated only when the agent is triggered by a Form Submitted event.
- Contact — saved CRM fields including custom fields.
Why variables matter
- Build one agent template, reuse it across locations.
- Update a phone number once and it propagates everywhere.
- Empty variables return blank instead of breaking the agent.
Custom Values
Custom Values live under Settings > Custom Values. Set a key (support_email) and value (support@yourcompany.com), then reference it as {{custom_values.support_email}}. Update the value once and every agent using it picks up the change.
Account, Right Now, Form Data, Contact
Account variables ({{account.name}}, {{account.primary_phone}}) pull from Location settings. Right Now variables ({{right_now.date}}) insert today's date in the sub-account timezone. Form Data variables ({{form.service_type}}) only resolve when a form submission triggers the agent. Contact variables ({{contact.first_name}}, {{contact.email}}) read directly from the CRM record and update whenever the contact does.
Contact vs runtime variables
Use Contact variables for data already saved on the CRM record. Use runtime variables for values collected during the current conversation. Some nodes — like API Call steps — produce runtime variables that downstream steps can reuse via the variable picker.
Setup steps
- Go to Settings > Custom Values, click Add Custom Value, set a key and value, save.
- Open AI Agents > Agent Studio and select an agent.
- Click into a prompt or message field, click the dropdown arrow or type
{{to open the picker, choose a category, and insert. - Click Save, then Test, and run a sample conversation. If a value is blank, confirm the source data exists.
- Promote to Production once verified.
Variable keys are case-sensitive — match what's shown in the picker exactly.
Frequently Asked Questions
What happens if a variable has no value?
Do Right Now variables respect timezone?
Can I use Form Data variables outside form-triggered agents?
Are variable keys case-sensitive?
Can I reference Opportunity or Task fields?
Was this article helpful?
Thanks for the feedback.