#When I create a simple agent in "Chat (text-only) mode", if I add a system variable or dynamic vari

1 messages · Page 1 of 1 (latest)

lunar moatBOT
#
AI-generated Answer for tranquil_lynx_58835

Short answer: this isn’t documented behavior, and I can’t find any official note that the widget intentionally shows an unexpanded First Message before resolving variables. However, two documented facts explain and unblock your case:

  • The only time-related system variable documented is system__time_utc (ISO format). system__time is not listed as a supported system dynamic variable. Use system__time_utc or pass your own formatted time as a dynamic variable. (elevenlabs.io)
  • When using the widget, any variables referenced by First Message must be provided at runtime via the dynamic-variables attribute, or you can bypass templating entirely by overriding First Message at runtime. (elevenlabs.io)

What to do (all documented):

  1. If ISO UTC is acceptable
  • Change your First Message to use {{system__time_utc}}. This system variable is guaranteed to be available at conversation start. (elevenlabs.io)
  1. If you need a formatted/localized time
  • Compute it in your app and pass it as a dynamic variable:
    <elevenlabs-convai
    agent-id="YOUR_AGENT_ID"
    dynamic-variables='{"local_time":"Wednesday, 17:48 20 August 2025"}'>
    </elevenlabs-convai>
  • Then use Hello! The time is {{local_time}}. The widget explicitly supports passing dynamic variables this way. (elevenlabs.io)
  1. If you want to guarantee exactly one, pre-resolved opening line
  • Enable First message overrides in the agent’s Security tab, then provide the resolved string via the widget:
    <elevenlabs-convai
    agent-id="YOUR_AGENT_ID"
    override-first-message="Hello! The time is Wednesday, 17:48 20 August 2025.">
    </elevenlabs-convai>
  • This is the documented way to replace First Message at runtime. (elevenlabs.io)

Notes

  • Widgets require public agents with authentication disabled. Verify this if you see any unexpected widget behavior. (elevenlabs.io)
  • System variables are “set once at conversation start” (for prompts/first message). If you need a changing clock, use a custom dynamic variable updated by your client or tools. (elevenlabs.io)

If you still observe the duplicate-opening-line behavior after switching to system__time_utc or providing a pre-resolved value via dynamic-variables/override-first-message, there’s no current doc covering that; please share the agent ID and we can investigate further. (elevenlabs.io)

Sources:
Dynamic variables | ElevenLabs Documentation
Widget customization | ElevenLabs Documentation
Dynamic variables | ElevenLabs Documentation
Widget customization | ElevenLabs Documentation
Overrides | ElevenLabs Documentation
Widget customization | ElevenLabs Documentation
Dynamic variables | ElevenLabs Documentation
Dynamic variables | ElevenLabs Documentation

sick turtle
#

I don't think it has to do with the variable being a time. This behavior happens when I also use a dynamic variable that's passed when the widget is created widget.setAttribute('dynamic-variables', ...)

It works fine with a voice agent. The First Message is not repeated and is populated

I'll share the agentId with support in a private DM