adk-python icon indicating copy to clipboard operation
adk-python copied to clipboard

Add timestamp to contents generated by events

Open ckl-axel opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe. In long-running sessions with extensive chat history, the timing of each message is important to how the agent understands the conversation. Messages from the distant past may be less relevant than more recent ones, especially when the user returns after a period of inactivity. Accurately interpreting the context requires the agent to weigh recent interactions more heavily than older ones.

Describe the solution you'd like Having timestamps on the content generated by past messages.

Describe alternatives you've considered Alternatives like callbacks to modify the content seem indirect and do redundant work.

ckl-axel avatar May 31 '25 18:05 ckl-axel

Hi @chen-kai-lin-ascend , what do you mean by "content generated by past messages"?

DeanChensj avatar Jun 11 '25 04:06 DeanChensj

@chen-kai-lin-ascend event has timestamp(https://github.com/google/adk-python/blob/main/src/google/adk/events/event.py#L86) and that should be sufficient ?

hangfei avatar Jun 11 '25 04:06 hangfei

@hangfei @DeanChensj apologies for the late reply. When the events get converted into content and passed into the LLM as conversation history, they don't have timestamp included. This means that the agents behaves the same if a customer resumes a conversation from 3 weeks ago vs from yesterday.

ckl-axel avatar Jul 02 '25 01:07 ckl-axel

Hi @ckl-axel and thanks to everyone who participated in this thread.

We're currently doing some housekeeping on our issue tracker. Given the rapid pace of development and the number of updates since this was last active, there's a good chance this issue has been resolved in a newer version. To help us keep our backlog focused on current issues, we are closing this as stale.

If you're still facing this problem, could you please update to the very latest version of the library and confirm the issue still exists? If it does, please comment here, and we will be happy to reopen this issue and investigate further.

Thanks for your contribution and understanding!

surajksharma07 avatar Oct 07 '25 12:10 surajksharma07