-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Context
Currently, there is no way to persist or retrieve chat messages from an Agent once a session ends. This makes it difficult to maintain context across interactions or to restore an Agent’s state. To enable context continuity, we need a simple way to write and retrieve past Agent interactions from memory.
After discussions, its suggested that the first step toward simplifying memory writing and retrieval for Agents is to leverage the existing ChatMessage Writer and Retriever components.
Solution
Implement a SuperComponent that integrates the Agent with the ChatMessage Writer/Retriever to handle the storage and retrieval of agent chat messages in memory.
The new ChatMessageRetriever will be able to take incoming new messages as well. E.g. In a second user message of the same session that new user message should be appended to the end of the list of the retrieved conversation history from the ChatMessageRetriever.
Steps for Adding a new Experiment
- Create an example cookbook in https://github.com/deepset-ai/haystack-cookbook (no need to add an example notebook to haystack-experimental)
- Add experiment to pydocs
- Add experiment to catalog in haystack-experimental README.md
- Make sure a new version of haystack experimental is released within one week
- Open a new discussion in https://github.com/deepset-ai/haystack-experimental/discussions and pin it
- Draft a social media post content for that feature
- Include announcement of the experiment in weekly Haystack updates