Pavan Badugucse
09/21/2025, 6:03 AMVadim Briliantov
09/21/2025, 1:03 PMval agent = AIAgent(
promptExecutor = myExexutor,
toolRegistry = ToolRegistry {
tool(::weather)
}
agentConfig = AIAgentConfig(
prompt = Prompt.build("simple-calculator") {
system(“You are smart”)
user(“What is the weather?”)
tool {
call(id = “123”, tool = “weather”, content = “{\”location\” = …}”)
result(id = “123”, tool = “weather”, content = “{…}”)
}
assistant(“So the weather is great”)
user(“Thanks!“)
},
model = OpenAIModels.Chat.GPT4o,
maxAgentIterations = 100
),
…
)