KoogTool
class KoogTool(val tool: AgentTool, run: suspend (JsonObject) -> String = tool::execute) : Tool<JsonObject, String> (source)
An AI Elements AgentTool as a Koog tool: JSON arguments in, text out. run defaults to the tool itself; KoogBackend routes it through the chat's tool events (approval, progress) instead.
Constructors
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun encodeResultToParts(result: String, serializer: JSONSerializer): List<MessagePart.ContentPart>
Link copied to clipboard
fun encodeResultToPartsUnsafe(result: Any?, serializer: JSONSerializer): List<MessagePart.ContentPart>
Link copied to clipboard
The model sees the tool's text as is, not as a JSON string literal.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard