visakha
07/14/2025, 7:40 PMval agentGemini = AIAgent(
executor = simpleGoogleAIExecutor(System.getenv("GEMINI_API_KEY")),
systemPrompt = "You are a helpful assistant. Answer user questions concisely.",
llmModel = GoogleModels.Gemini2_0Flash ,
temperature = 0.7,
toolRegistry = ToolRegistry {
tool(SayToUser)
},
maxIterations = 100
)
fun main() = runBlocking {
// val result = agentOpenAI.run("Hello! How can you help me?")
val result2 = agentGemini.run("Hello! How can you help me?")
}
Konstantin
07/14/2025, 8:56 PMCavin
07/14/2025, 11:17 PMAndrey Bragin
07/14/2025, 11:21 PMrunAndGetResult
to get the output. Note: this is about to change in the new soon-to-be-released Koog version, there will be only run
left that would return the result
2. You don’t print result2
, that’s why you get no output.
3. If you would like to get more info about how the execution is going on, you can indeed use event handler, as was already suggestedvisakha
07/15/2025, 12:44 PMgemini-2.5-pro-preview-05-06
and it started working. btw there is no need to print the result
as its a Unit. The take away is I got responses from you all and I thank you . which is what I wanted. its nice to know that there is help out therevisakha
07/15/2025, 12:47 PMvisakha
07/15/2025, 1:15 PM