Koog: JetBrains' Kotlin-First Framework for Cross-Platform AI Agents
Koog is a JVM (Java and Kotlin) framework for building predictable, fault-tolerant and enterprise-ready AI agents across all platforms – from backend services to Android and iOS, JVM, and even in-browser environments. Koog is based on our AI products expertise and provides proven solutions for complex LLM and AI problems
At a glance
- What is it?
- Koog is a Kotlin Multiplatform framework for building AI agents on JVM, Android, iOS, and web targets. It offers built-in retries, state persistence, and LLM switching, but its young age and beta add-on module demand careful verification.
- Who is it for?
- Adopt Koog if you are a Kotlin or Java developer building AI agents that must run on JVM, Android, iOS, or in-browser, and you value JetBrains' backing and built-in fault-tolerance features. Do not adopt it if you need a mature, widely proven framework or require full multiplatform coverage beyond the listed targets.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 2 days ago.
- What is it written in?
- Mainly Kotlin, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What Koog solves and who it targets
Koog addresses a specific gap: building AI agents in idiomatic Kotlin and Java without leaving the JVM ecosystem. Most agent frameworks are Python-first, which forces Kotlin teams to maintain a separate service or use awkward interop. Koog lets you define agents, wire tools, and manage conversation state directly in your existing Kotlin codebase. It targets backend developers using Spring Boot or Ktor, Android and iOS developers via Kotlin Multiplatform, and even browser environments through JS and WasmJS. The pitch is predictable and fault-tolerant agents: the README lists built-in retries and agent persistence as first-class features. That is a different starting point than a thin LLM wrapper. The framework is an incubator project from JetBrains, so it carries the company's weight but also an explicit experimental status.
The mechanism: prompt executors, persistence, and history compression
Koog's architecture revolves around a few core abstractions visible in the quickstart. You create an AIAgent with a promptExecutor, a systemPrompt, and an llmModel. The prompt executor is where the flexibility lives. MultiLLMPromptExecutor wraps one or more LLM clients, allowing the agent to switch models mid-conversation without losing history. That is not a trivial feature: most frameworks lock you into one provider per agent instance. The README claims 'seamless history adaptation' when rerouting between providers. Persistence is another mechanism: the agent can restore its state at specific execution points, which is useful for long-running or resumable workflows. History compression is built in to keep token usage down in long conversations. These features are described at a high level; the actual algorithms and configuration keys are not in the README, so you would need to consult the API reference or source to tune them.
Running Koog: real commands and config keys
To use Koog, you add a dependency to your build. In Gradle Kotlin DSL, the README shows: implementation("ai.koog:koog-agents:1.2.0") and implementation("ai.koog:koog-agents-additions:1.2.0-beta"). The add-ons module is in beta, which is a notable caveat. In Maven, you use koog-agents-jvm and koog-agents-additions-jvm with the same versions. You need JDK 17 or higher, and Kotlin 2.3.10 or higher if you are adding Koog to an existing project. The quickstart requires an API key as an environment variable, such as OPENAI_API_KEY, then constructs an OpenAILLMClient and passes it to MultiLLMPromptExecutor. The example uses OpenAIModels.Chat.GPT4o as the model. That is the entire setup shown. No Spring Boot or Ktor integration code is given, despite those being advertised as enterprise integrations.
Where Koog is the wrong tool
Koog is not a fit if you need a framework that runs on native desktop or server platforms beyond the listed targets. The README explicitly states JVM, JS, WasmJS, and iOS are supported. There is no mention of Linux native, Windows native, or macOS native targets. If your agent must run as a native binary on a Linux server without a JVM, Koog will not help. Also, the framework is Kotlin-first. While Java APIs exist, the DSL and examples are Kotlin. A pure Java team may find the type-safe DSL awkward. Another limitation: the add-ons module is 1.2.0-beta, meaning features like vector memory or RAG likely live there and are not production-stable. The README lists knowledge retrieval and memory as features, but the exact module boundaries are unclear. If you need those capabilities in a stable release, Koog may not be ready.
Alternatives: LangChain4j and Spring AI
The closest alternative in the JVM space is LangChain4j, which also targets Java and Kotlin developers. LangChain4j has been around longer and supports a wider range of LLM providers and integrations, including Spring Boot. Its approach is more modular: you assemble chains and agents from smaller components. Koog differs by offering a unified AIAgent abstraction with built-in persistence and history compression, which LangChain4j leaves to the developer to configure. Another alternative is Spring AI, which is tightly coupled to the Spring ecosystem. If you are already on Spring Boot, Spring AI provides a familiar programming model and auto-configuration. Koog is framework-agnostic, so it works in Ktor or plain JVM apps, which gives it a broader reach but also means you must wire more yourself. The trade-off is clear: Koog offers a higher-level agent abstraction with cross-platform reach, while LangChain4j and Spring AI offer maturity and ecosystem integration.
Licence, maintenance, and upgrade costs
Koog is licensed under Apache-2.0, which is permissive and allows commercial use and modification. The project is hosted by JetBrains and has an active develop branch with releases. Version 1.2.0 came out on 2026-08-28, following 1.1.1 and 1.0.0. That release cadence suggests active maintenance. However, the project is marked as an incubator, so APIs may change between minor versions. The README says the framework follows semantic versioning, which helps, but the add-ons module is still beta. Upgrade cost depends on how much you use those beta APIs. The persistence and history compression features are central to the value proposition, yet their configuration is not documented in the README. You will likely need to read the source or API docs to understand how to enable them. There is a YouTrack project for issues and a Slack channel for support, which are concrete resources, but community size is not stated.
Editorial conclusion
Adopt Koog if you are a Kotlin or Java developer building AI agents that must run on JVM, Android, iOS, or in-browser, and you value JetBrains' backing and built-in fault-tolerance features. Do not adopt it if you need a mature, widely proven framework or require full multiplatform coverage beyond the listed targets. Before committing, verify the current state of the add-ons module (1.2.0-beta) and check whether the persistence and history compression features work with your chosen LLM providers, since the documentation is still thin and the project is an incubator.
Community notes