Hi, Quite new here. i'm working on a chat interfac...
# koog-agentic-framework
p
Hi, Quite new here. i'm working on a chat interface with kmp and koog framework. need to basically pass listOfmessage to AIAgent so i get tools as well. couldn't find way to pass tools in PromptExecutors.
v
Hi! Do you want to pass tool calls history ? Then, you should use agentConfig: AIAgentConfig parameter of AIAgent and pass something like:
Copy code
val 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
  ),
  …
)