GitHub user xintongsong added a comment to the discussion: Short-Term Memory Design
2. Short-term memory is used not only for providing context for the LLM, but also to share information and task status across actions within an agent. Nested structure is useful when it come to reusable actions. Imagine an action that generates a short summary from a long text, and all inputs / outputs need to be stored in memory. In this case, it would be more efficient to have the action read input from and write output to the state rather than copying the text into events and sending between event. The question is, if the action is called multiple times in an agent, which part of the state should it ready / write? We can define a memory object with two fields: `original_text` and `summary`. With the nested structure, every time we call the action, we can pass in the path of a different memory object, and the action can read the `original_text` field of the object from states, and write the `summary` field. GitHub link: https://github.com/apache/flink-agents/discussions/40#discussioncomment-13728487 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
