https://retellai.com/?utm_source=discord&utm_medium=seo logo
how can i make an agent know the current time in t...
# ❓・ai-evy-support
k
@AI Evy how can i make an agent know the current time in the call?
a
Thanks for tagging me @K Rudy. I'll look through relevant sources and get back to you shortly.
### Answer --- To make your agent aware of the current time during a call, you can use dynamic variables to inject the current timestamp when the call starts. You can pass dynamic variables like
retell_llm_dynamic_variables
when creating an outbound call or via the inbound webhook response. [(1) ]() For example, when creating a phone call:
Copy code
javascript
const phoneCallResponse = await client.call.createPhoneCall({
  from_number: '+14157774444',
  to_number: '+12137774445',
  retell_llm_dynamic_variables: { "current_time": "2026-01-16T10:30:00" }
}) ;
Then reference
{{current_time}}
in your agent's prompt. For inbound calls, you can set dynamic variables in a webhook response to the inbound webhook assigned to the phone number. [(2) ]() Note: The sources don't document a built-in mechanism for the agent to automatically fetch the current time mid-call. If you need real-time updates during the call, you could use a custom function that returns the current time when called—the response payload would then be available in the LLM's context. Check out these potentially useful sources for more on dynamic variables and custom functions: - [Create Voice Agent]() - [Retell AI Webhooks]() Would you like a general answer on implementing a custom function for real-time data?
​ To learn more, see the sources I considered: [[1] How can I create an outbound call](https://retell.discourse.group/t/how-can-i-create-an-outbound-call/132) [[2] Discord message from @mivec_ix on 2025-04-22](https://discord.com/channels/1186424376300679209/1294891368505937952/1364267002184732823) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.