← Guides · Guide
Koog and Kotlin AI agents — what it is and what it is for
Koog is JetBrains’ framework for building AI agents in Kotlin and Java. It focuses on practical architecture: strategies, tools, memory, tracing, long context and JVM production integration.
Short version: Koog is JetBrains’ framework for building AI agents in Kotlin and Java. It is not just a prompt wrapper. It gives JVM/Kotlin teams a way to structure agents as strategies, tools, state, memory, traces and tests.
What an AI agent is
An AI agent is a system where the language model does more than answer. It decides next steps, calls tools, reads data, asks for confirmation, checks results and continues until the task is done.
A chatbot tells you what could be done. An agent can actually do parts of the work. A good agent has boundaries and traces; a bad one is an LLM with too many buttons.
What Koog is for
Koog is useful when your application already lives in Kotlin/JVM and you want agentic features close to that codebase. It supports tools, graph-like strategies, long-context handling, persistence, memory, streaming, tracing, MCP and provider integrations.
The practical use cases are internal workflow agents, AI product features, assistants inside JVM applications, Android or multiplatform apps, and agent systems that need to be observable and testable.
The key idea: narrow corridors
The strongest idea is not “let the LLM do everything”. It is the opposite: build a narrow corridor. Split the work into phases, give the model only the tools needed for the current phase, verify important steps and keep a trace.
That is the difference between engineering and expensive improvisation.
What to remember
Koog matters because it treats agents as software systems: model, tools, strategy, state, observability and evaluation. The model is only the engine. The agent is the whole machine around it.