Hi team, what's the best way to add the time to th...
# agents
s
Hi team, what's the best way to add the time to the context of the agent? My current solution followed from here: • set
userdata.start_time = datetime.now()
when
agent_state_changed
=
initializing
• in the
on_enter
of the agent, add to the prompt the start_time using
userdata.start_time
This used to work for me for some time until I noticed today that sometimes the
on_enter
is called before the session handler sets the
start_time
. 1. Is this a bug? 2. Is there a better method for this?