Prompt variables and tool references

Use $ to insert variables (like the contact's name) and ! to reference actions inside your agent's instructions.

Jun 26, 2026

Watch this step in the video · Instructions: the editor

Your agent's instructions don't have to be static text. In the Instructions editor you can insert variables that fill themselves in with contact data, and reference the actions (tools) your agent can run.

The two editor shortcuts

In the Instructions tab, while you write the prompt:

  • Type $ to insert a variable (for example, the contact's name).
  • Type ! to insert a reference to an action (one of the agent's tools).

As soon as you type either character, an autocomplete pops up with the available options. Pick one and it becomes a "pill" inside your text.

Most-used variables

Variables are grouped by source. Some common ones:

  • $contact.first_name — Contact's first name
  • $contact.last_name — Last name
  • $contact.email — Email
  • $contact.phone — Phone
  • $contact.language — Contact's language
  • $workspace.name — Workspace name
  • $conversation.channel_type — Channel type

At runtime, $contact.first_name is replaced with the person's real name. If the field is empty, the agent simply skips it.

How to insert a variable

  1. Open the agent and go to the Instructions tab.
  2. Place your cursor where you want the data.
  3. Type $ and start typing (e.g. name).
  4. Pick the variable from the list (e.g. First name).
  5. Save your changes.

Example: Greet the customer by name: $contact.first_name.

How to reference an action

Actions are the tools you already set up in the Custom actions tab (book an appointment, tag a contact, create a deal, etc.).

  1. In the Instructions editor, type !.
  2. Pick the action from the autocomplete.
  3. Explain when to use it: "If the customer wants a visit, use !book_appointment".

Referencing an action does not run it — it tells the agent that the tool exists and when it makes sense to use it.

Verify it works

  1. Open the Sandbox tab.
  2. Send a message that triggers the data or the action.
  3. Check the Trace: it shows the real values that were injected and which tool the agent called.

If it doesn't work

  • The variable comes out empty: that contact has no value for that field; test with a complete contact.
  • No autocomplete appears: make sure you type $ or ! as the first character of the token, with no space before it.
  • The action doesn't run: confirm it's created and active under Custom actions; if you deleted or renamed it, the reference in the prompt breaks.

Tips

  • Personalizing with $contact.first_name dramatically raises the "human touch" feeling.
  • Don't overload actions: reference only the ones the agent truly needs for that conversation.

Related articles

Was this helpful?

Related articles

Message us on WhatsApp