Hi everyone. I am building an Android App using Ko...
# koog-agentic-framework
a
Hi everyone. I am building an Android App using Koog. It is a chat app with conversational AI integrated. Can anyone say how to setup the strategy for AIAgent class, to make sure that the previous list of messages in a conversation are fed to the agent, before executing a new prompt? Assume that there were already 4 messages. I have closed & reopened the app. Now, the agent should take the 1st 4 messages and analyse my prompt on top of it. Please help. Thanks Archit
a
Hi Archit, thanks for the question! Could you please check out the Persistence feature, especially the Continuous Persistence part? I think this is what you're looking for.
a
Thanks for your response. I will look into it and get back to you.
I looked into it @Anastasiia Zarechneva. But I am not looking for the persistence feature really. I just need to ensure that the AIAgent class needs to return results when "run" method is invoked, by analysing the existing messages in a conversation. It is not working as expected if I store the messages and pass to Prompt object of AIAgentConfig object (under "messages" field).
k
@Archit69 Appdeveloper, you may check the spring boot example, but the Koog is multiplatform. It's also chat app • how to configure persistence https://github.com/kpavlov/koog-spring-boot-assistant/blob/main/app/src/main/kotlin/com/example/app/agents/ElvenAgent.kt#L124-L132 • the strategy graph https://github.com/kpavlov/koog-spring-boot-assistant/blob/main/app/src/main/kotlin/com/example/app/agents/AgentConfiguration.kt • You may need some PersistenceStorageProvider https://docs.koog.ai/agent-persistence/#storage-provider, to store the history
a
Ok, thanks for the links. I will check them!
🤗 1