rcd27
10/17/2025, 8:36 AMkoog. It is based on "agents", which are basically "nodes" in our case with shared context(thanks JetBrains <3). I'm stuck writing one node that accepts researchBrief and should call one tool(tavily-search). I've used requestLLMForceOnetool, however the result is just a query to tool call, and I'm expecting the result of web search itself. Am I missing something? Should I forwardTo nodeLLMRequest?
link to codeAnastasiia Zarechneva
10/17/2025, 9:12 AMnodeLLMRequest , as requestLLMForceOneTool is a request itself.
You need to process the received response, like this:
llm.writeSession {
updatePrompt {
system(researchQuestion.researchBrief)
}
val response = requestLLMForceOneTool(tavilySearchTool)
}
if (response is Message.Tool.Call) {
// Handle tool call, e.g. with nodeExecuteTool() and then nodeLLMSendToolResult()
} else {
// Handle text response
}
}
Hope this answers your question!rcd27
10/17/2025, 9:20 AMMessage.Respone for it to be either Tool.Call or notAnastasiia Zarechneva
10/17/2025, 9:21 AMrcd27
10/17/2025, 9:21 AM