GitHub user xintongsong added a comment to the discussion: Short-Term Memory 
Design

1. The key can be user / device / product id, similar to Flink's keyed data 
stream.

2. I think lists should be supported. For sets and queues, not sure about the 
necessity. Maybe we can start with lists, and add sets and queues later if they 
are proven needed?

3 & 4. Good question. Flink supports TTL of states, which expires old states 
automatically based on processing / event time. But I think what the agent need 
is something like keeping the most recent N messages, or keeping up to M tokens 
/ bytes of history messages. Of course users can manually control the retention 
and expiration of states. But we'd better provide a easy way for doing that.

5. I think to address this issue, we would need some mechanism for conclude a 
long history into a brief summary, or retrieve most relevant pieces from a 
large history. However, I'm not entirely sure whether this should be done with 
Flink's short-term memory. Maybe leveraging an external vector storage or AI 
memory project would work better? Such information summary and relevant context 
retrieving usually involves understanding the semantics of history, embedding, 
gpu usage, etc., which are not what Flink's state backend is good at.

GitHub link: 
https://github.com/apache/flink-agents/discussions/40#discussioncomment-13718610

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to