TopGit
GitHub Repo Review

Koog: JetBrains' Kotlin Framework for AI Agents

KTopGit review image for JetBrains/koog
Review by Topgit.dev for JetBrains/koog, with GitHub repository stats and README context.
Quick verdict

Koog is JetBrains' Kotlin framework for building AI agents on the JVM, in the browser via WasmJS, or on iOS through Kotlin Multiplatform, treating agent reliability as a core design goal with built-in retries and state persistence. Reach for it if your team already writes Kotlin or Java services and wants agent code that type-checks like the rest of the codebase; skip it if your stack is Python.

Stars
★ 4.6k
Forks
⑂ 495
Language
Kotlin
License
Apache-2.0
Topic
AI Tools
Updated
Oct 2026
Homepage
GitHub

Introducing Koog: A JVM AI Agent Framework

Koog is a JVM framework from JetBrains that lets you write AI agents directly in Kotlin or Java, without going through a separate Python layer. It covers agents that call external tools, run multi-step workflows, and hold a conversation with a user, and it ships as Maven Central artifacts under the ai.koog group rather than as a hosted service, so you add it to a Gradle or Maven build like any other JVM dependency.

Core Capabilities for Building AI Agents

  • ✓Built-in retries and agent-state persistence let a run resume from a checkpoint instead of restarting after a failure.
  • ✓Automatic history compression trims conversation context so long-running agent sessions don't exhaust the LLM's token budget.
  • ✓A provider-agnostic prompt executor can switch the underlying LLM mid-conversation without losing existing chat history.
  • ✓Spring Boot and Ktor integrations let you wire Koog into an existing JVM service instead of standing up a separate agent process.
  • ✓OpenTelemetry-based observability sends execution traces to providers such as W&B Weave and Langfuse.
  • ✓Model Context Protocol (MCP) support lets agents call MCP tools, and Agent Client Protocol (ACP) support lets them talk to standardized client applications.
  • ✓A graph-based workflow API plus a modular feature system for composing agent behavior from smaller, swappable pieces.
  • ✓Vector-embedding-backed knowledge retrieval and RAG carry context across multiple conversations.
How this repository's GitHub stars have grown over time. Source: star-history.com.View the star history ↗

Where Koog Agents Shine

  • •Adding an agent to an existing Spring Boot or Ktor service without bringing in a second language runtime.
  • •Building agents inside Android or JVM desktop apps where the rest of the codebase is already Kotlin.
  • •Workflows that need to survive a failed LLM call mid-task, since agent-state persistence resumes a run instead of starting it over.
  • •Teams that want to swap LLM providers, say from OpenAI to Anthropic or a local Ollama model, without rewriting the agent or losing conversation history.

Getting Started with Koog

Koog installs as a Gradle or Maven dependency; there's no separate CLI or service to run. In Gradle Kotlin DSL, add implementation("ai.koog:koog-agents:1.1.1") and implementation("ai.koog:koog-agents-additions:1.1.1-beta") to build.gradle.kts, with matching coordinates for Groovy's build.gradle. Maven users add the ai.koog:koog-agents-jvm and ai.koog:koog-agents-additions-jvm artifacts at version 1.1.1 to pom.xml. In every case, mavenCentral() needs to be in your repository list. The README specifies JDK 17 or higher and Kotlin 2.3.10 or higher, built against kotlinx-coroutines version 1.10.2, kotlinx-serialization version 1.10.0, and kotlinx-datetime version 0.7.1.

Your First Koog AI Agent

The README's quickstart wraps an LLM client (OpenAILLMClient in the example, with Anthropic, Google, and OpenRouter clients as drop-in swaps) inside a MultiLLMPromptExecutor, then passes that executor, a system prompt string, and a model constant like OpenAIModels.Chat.GPT4o into an AIAgent constructor. It reads the API key from an environment variable, and calling agent.run() with a user message returns a result you can print directly. The whole example runs inside a single runBlocking coroutine block.

