Thursdays with Koog: Strategies Koog's AIAgent delegates its work to an AIAgentStrategy interface, with the default singleRunStrategy() factory function implementing a one-shot graph pattern that calls the LLM, executes tools, and repeats until the LLM stops requesting tool calls. The strategy DSL defines nodes and edges, but nodes are synchronous suspend functions, making multi-turn agents awkward; developers can instead iteratively call run() on an AIAgent using singleRunStrategy() and manage the prompt themselves. In a past "Thursdays with Koog" issue https://pac.commonsware.com/archive/thursdays-with-koog-tools/ , we saw that Koog's AIAgent knows how to handle tool calls for us. We can provide a prompt and get the final response from the LLM, and any tool calls the LLM requests in between those are handled by the agent. In truth, the AIAgent is involved in that logic, but the real work is handled by a strategy implementation. Koog has an AIAgentStrategy interface with a bunch of sub-interfaces and implementations. In addition to a name , AIAgentStrategy defines execute , which AIAgent itself wraps via its run function, with a bit of additional indirection. execute does the work. So, in the end, the strategy is what orchestrates the work with the LLM, and since the strategy is defined by an interface, we can plug in other strategies as needed. The default strategy is built by the singleRunStrategy factory function. Its KDoc https://api.koog.ai/agents/agents-core/ai.koog.agents.core.agent/single-run-strategy.html?query=fun%20singleRunStrategy parallelTools:%20Boolean%20=%20false :%20AIAgentGraphStrategy%3CString,%20String%3E shows the flow that Knosh uses: - Start the agent. - Call the LLM with the input. - Execute a tool based on the LLM's response. - Send the tool result back to the LLM. - Repeat until LLM indicates no further tool calls are needed or the agent finishes. Basically, singleRunStrategy is your "one-shot" pattern. Under the covers, singleRunStrategy is a one-off implementation of a graph strategy: @JvmOverloads public fun singleRunStrategy parallelTools: Boolean = false : AIAgentGraphStrategy