$git clone https://github.com/JetBrains/koogBuild status:
| 1 | # Koog |
| 2 | |
| 3 | [](https://kotlinlang.org/docs/components-stability.html) |
| 4 | [](https://search.maven.org/artifact/ai.koog/koog-agents) |
| 5 | [](https://github.com/JetBrains#jetbrains-on-github) |
| 6 | [](http://kotlinlang.org) |
| 7 | [](https://github.com/JetBrains/koog/actions?query=branch%3Amain) |
| 8 | [](LICENSE.txt) |
| 9 | [](https://docs.koog.ai) |
| 10 | [](https://kotlinlang.slack.com/messages/koog-agentic-framework/) |
| 11 | |
| 12 | Build status: |
| 13 | |
| 14 | [](https://github.com/JetBrains/koog/actions/workflows/checks.yml?query=branch%3Adevelop) |
| 15 | [](https://github.com/JetBrains/koog/actions/workflows/heavy-tests.yml?query=branch%3Adevelop) |
| 16 | [](https://github.com/JetBrains/koog/actions/workflows/ollama-tests.yml?query=branch%3Adevelop) |
| 17 | |
| 18 | ## Overview |
| 19 | |
| 20 | Koog is a Kotlin-based framework designed to build and run AI agents entirely in idiomatic Kotlin. It lets you create agents that can interact with tools, handle complex workflows, and communicate with users. |
| 21 | |
| 22 | ### Key features |
| 23 | |
| 24 | Key features of Koog include: |
| 25 | |
| 26 | - **Multiplatform development**: Deploy agents across JVM, JS, WasmJS, Android, and iOS targets using Kotlin Multiplatform. |
| 27 | - **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. |
| 28 | - **Intelligent history compression**: Optimize token usage while maintaining context in long-running conversations using advanced built-in history compression techniques. |
| 29 | - **Enterprise-ready integrations**: Utilize integration with popular JVM frameworks such as Spring Boot and Ktor to embed Koog into your applications. |
| 30 | - **Observability with OpenTelemetry exporters**: Monitor and debug applications with built-in support for popular observability providers (W&B Weave, Langfuse). |
| 31 | - **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. |
| 32 | - **Integration with JVM and Kotlin applications**: Build AI agents with an idiomatic, type-safe Kotlin DSL designed specifically for JVM and Kotlin developers. |
| 33 | - **Model Context Protocol integration**: Use Model Context Protocol (MCP) tools in AI agents. |
| 34 | - **Knowledge retrieval and memory**: Retain and retrieve knowledge across conversations using vector embeddings, ranked document storage, and shared agent memory. |
| 35 | - **Powerful Streaming API**: Process responses in real-time with streaming support and parallel tool calls. |
| 36 | - **Modular feature system**: Customize agent capabilities through a composable architecture. |
| 37 | - **Flexible graph workflows**: Design complex agent behaviors using intuitive graph-based workflows. |
| 38 | - **Custom tool creation**: Enhance your agents with tools that access external systems and APIs. |
| 39 | - **Comprehensive tracing**: Debug and monitor agent execution with detailed, configurable tracing. |
| 40 | |
| 41 | ### Available LLM providers and platforms |
| 42 | |
| 43 | The LLM providers and platforms whose LLMs you can use to power your agent capabilities: |
| 44 | |
| 45 | |
| 46 | - OpenAI |
| 47 | - Anthropic |
| 48 | - DeepSeek |
| 49 | - OpenRouter |
| 50 | - Ollama |
| 51 | - Bedrock |
| 52 | |
| 53 | ### Quickstart example |
| 54 | |
| 55 | To help you get started with AI agents, here is a quick example: |
| 56 | |
| 57 | ` |