Learn to build AI coding agents in Kotlin using Koog, JetBrains' open-source framework. This tutorial demonstrates creating a minimal agent with three core capabilities: navigating codebases, reading files, and making targeted edits. The agent uses GPT-5-Codex and achieves ~50% success on SWE-bench Verified tasks with just 50 lines of code. Key insights include handling large files through line counts, preventing context exhaustion, and designing clear error messages so agents learn from failures. The framework handles the execution loop while you focus on defining agent capabilities through tools.
Table of contents
Building the agent piece by piecePutting the pieces togetherRunning our agentDoes it work?Sort: