CREATE FREE ACCOUNT · NO CARD REQUIRED START FREE
  • LOG IN
MuseRelay
  • Home
  • Solutions
    • Customer support
    • Automated sales
    • Bookings & appointments
    • AI Assistants
    • Automation
  • Channels
    • WhatsApp Chatbot
    • Instagram Chatbot
    • Messenger Chatbot
    • Web Chatbot
  • White label
    • White-label chatbot
    • Reseller panel
    • For agencies
    • How to start as reseller
  • Pricing
LOG IN SIGN UP
Home
Getting Started
Chatbots & AI
Agent Tools
Channels
Voice Agents
Operations
White Label
API Reference
Documentación
Chatbots & AI
  • AI Agent Configuration (timezone, format, options)
  • AI Agent prompt variables
  • Configure CSP so the chatbot works on your website
  • Cal.com variables in the AI agent prompt
Documentation / Chatbots & AI / AI Agent prompt variables

AI Agent prompt variables

ES EN

When writing the prompt of an AI Agent under Prompt Configuration, you can use variables in double curly braces — e.g. {{today_formatted_local}} — that the system substitutes automatically with the real value in every conversation.

Works everywhere: variables are substituted both in the test playground (right panel in the agent edit view) and in real conversations from the embedded chatbot on your website and the Meta channels (WhatsApp, Instagram, Messenger).
Automatic context: even if your prompt doesn't use any variables, the system automatically injects a block with the current time, date, timezone and locale at the start of each conversation — so the model always has the right information.

Date and time — local (agent's timezone)

Formatted using the agent's timezone and the configured locale. If the agent inherits, it uses the organization config; otherwise falls back to UTC / en_US.

VariableExample (Europe/Madrid + es_ES)When to use it
{{current_time_local}}15:47Current time in 24h format
{{current_date_local}}17/4/26Short date per locale
{{current_datetime_local}}17 abr 2026, 15:47Date + time, medium format
{{today_formatted_local}}viernes, 17 de abril de 2026Long human-readable date
{{tomorrow_formatted_local}}sábado, 18 de abril de 2026Tomorrow in long format
{{today_iso}}2026-04-17Today in ISO (no time)
{{tomorrow_iso}}2026-04-18Tomorrow in ISO

Date and time — UTC (always the same)

Useful for logging, IDs or comparisons. Independent of the agent's timezone.

VariableExampleWhen to use it
{{current_datetime_utc}}2026-04-17T13:47:59+00:00ISO 8601 UTC — ideal for external APIs
{{current_date_utc}}2026-04-17UTC date, no time

️ Agent metadata

VariableExampleWhen to use it
{{agent_name}}LauraAgent name
{{agent_timezone}}Europe/MadridAgent timezone
{{agent_locale}}es_ESFormat locale
{{organization_name}}Screen ArtOrganization name
{{workspace_name}}La Espiga BakeryWorkspace name

Calendar variables (Cal.com)

Substituted only if you have "Calendar Commands (Cal.com)" enabled in the agent config. They're not "values" — they are tools your agent can invoke during the conversation.

VariableWhat the agent does when invoking it
{{cal_check_availability}}Checks available calendar slots
{{cal_create_booking}}Creates a new booking
{{cal_modify_booking}}Modifies an existing booking
{{cal_cancel_booking}}Cancels a booking
{{cal_list_bookings}}Lists bookings for a given email
Important: the "Calendar Commands (Cal.com)" toggle alone is not enough. For {{cal_*}} variables to work you need these 3 items:
  1. Cal.com API Key (Settings → Developer → API Keys in your Cal.com account).
  2. Event Type ID — the numeric ID of the event type bookings will be created for.
  3. Agent timezone (optional if it matches the workspace).

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",
"saludo": "Hello, welcome!"
}

And use them in the prompt as {{empresa}}, {{direccion}}, {{saludo}}, etc. Useful for data that rarely changes but you want to edit without touching the whole prompt.

Good practice: if a piece of data appears 3+ times in the prompt, turn it into a custom variable. If it changes later (for example opening hours), you only edit it in one place.

Auto-injected context block

This is not a variable — it's a block the system automatically prepends to your system_prompt, so the model always has a source of truth even if your prompt doesn't use variables. It always includes:

## Current context (injected by the system, do not modify)
- Current time: 15:47 (Europe/Madrid)
- Date: Friday, April 17, 2026
- Tomorrow: Saturday, April 18, 2026
- Agent timezone: Europe/Madrid
- Format locale: es_ES

Thanks to this, even a minimalist prompt without variables works well — the model always knows what time it is and where it is.

️ Legacy aliases (backward compatibility)

These variables still work to avoid breaking old prompts, but we recommend using the new _local / _utc ones in new prompts:

