freshcrate
Skin:/
Home > MCP Servers > koog

koog

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-brow

Why this rank:Strong adoptionRecent releaseHealthy release cadence

Description

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

README

Koog

Kotlin Alpha Maven Central JetBrains incubator project Kotlin CI status GitHub license

Build status:

Checks Heavy Tests Ollama Tests

Useful links:

Overview

Koog is a Kotlin-based framework designed to build and run AI agents entirely in idiomatic Kotlin and Java API. It lets you create agents that can interact with tools, handle complex workflows, and communicate with users.

Key features

Key features of Koog include:

  • Multiplatform development: Deploy agents across JVM, JS, WasmJS, Android, and iOS targets using Kotlin Multiplatform.
  • Reliability and fault-tolerance: Handle failures with built-in retries and restore the agent state at specific points during execution with the agent persistence feature.
  • Intelligent history compression: Optimize token usage while maintaining context in long-running conversations using advanced built-in history compression techniques.
  • Enterprise-ready integrations: Utilize integration with popular JVM frameworks such as Spring Boot and Ktor to embed Koog into your applications.
  • Observability with OpenTelemetry exporters: Monitor and debug applications with built-in support for popular observability providers (W&B Weave, Langfuse).
  • LLM switching and seamless history adaptation: Switch to a different LLM at any point without losing the existing conversation history, or reroute between multiple LLM providers.
  • Integration with JVM and Kotlin applications: Build AI agents with an idiomatic, type-safe Kotlin DSL designed specifically for JVM and Kotlin developers.
  • Model Context Protocol integration: Use Model Context Protocol (MCP) tools in AI agents.
  • Agent Client Protocol integration: Build ACP-compliant agents that can communicate with standardized client applications using the Agent Client Protocol (ACP).
  • Knowledge retrieval and memory: Retain and retrieve knowledge across conversations using vector embeddings, RAG, and shared agent memory.
  • Powerful Streaming API: Process responses in real-time with streaming support and parallel tool calls.
  • Modular feature system: Customize agent capabilities through a composable architecture.
  • Flexible graph workflows: Design complex agent behaviors using intuitive graph-based workflows.
  • Custom tool creation: Enhance your agents with tools that access external systems and APIs.
  • Comprehensive tracing: Debug and monitor agent execution with detailed, configurable tracing.

Available LLM providers and platforms

The LLM providers and platforms whose LLMs you can use to power your agent capabilities:

  • Google
  • OpenAI
  • Anthropic
  • DeepSeek
  • OpenRouter
  • Ollama
  • Bedrock

Quickstart example

To help you get started with AI agents, here is a quick example:

fun main() = runBlocking {
    // Before you run the example, assign a corresponding API key as an environment variable.
   val apiKey = System.getenv("OPENAI_API_KEY") // or Anthropic, Google, OpenRouter, etc.

   val agent = AIAgent(
      promptExecutor = simpleOpenAIExecutor(apiKey), // or Anthropic, Google, OpenRouter, etc.
      systemPrompt = "You are a helpful assistant. Answer user questions concisely.",
      llmModel = OpenAIModels.Chat.GPT4o
   )

   val result = agent.run("Hello! How can you help me?")
   println(result)
}

Using in your projects

Supported targets

Currently, the framework supports the JVM, JS, WasmJS and iOS targets.

Requirements

  • JDK 17 or higher is required to use the framework on JVM.
  • Kotlin 2.3.10 or higher should be set explicitly in existing projects. Please check the libs.versions.toml to know more about Kotlin dependencies (currently it uses kotlinx-coroutines 1.10.2, kotlinx-serialization 1.10.0 and kotlinx-datetime 0.7.1)

Gradle (Kotlin DSL)

  1. Add dependencies to the build.gradle.kts file:

    dependencies {
        implementation("ai.koog:koog-agents:0.7.3")
    }
    
  2. Make sure that you have mavenCentral() in the list of repositories.

Gradle (Groovy)

  1. Add dependencies to the build.gradle file:

    dependencies {
        implementation 'ai.koog:koog-agents:0.7.3'
    }
    
  2. Make sure that you have mavenCentral() in the list of repositories.

