Backup-bdg/OpenHands
0
1# Memory Component2 3- Short Term History4- Memory Condenser5 6## Short Term History7- Short term history filters the event stream and computes the messages that are injected into the context8- It filters out certain events of no interest for the Agent, such as AgentChangeStateObservation or NullAction/NullObservation9- When the context window or the token limit set by the user is exceeded, history starts condensing: chunks of messages into summaries.10- Each summary is then injected into the context, in the place of the respective chunk it summarizes11 12## Memory Condenser13- Memory condenser is responsible for summarizing the chunks of events14- It summarizes the earlier events first15- It starts with the earliest agent actions and observations between two user messages16- Then it does the same for later chunks of events between user messages17- If there are no more agent events, it summarizes the user messages, this time one by one, if they're large enough and not immediately after an AgentFinishAction event (we assume those are tasks, potentially important)18- Summaries are retrieved from the LLM as AgentSummarizeAction, and are saved in State.19 