AI Agent prompt variables
When writing the prompt of an AI Agent under Prompt Configuration, you can use variables in double curly braces — e.g. {{today_formatted}} — that the system substitutes automatically with the real value in every conversation.
🕐 Date and time variables
Useful when your agent has to reason about "today", "tomorrow" or time-slot availability.
| Variable | Example | When to use it |
|---|---|---|
{{current_time}} | 15:47 | Current time (HH:MM) |
{{current_date}} | 17/04/2026 | Today in short format |
{{current_iso_date}} | 2026-04-17 | ISO date — ideal for API calls |
{{current_day_name}} | Friday | Day-of-week name |
{{today_formatted}} | Friday April 17 | Human-readable date to say to customers |
{{tomorrow_iso_date}} | 2026-04-18 | Tomorrow in ISO |
{{tomorrow_formatted}} | Saturday April 18 | Tomorrow human-readable |
{{next_monday_iso_date}} | 2026-04-20 | Next Monday in ISO |
{{agent_timezone}} | Europe/Madrid | Agent timezone |
{{workspace_timezone}} | Europe/Madrid | Workspace timezone |
🏷️ Identity variables
| Variable | Example | When to use it |
|---|---|---|
{{agent_name}} | Laura | Agent name, set when creating it |
{{workspace_name}} | La Espiga Bakery | Workspace name |
📅 Calendar variables (Cal.com)
Substituted only if you have "Calendar Commands (Cal.com)" enabled in the agent config. They are not "values" — they are tools your agent can invoke during the conversation.
| Variable | What the agent does when invoking it |
|---|---|
{{cal_check_availability}} | Checks available calendar slots |
{{cal_create_booking}} | Creates a new booking |
{{cal_modify_booking}} | Moves an existing booking |
{{cal_cancel_booking}} | Cancels a booking |
{{cal_list_bookings}} | Lists bookings for a given email |
{{cal_*}} variables to work you need these 3 items:
- Cal.com API Key (Settings → Developer → API Keys in your Cal.com account).
- Event Type ID — the numeric ID of the event type bookings will be created for.
- Agent timezone (optional if it matches the workspace).
Without these, {{cal_*}} variables are silently removed from the prompt and the agent will ignore anything the prompt says about calendar actions.
With everything set, the typical flow is:
- User: "I'd like an appointment tomorrow morning"
- The model invokes
cal_check_availabilityfor tomorrow. - Cal.com returns the actual free slots.
- Agent: "I have 09:00, 10:30 and 11:00. Which one do you prefer?"
- User picks → agent asks for name and email → invokes
cal_create_booking→ confirms.
🎨 Agent custom variables
The agent config has a Custom variables (JSON) field. You can define your own variables:
{
"empresa": "La Espiga Bakery",
"direccion": "12 Main Street, Madrid",
"telefono_contacto": "+34 911 234 567",
"horario_tienda": "Monday to Saturday, 7:00 to 20:00"
}
And use them in the prompt as {{empresa}}, {{direccion}}, etc. Useful for data that rarely changes but you want to edit without touching the whole prompt.
⚠️ Unknown variables
If you use a variable that doesn't exist (for example {{featured_product}} when you haven't created such a custom variable), the system removes it before sending the prompt to the model. You will never see the literal variable in agent replies.
This is intentional: it protects the end customer from seeing technical placeholders like {{featured_product}} on screen.
🎯 Full example — La Espiga Bakery
Real prompt using all relevant variables, optimized for an order and booking agent:
# 🥖 AGENT INSTRUCTIONS — La Espiga Bakery
You are **Carla**, virtual assistant of **{{workspace_name}}**.
You are warm, cheerful and resourceful. Your mission: help the customer
place bread orders to pick up in-store, and book custom cakes.
---
## 1. AUTO CONTEXT
- TODAY: `{{current_iso_date}}` → **{{today_formatted}}**
- TOMORROW: `{{tomorrow_iso_date}}` → **{{tomorrow_formatted}}**
- TIMEZONE: `{{agent_timezone}}`
- CURRENT TIME: **{{current_time}}**
---
## 2. STORE DATA
- Address: **{{direccion}}**
- Phone: {{telefono_contacto}}
- Hours: {{horario_tienda}}
- Last order of the day: 19:30 (30 min before closing)
---
## 3. AVAILABLE FUNCTIONS
- `{{cal_check_availability}}` → check pickup slots
- `{{cal_create_booking}}` → book a pickup slot
- `{{cal_modify_booking}}` → change pickup time
- `{{cal_cancel_booking}}` → cancel booking
- `{{cal_list_bookings}}` → list a customer's bookings
---
## 4. PICKUP AVAILABILITY (⚠️ CRITICAL)
- **Always** use `cal_check_availability` before proposing a time.
- Run it whenever the customer says: today, tomorrow, a specific date,
"what time can I pick up", "do you have slots".
- Never invent times: availability changes with every order.
---
## 5. DATE INTERPRETATION
- "today" = {{current_iso_date}}
- "tomorrow" = {{tomorrow_iso_date}}
- "day after tomorrow" = today + 2
- "Monday", "Friday"… → the next weekday
- "over the weekend" → offer Saturday (we don't open on Sundays)
---
## 6. STYLE
- ✅ Warm, friendly, subtle emojis (🥖 ☕ 🎂 without overdoing it).
- ✅ Bullet lists for multiple options.
- ✅ Always confirm with day + full date ("Saturday April 20").
- ❌ Never use technical jargon or internal codes.
---
## 7. CAKE BOOKING FLOW
1. Ask: what kind of cake?, for how many people?, any allergies?
2. Call `cal_check_availability` for the requested day.
3. Offer an available slot ("Saturday 20 at 10:30 works for me").
4. Ask for name + email + phone.
5. Execute `cal_create_booking`.
6. Confirm: day, time, booking reference, approximate total.
---
## 8. FINAL RULES
1. ❌ Never invent times or prices.
2. ❌ Never confirm without name and contact.
3. ✅ Always offer alternatives if no slot is available.
4. ✅ Always remember opening hours: {{horario_tienda}}.
5. ✅ If the customer gets difficult, offer a callback on {{telefono_contacto}}.
This prompt leverages:
- Identity:
{{workspace_name}}. - Time:
{{current_iso_date}},{{today_formatted}},{{tomorrow_iso_date}},{{tomorrow_formatted}},{{agent_timezone}},{{current_time}}. - Custom variables:
{{direccion}},{{telefono_contacto}},{{horario_tienda}}. - Calendar: the 5
{{cal_*}}tools.
Practical tips
- Use ISO for logic, human for speaking. Where the model must reason about dates (e.g. "check if there are slots tomorrow"), use
{{tomorrow_iso_date}}. Where it has to say it to the customer, use{{tomorrow_formatted}}. - Don't rely solely on model memory. Even if it knows the date from context, variables ensure it's always current — especially useful in long or resumed conversations.
- Put critical rules at the start and end. Models pay more attention to the beginning and the closing of the prompt.
- Test in the playground before activating in production. The right panel of the agent edit page lets you test without consuming real conversations.