Problem
I’m using an AI Agent in callin.io to handle appointment requests. The agent interacts with a Google Calendar Tool (e.g., Create Event
or Check Availability
). The challenge is that when a user requests something like “I want an appointment on Friday”, the model occasionally provides a date with the incorrect year (e.g., 2023) instead of the current year.
What I want to do
I’d like to incorporate the current date and time into the model’s context—perhaps using something like {{ $now }}
—either within the Agent’s System Message or the Tool Prompt Template. The goal is to ensure it consistently uses the current year or the next one (never a past year).
Yes, when I require the date.
I will include this in the prompt:
Today is {{ $now.format('yyyy-MM-dd') }}
Then the AI will understand how to handle the date for tomorrow or next Wednesday.
And where do I need to add that command? Should it be in the system message or elsewhere?
Yes, I've placed it within the system message.
My issue was that I hadn't selected the expression format. Many thanks to both of you.
This thread was automatically closed 7 days following the last response. New replies are no longer permitted.