Advantages of Using Koog

  • ✓Kotlin-native API design gives agent code the same type-checking and IDE tooling as the rest of a JVM project, instead of bolting on a Python SDK.
  • ✓Built-in retries and state persistence handle failure recovery directly rather than leaving it for the caller to reimplement.
  • ✓Switching LLM providers without losing chat history cuts down the lock-in that comes from writing agent code against one vendor's SDK.
  • ✓OpenTelemetry-based tracing plugs into observability stacks teams are likely already running, instead of requiring a separate dashboard just for Koog.
  • ✓Apache-2.0 licensing leaves commercial use unrestricted.

Potential Drawbacks and Considerations

  • △The feature list in the README claims Android as a Kotlin Multiplatform target, but the separate 'Supported targets' section only names JVM, JS, WasmJS, and iOS, so Android support isn't consistently confirmed.
  • △Requires JDK 17 or higher and Kotlin 2.3.10 or higher, which rules out projects still on older JVM or Kotlin toolchains.
  • △No adopter list, usage metrics, or production case studies appear in the README, so JetBrains' own description of Koog as 'enterprise-ready' isn't backed by documented examples.
  • △The surrounding tutorial and third-party integration base is smaller than what's grown up around longer-established agent frameworks.
  • △The README's quickstart only demonstrates a single agent.run() call; multi-step graph workflows and custom tool wiring aren't shown in the README itself.
View on GitHub ↗Homepage ↗

Koog Alternatives for AI Agent Development

Frequently Asked Questions about Koog

What programming languages does Koog support?

Koog is built for Kotlin and Java on the JVM; the README describes it as a framework for creating AI agents with idiomatic Kotlin and Java APIs rather than a Python library.

Which LLM providers are compatible with Koog?

The README lists Google, OpenAI, Anthropic, DeepSeek, OpenRouter, Ollama, and Bedrock as supported LLM providers, and Koog can switch between them mid-conversation without losing chat history.

Can Koog be used for enterprise-grade applications?

JetBrains describes Koog as enterprise-ready, pointing to its Spring Boot and Ktor integrations, OpenTelemetry tracing, and built-in retries, though the README doesn't list specific enterprise adopters.

What is the licensing model for Koog?

Koog is released under the Apache 2.0 License, matching the Apache-2.0 license listed on its GitHub repository.

Does Koog support multiplatform deployment?

Koog uses Kotlin Multiplatform; the README's 'Supported targets' section lists JVM, JS, WasmJS, and iOS, while a separate features list also mentions Android as a target.

How does Koog ensure agent reliability and state persistence?

Koog uses automatic retries to recover from failures and can checkpoint an agent mid-run, then resume execution from that checkpoint later instead of starting over, per the README's persistence feature.

The problem it solves

Building an AI agent on the JVM usually means writing it in Python and bridging the result back into a Kotlin or Java service, or hand-rolling retry logic, state checkpoints, and provider-switching code around a raw LLM SDK. Koog's README frames its own reason for existing around that gap: a Kotlin- and Java-native framework meant to handle agent failures, state restoration, and multi-provider LLM access inside the same JVM process a Spring Boot or Ktor app already runs in, instead of adding a separate Python service to the stack.

Who should try it — and who should skip

Try Koog if you're a Kotlin or Java team adding agent behavior to an existing Spring Boot, Ktor, or Android codebase and want built-in retries, state persistence, and LLM-provider switching without leaving the JVM. Skip it if your team's stack is Python, or if you want a hosted, no-code way to assemble agents — Koog is a library you compile against, not a UI you drag boxes in.

Related repositories

Source & attribution

Facts and quotes sourced from the JetBrains/koog GitHub repository and its README.

GitHub data · last synced Aug 12, 2026Reviewed by Henry
← Back to TopGit

Still deciding about koog?

One click hands the question to an AI along with this page — see what it says about koog.

GitHub