voidKandy / espionox

Use espionox to streamline making LLM applications in Rust
https://crates.io/crates/espionox
9 stars 0 forks source link

Relationship between long and short term memory needs to be reworked #8

Closed voidKandy closed 6 months ago

voidKandy commented 9 months ago

When using an agent which has a long term memory buffer, it will update the database on every message. Instead short term memory should save messages, and then long term memory should be intermittently written to.

voidKandy commented 9 months ago

Basic map of what memory should look like

Message buffer will just be short term memory, no more choosing source of the buffer.

Messaging loop for the base agent continues until an arbitrary length of the cached messages is reached, once it is:

  1. A special memory summarizer agent will summarize the given conversation chunk
  2. The generated summary will be added to long term memory
  3. base agent's cache is reset, leaving only the original system prompt + summaries of all previous chunks (A lightweight mode should exist that only ever keeps a single summary which continuously updates every chunk)
  4. Conversation continues as normal until next summary is needed

The system created should leave room for multiple ways of 'encoding' memory. Summarizing chunks of messages being the most basic mechanism of encoding. But eventually mechanisms such as the one in this paper should be implemented.

voidKandy commented 9 months ago

Significant chagnes have been made to the memory system and will now be pushed to main, a brief outline of what was changed was covered in this blog post. I will close this issue now, but more will be opened in the future as more features are added to memory.