I am using Agent.handle_message to handle the user query. I wanted to get the tracker info for the current sender_id along with the response coming from Agent.handle_message. This is just for running some post processing logic based on the intent predicted for the last message.
I came across Agent.tracker_store.get_or_create_tracker(sender_id) method. so I have somethin like,
response = await agent.handle_message(…)
current_tracker = agent.tracker_store.get_or_create_tracker(sender_id)
// using the latest intent info from current_tracker to do some post processing / auditing
this works, but the problem is here in order to get the tracker, get_or_create_tracker method does an additional call to the trackerstore. Currently I am using SQLTrackerstore, I wanted to avoid this uncessary call.
if there was any way to get the current tracker object along with the response from Agent.handle_method(), I can avoid this unncessary call to the trackerstore.
If such a thing is not possible, I also wanted to know if there is any way we can add a custom Output Channel to grab this intent info from the tracker object.