Thursdays with Koog: Tools Koog's Knosh 0.3.0 offers a class-based approach for defining tools, where developers extend Tool or SimpleTool and use LLMDescription annotations to guide the LLM, as demonstrated by the CreateDirectoryTool example. A coding agent usually is only as good as its tools and how well the LLM can use those tools. Which begs the question: how do tools work, anyway? There are several steps for tools: From our standpoint as consumers of Koog, Koog handles most of the dirty work. We tell Koog what tools we offer, and Koog invokes those as needed based on LLM requests. Beyond that, the rest of the work is internal to the tools and tends to be specific to your particular Koog-using program. A coding agent will have different tools doing different things than will a song lyric generator, or a 3D printer model generator, or a customer service chatbot. In Koog, there are a couple of high-level ways you can define tools. Knosh uses the class-based approach https://docs.koog.ai/tools/class-based-tools/ . You can extend Tool or SimpleTool , the latter handling the common case where your return is a chunk of text to send back to the LLM. For example, here is the class declaration for CreateDirectoryTool in Knosh 0.3.0 https://codeberg.org/commonsguy/knosh/src/tag/0.3.0/lib/knosh-tools/src/main/kotlin/com/commonsware/knosh/tools/CreateDirectoryTool.kt : / Tool that creates one or more directories, including all required parent directories. Each path is attempted independently; failures are reported but do not stop the remaining creations. @param dispatcher the coroutine dispatcher used for file I/O @param context the runtime context / public class CreateDirectoryTool private val dispatcher: CoroutineDispatcher, private val context: RuntimeContext : SimpleTool