Maven

  1. Add dependencies to the pom.xml file:

    <dependency>
        <groupId>ai.koog</groupId>
        <artifactId>koog-agents-jvm</artifactId>
        <version>0.7.3</version>
    </dependency>
    
  2. Make sure that you have mavenCentral in the list of repositories.

Contributing

Read the Contributing Guidelines.

Code of Conduct

This project and the corresponding community are governed by the JetBrains Open Source and Community Code of Conduct. Please make sure you read it.

License

Koog is licensed under the Apache 2.0 License.

Support

Please feel free to ask any questions in our official Slack channel and to use Koog official YouTrack project for filing feature requests and bug reports.

Release History

VersionChangesUrgencyDate
1.0.0This is the **first stable release of Koog**. The 1.0 line establishes a long-term-supported surface across the framework: modules are split into stable and beta streams so production code can pin to APIs that won't break without a deprecation cycle, every previously deprecated API has been removed, and the graph DSL's node names are finalized. Alongside that, 1.0 lands a redesigned Java interop layer, decouples HTTP transport from Ktor, brings OpenTelemetry to Kotlin Multiplatform, and adds AntHigh5/21/2026
0.8.0# 0.8.0 > Published 10 April 2026 ## Major Features - **Spring AI Integration**: Added comprehensive Spring AI support with `ChatMemoryRepository` and `VectorStore` integration for seamless persistence and retrieval (#1719, #1763) - **Amazon Bedrock AgentCore Memory**: Introduced `ChatHistoryProvider` backed by Amazon Bedrock AgentCore Memory for managed conversation state (#1758) - **DataDog LLM Observability**: Added DataDog LLM Observability exporter with response metadata forwardingHigh4/11/2026
0.7.3> Published 26 March 2026 ## New Features - **Bedrock prompt caching**: Added `CacheControl` property on Assistant, User, and System messages within the Prompt and integrated explicit cache blocks in the Bedrock Converse API (#1583) ## Bug Fixes - **Agent deadlock fix**: Fixed deadlock when `agent.run()` is called from within `executor.submit` โ€” when the agent was invoked from a worker thread of the configured `ExecutorService`, `runBlocking(context)` would dispatch the coroutine bacMedium3/26/2026
0.7.2> Published 19 March 2026 ## Bug Fixes - **Java API for OpenTelemetry extensions**: Fixed Java API inside `OpenTelemetryConfig` class annotated with `@JavaOverride` that relied on Kotlin `Duration` class, causing all further attributes to be skipped by the compiler in Langfuse and Weave extensions ([KG-754](https://youtrack.jetbrains.com/issue/KG-754), #1682) - **System prompt preservation in agent builder**: Fixed `systemPrompt` method in agent builders to preserve previously configurLow3/19/2026
0.7.1> Published 17 March 2026 ## Major Features - **Java API**: Introduced comprehensive Java interoperability across the framework: - Java API for creating and running agents from pure Java projects (#1185) - Builder-based Java API for graph strategies (#1581, #1617, #1366) - Java-friendly API for `AIAgentStorage` with JVM-specific methods (#1600) - Blocking API builders for `PromptExecutor` and `LLMClient` for Java (#1555, #1604) - Jackson as the default serializer for Java APLow3/17/2026
0.6.4## Major Features - **LLM Client Router**: Added support for routing requests across multiple LLM clients with pluggable load balancing strategies. Includes a built-in round-robin router and fallback handling when a provider is unavailable (#1503) ## Improvements - **Anthropic models list**: Implemented `models()` for the Anthropic LLM client, consistent with other supported providers ([KG-527](https://youtrack.jetbrains.com/issue/KG-527), #1460) - **Dependency updates**: Updated `io.lettuLow3/4/2026
0.6.3## Improvements - **Streaming reasoning support**: Models with reasoning capabilities (like Claude Sonnet 4.5 or GPT-o1) now stream their reasoning process in real-time, allowing you to see how the model thinks through problems as it generates responses ([KG-592](https://youtrack.jetbrains.com/issue/KG-592), #1264) - **LLModel API enhancement**: LLM clients now return `List<LLModel>` instead of `List<String>` for improved type safety and direct access to model metadata (#1452) - **Multiple evLow2/26/2026
0.6.2> Published 10 February 2026 ## Improvements - **Structured output with examples**: Include examples in the prompt with `StructuredRequest.Native` to help LLMs better understand desired data format (#1328, #1396) ## Bug fixes - **Kotlin/Wasm support**: Applied workaround for Kotlin/Wasm compiler bug which produced invalid Wasm files ([KT-83728](https://youtrack.jetbrains.com/issue/KT-83728), #1365) Low2/10/2026
0.6.1> Published 28 January 2026 ## Major Features **Block of changes**: - **Converse API support in Bedrock LLM client**: Added support for the Converse API in the Bedrock LLM client, enabling richer prompt-based interactions ([KG-543](https://youtrack.jetbrains.com/issue/KG-543), #1384) - **Tool choice heuristics**: Introduced heuristic-based required tool selection via `LLMBasedToolCallFixProcessor` for models that do not support explicit tool choice ([KG-200](https://youtrack.jetbrains.com/Low1/28/2026
0.6.0> Published 22 December 2025 ## Major Features - **ACP Integration**: Introduce initial ACP (Agent Communication Protocol) integration to create ACP-compatible agents in Koog (#1253) - **Planner Agent Type**: Introduce new "planner" agent type with iterative planning capabilities. Provide two out-of-the box strategies: simple LLM planner and GOAP (Goal-Oriented Action Planning) (#1232) - **Response Processor**: Introduce `ResponseProcessor` to fix tool call messages from weak models thatLow12/22/2025
0.5.4> Published 03 December 2025 ## Improvements - LLM clients: better error reporting (#1149). Potential **breaking change**: LLM clients now throw `LLMClientException` instead of `IllegalStateException` ([KG-552](https://youtrack.jetbrains.com/issue/KG-552)) - Add support for **OpenAI** **GPT-5.1** and **GPT-5 pro** (#1121) and (#1113) and **Anthropic** **Claude Opus 4.5** (#1199) - Add Bedrock support in Ktor for configuring and initializing Bedrock LLM clients. (#1141) - Improve Bedrock mLow12/3/2025
0.5.3> Published 12 November 2025 ## New Features - Reasoning messages support (#943) - Add get models list request to `OpenAI`-based `LLMClient`s (#1074) ## Improvements - Support subgraph execution events in an agent pipeline and features, including `OpenTelemetry` (#1052) - Make `systemPrompt` and `temperature` optional, set default temperature to null in `AIAgent` factory functions (#1078) - Improve compatibility with kotlinx-coroutines 1.8 in runtime by removing `featurePrepareDispatcLow11/12/2025
0.5.2> Published 29 Oct 2025 ## New Features - Add `subtask` extension for non-graph agents similar to `subgraphWithTask` (#982) - Add MistralAI LLM Client (#622) ## Improvements - Replace string content and attachments list in messages with a unified content parts list to make the API more flexible and preserve text/attachment parts order (#1004) - Add input and output attributes to the NodeExecuteSpan span in OpenTelemetry to improve observability [(KG-501)](https://youtrack.jetbrains.comLow10/29/2025
0.5.1> Published 15 Oct 2025 ## Improvements - **Add error handling in LocalFileMemoryProvider** (#905) - **Add GPT-5 Codex** model support (#888) - **Added support for filters** in PersistenceProvider (#936) - **Added** **DashScope (Qwen)** LLM client support (#687) - Excluded **Ktor** engine dependencies ([KG-315](https://youtrack.jetbrains.com/issue/KG-315)) - Support additional **Bedrock auth options** (#923) - `requestLLMStreaming` now respect `AgentConfig.missingToolsConversionStrategLow10/15/2025
0.5.0> Published 2 Oct 2025 ## Major Features - **Full Agent-to-Agent (A2A) Protocol Support**: - **Multiplatform Kotlin A2A SDK**: Including server and client with JSON-RPC HTTP support. - **A2A Agent Feature**: seamlessly integrate A2A in your Koog agents - **Non-Graph API for Strategies**: Introduced non-graph API for creating AI Agent strategies as Kotlin extension functions with most of Koog's features supported (#560) - **Agent Persistence and Checkpointing**: - **Roll baLow10/2/2025
0.4.2> Published 15 Sep 2025 ## Bug Fixes - Add missing tool calling support for Bedrock Nova models so agents can invoke functions when using Nova ([KG-239](https://youtrack.jetbrains.com/issue/KG-239)). - Add Android target support and migrate Android app to Kotlin Multiplatform to widen KMP coverage ([KG-315](https://youtrack.jetbrains.com/issue/KG-315), #728, #767). - Add Spring Boot Java example to jumpโ€‘start integration (#739). - Add Java Spring autoโ€‘config fixes: correct property biLow9/15/2025
0.4.1> Published 28 Aug 2025 ## Bug Fixes Fixed iOS target publicationLow8/28/2025
0.4.0> Published 27 Aug 2025 ## Major Features - **Integration with Observability Tools**: - **Langfuse Integration**: Span adapters for Langfuse client, including open telemetry and graph visualisation ([KG-217](https://youtrack.jetbrains.com/issue/KG-217), [KG-223](https://youtrack.jetbrains.com/issue/KG-223)) - **W&B Weave Integration**: Span adapters for W&B Weave open telemetry and observability ([KG-217](https://youtrack.jetbrains.com/issue/KG-217), [KG-218](https://youtrack.jetbraiLow8/27/2025
0.3.0> Published 15 Jul 2025 ## Major Features - **Agent Persistency and Checkpoints**: Save and restore agent state to local disk, memory, or easily integrate with any cloud storages or databases. Agents can now roll back to any prior state on demand or automatically restore from the latest checkpoint (#305) - **Vector Document Storage**: Store embeddings and documents in persistent storage for retrieval-augmented generation ( RAG), with in-memory and local file implementations (#2Low7/15/2025
0.2.1> Published 6 Jun 2025 ## Bug Fixes - Support MCP enum arg types and object additionalParameters (#214) - Allow appending handlers for the EventHandler feature (#234) - Fix LLM clients after #195, make LLM request construction again more explicit in LLM clients (#229) ## Improvements - Migrating of simple agents to `AIAgent` constructor, `simpleSingleRunAgent` deprecation (#222)Low6/6/2025
0.1.0> Published 21 May 2025 The first public release of Koog, a Kotlin-based framework designed to build and run AI agents entirely in idiomatic Kotlin. ## Key Features - **Pure Kotlin implementation**: Build AI agents entirely in natural and idiomatic Kotlin - **MCP integration**: Connect to Model Context Protocol for enhanced model management - **Embedding capabilities**: Use vector embeddings for semantic search and knowledge retrieval - **Custom tool creation**: Extend your agents wiLow6/5/2025
0.2.0> Published 5 Jun 2025 ## Features - Add media types (image/audio/document) support to prompt API and models (#195) - Add token count and timestamp support to Message.Response, add Tokenizer and MessageTokenizer feature (#184) - Add LLM capability for caching, supported in anthropic mode (#208) - Add new LLM configurations for Groq, Meta, and Alibaba (#155) - Extend OpenAIClientSettings with chat completions API path and embeddings API path to make it configurable (#182) ## ImprovemenLow6/5/2025

Dependencies & License Audit

Loading dependencies...

Similar Packages

samplesAgent samples built using the Strands Agents SDK.main@2026-06-04
sdk-pythonA model-driven approach to building AI agents in just a few lines of code.python/v1.42.0
voltagentAI Agent Engineering Platform built on an Open Source TypeScript AI Agent Framework@voltagent/server-core@2.1.18
docsDocumentation for the Strands Agents SDK. A model-driven approach to building AI agents in just a few lines of code. v0.1.0
Deepagent-research-context-engineering๐Ÿ” Accelerate research using a Multi Agent System for efficient context engineering with DeepAgent and LangChain's library.main@2026-06-05

More in MCP Servers

AstrBotAgentic IM Chatbot infrastructure that integrates lots of IM platforms, LLMs, plugins and AI feature, and can be your openclaw alternative. โœจ
agentscopeBuild and run agents you can see, understand and trust.
claude-plugins-officialOfficial, Anthropic-managed directory of high quality Claude Code Plugins.
langchain4jLangChain4j is an open-source Java library that simplifies the integration of LLMs into Java applications through a unified API, providing access to popular LLMs and vector databases. It makes impleme