many-continent-77033
06/21/2023, 2:07 AMacceptable-kangaroo-64719
06/21/2023, 9:44 AMevent.state.session.history
will keep the last 6 messages in the conversation (bot user and bot)
2. If the Summary Agent is enabled, event.state.agentVariables.SummaryAgent.conversation.summary
will contain a short summary of the conversation that updates at every turn.
Since you want to save every message, I'd recommend putting your code in an "Before Outgoing Message" hook so that it runs automatically and you don't have to manually run it in your flow.many-continent-77033
06/21/2023, 1:36 PMmany-continent-77033
06/23/2023, 4:47 AMmany-continent-77033
06/23/2023, 4:48 AM