Legacy aliasMaps to
{{current_time}}{{current_time_local}}
{{current_date}}{{today_iso}}
{{current_iso_date}}{{today_iso}}
{{tomorrow_iso_date}}{{tomorrow_iso}}
{{today_formatted}}{{today_formatted_local}}
{{tomorrow_formatted}}{{tomorrow_formatted_local}}

Other legacy variables still working

VariableExampleNotes
{{current_day_name}}viernesDay name (always Spanish, doesn't respect locale)
{{next_monday_iso_date}}2026-04-20Next Monday in ISO
{{workspace_timezone}}Europe/MadridWorkspace timezone (fallback: agent timezone)

️ 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: {{today_iso}} → **{{today_formatted_local}}**
- TOMORROW: {{tomorrow_iso}} → **{{tomorrow_formatted_local}}**
- TIMEZONE: {{agent_timezone}}
- CURRENT TIME: **{{current_time_local}}**

---

## 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" = {{today_iso}}
- "tomorrow" = {{tomorrow_iso}}
- "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 (local, human): {{today_iso}}, {{today_formatted_local}}, {{tomorrow_iso}}, {{tomorrow_formatted_local}}, {{agent_timezone}}, {{current_time_local}}.
  • Custom variables: {{direccion}}, {{telefono_contacto}}, {{horario_tienda}}.
  • Calendar: the 5 {{cal_*}} tools.

Practical recommendations

  • Spanish customer → leave timezone/locale empty (inherits from organization) or set Europe/Madrid + es_ES.
  • Mexican customer → America/Mexico_City + es_MX.
  • For external APIs or logs → use _utc variables.
  • To display to the end user → use _local variables.

General 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}}. Where it has to say it to the customer, use {{tomorrow_formatted_local}}.
  • Don't rely solely on model memory. The auto-injected context block guarantees 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.

How the auto-injected context block is built

The context block the system injects at the start of each conversation depends on two selectors you have in the Basic Configuration section of the agent: Timezone and Date format.

Resolution cascade

Each line of the block comes from one of the fields following this cascade (first checks the agent; if empty, goes up to the organization; if also empty, falls back to the default):

Block lineFieldCascade
Current time: 15:47 (Europe/Madrid)timezoneAgent → Organization → UTC
Agent timezone: Europe/Madridtimezone(same)
Format locale: es_ESlocaleAgent → Organization → en_US
Date: Friday, April 17, 2026timezone + localeBoth
Tomorrow: Saturday, April 18, 2026timezone + localeBoth

Practical examples

Assuming today is Friday April 17, 2026 at 15:47 Madrid time, the generated block changes depending on the selectors:

Madrid customer

  • Timezone: Europe/Madrid
  • Date format: es_ES
Generated block:
15:47 · viernes, 17 de abril de 2026

Mexican customer

  • Timezone: America/Mexico_City
  • Date format: es_MX
Generated block:
07:47 · viernes, 17 de abril de 2026
(same date, different time)

Tokyo customer

  • Timezone: Asia/Tokyo
  • Date format: ja_JP
Generated block:
22:47 · 2026年4月17日金曜日

️ Empty selectors (Inherit)

  • Timezone: inherit
  • Date format: inherit
What happens:
Looks at the organization → if it has Europe/Madrid + es_ES, uses those.
If the organization is also empty → UTC + en_US.

The decision belongs to the agent itself. If you edit the selectors, the model sees the new values on the next conversation without needing to change the prompt.

#AI Agents #Prompts
← AnteriorAI Agent Configuration (timezone, format, options) Siguiente →Configure CSP so the chatbot works on your website
En esta página
  • Cargando...

Platform

  • WhatsApp Chatbot
  • Instagram Chatbot
  • Messenger Chatbot
  • Web Chatbot
  • Automation
  • Integrations

White label

  • White-label chatbot
  • Reseller panel
  • For agencies
  • How to start

Resources

  • Blog
  • Documentation
  • Guides
  • API docs
  • Pricing
  • Contact

Legal

  • Legal Notice
  • Privacy
  • Terms
  • Cookies
  • DPA
  • Subprocessors
  • Integrations & GDPR
  • Data Deletion

© 2026 Muse Layer LLC · Infrastructure and data processing in the EU · GDPR compliant

Privacy | Legal notice | Terms | Cookies
ES | EN

LOG IN

Access your MuseRelay account

Forgot your password?
Don't have an account? Create new account

Create new account

Join the MuseRelay beta community

Contact us to get your code: webmaster@muserelay.com
Already have an account? LOG IN
We value your privacy

We use strictly necessary technical cookies for the platform to work. No advertising or third-party tracking cookies. Cookie Policy · Privacy