Hello! I have an agent (kind of a chat) and I want...
# koog-agentic-framework
r
Hello! I have an agent (kind of a chat) and I want to have continuous persistence with userId as the filter. Let's say I have my custom implementation for persistence:
Copy code
class ExamplePersistence : Persistence<String> //String is userId
What I'm having difficulty understanding is how/where do I set this userId in my agent config so that this is then available to my
ExamplePersistence
? This is my current implementation:
Copy code
val agent = AIAgent(
                strategy = strategy,
                promptExecutor = simpleGoogleAIExecutor(apiKey = apiKey),
                llmModel = model,
                toolRegistry = tools
            ) {
                install(Persistence) {
                    storage = myPersistence
                }               
            }

            agent.run(input)
I saw this thread but could not figure out from this either 😅
Or do I simply provide it as agentId?
a
Hi Ruben! I think
agentId
should do the thing here, but let's wait for more opinions 👀
👍 1
m
Hello @Ruben Quadros! Currently, the persistense discriminator is agentId, yeah.
thank you color 2