Jose
10/22/2025, 11:24 AMAnastasiia Zarechneva
10/22/2025, 11:49 AMJose
10/22/2025, 12:21 PMinstall(EventHandler.Feature) {
onAgentStarting { e ->
val userInput = e.context.agentInput.toString()
val span = Span.current()
span.setAttribute("langfuse.trace.input", userInput)
}
onAgentCompleted { e ->
val span = Span.current()
span.setAttribute("langfuse.trace.output", e.result.toString())
logger.info("React Strategy result: ${e.result}")
}Hywel Bennett
10/22/2025, 1:07 PMinstall(OpenTelemetry) {
setVerbose(true)Jose
10/22/2025, 1:17 PMinstall(OpenTelemetry) {
setVerbose(true)
addLangfuseExporter(
traceAttributes = listOf(
CustomAttribute("langfuse.trace.tags", listOf("rag", "production")),
CustomAttribute("langfuse.trace.name", "myagent"),
)
)
}Jose
10/22/2025, 1:22 PMJose
10/22/2025, 1:23 PMSergei Dubov
10/22/2025, 2:33 PMinput and output from your initial image corresponds to the very specific system __finish__ node. Each node in Koog has input and output where the content of this fields is related to what is going on inside a node and inside a strategy that you have. If you transfer an empty string to the __finish__ node, than you will have an empty input for this node.
You can enable trace log level for the ai.koog.agents.core.agent.entity package to see what is the result of the node execution. This might help to understand the reason. You can also use EventHandler or Tracing features for that and intercept NodeExecutionStarting / NodeExecutionCompleted events that contains info about node input and output in the event context. Could you please check what do you receive here?
@Hywel Bennett, thank you for your suggestion about the verbose flag. It still should write you an input and the output for the messages. The different is in the content. With verbose set to false (default), you should not be able to see it, and get HIDDEN:non-empty string value instead on a real content.Jose
10/22/2025, 2:42 PMJose
10/22/2025, 2:43 PMJose
10/22/2025, 2:43 PMJose
10/22/2025, 2:46 PMJose
10/22/2025, 2:47 PMJose
10/22/2025, 2:48 PMJose
10/22/2025, 2:49 PMSergei Dubov
10/22/2025, 3:20 PMJose
10/22/2025, 3:44 PMSam
10/23/2025, 12:18 PMSergei Dubov
10/23/2025, 12:51 PMOpenTelemetry feature side in NodeSpan. I will push a PR with the fix shortly. Thank you for catching this!Jose
10/23/2025, 12:53 PMSam
10/23/2025, 12:54 PMSergei Dubov
10/23/2025, 9:53 PMSergei Dubov
10/23/2025, 9:54 PMlangfuse.trace.input and langfuse.trace.output through the input/output for start and finish nodes (will be available from the PR above).Jose
10/26/2025, 7:30 PMSergei Dubov
10/27/2025, 12:40 PM