JetBrains/koog: Koog is the official Kotlin framework for building a…rtise and provides proven solutions for complex
LLM and AI problems 02/09/25, 09.26
JetBrains koog Type / to search
Code Issues 61 Pull requests 66 Discussions Actions Projects Security Insights
koog Public
92 Branches 6 Tags Go to file t Go to file About
Add file Code
Koog is the official Kotlin framework for
kpavlov Fix imports in KoogAutoConfigurat… building and running robust, scalable
50695f8 · 11 hours ago 342 Commits and production-ready AI agents across
all platforms – from backend services to
.devcontainer feat(junie): added .… 4 months ago Android and iOS, JVM, and even in-
browser environments. Koog is based on
.github KG-305 [WIP] Add … 3 days ago our AI products expertise and provides
proven solutions for complex LLM and AI
agents KG-305 Fix Split Pa… 14 hours ago
problems
buildSrc KG-305 [WIP] Add … 3 days ago docs.koog.ai
docs Fix code example in… 3 days ago # kotlin # java # ai # spring # jvm # mcp # openai
# agents # agentframework # ktor # llm
embeddings Consolidate embed… 2 weeks ago
# generative-ai # anthropic # ollama # android-ai
examples Update Koog (0.4.1… yesterday # agentic-ai # aiagentframework
gradle Fix property bindin… 14 hours ago Readme
inspections Add inspection for … 3 months ago Apache-2.0 license
Contributing
integration-t… Fix compilation and… 5 days ago
Activity
koog-agents KG-305 Fix Split Pa… 14 hours ago Custom properties
2.4k stars
koog-ktor LLMParams and Re… last week
169 watching
koog-spring-… Fix imports in KoogA… 11 hours ago 149 forks
Report repository
license Add NOTICE file an… 4 months ago
prompt KG-305 Fix Split Pa… 14 hours ago
Releases 6
rag Add references to e… 2 weeks ago 0.4.1 Latest
5 days ago
test-utils Introduce test-utils … 3 days ago
+ 5 releases
.editorconfig add linter (#521) 2 months ago
Contributors 69
.gitignore KG-305 [WIP] Add … 3 days ago
CHANGELO… Add 0.4.1 changelog 5 days ago
CLAUDE.md Add testing guideli… 3 months ago
CONTRIBUTI… Add link to KG track… 2 months ago + 55 contributors
https://github.com/JetBrains/koog Page 1 of 4
JetBrains/koog: Koog is the official Kotlin framework for building a…rtise and provides proven solutions for complex LLM and AI problems 02/09/25, 09.26
Add NOTICE file an… 4 months ago Deployments 99
LICENSE.txt
github-pages 5 days ago
README.md Add 0.4.1 changelog 5 days ago
+ 98 deployments
TESTING.md OpenAI-alike model… 5 days ago
build.gradle.… KG-305 Fix Split Pa… 14 hours ago Languages
gradle.prope… Enable build cache 3 months ago
Kotlin 100.0%
gradlew Update Gradle 3 months ago
gradlew.bat Update Gradle 3 months ago
qodana.sarif.… Replace sessionUui… 2 months ago
qodana.yaml Ignore license chec… 2 months ago
settings.grad… KG-305 Fix Split Pa… 14 hours ago
README Contributing Apache-2.0 license
Koog
alpha maven-central v0.4.1 JetBrains incubator kotlin 2.1 checks pending license Apache-2.0 documentation chat slack
Overview
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.
Key features
Key features of Koog include:
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 with tools that access external systems and APIs.
Ready-to-use components: Speed up development with pre-built solutions for common AI engineering
challenges.
Intelligent history compression: Optimize token usage while maintaining conversation context using various pre-
built strategies.
Powerful Streaming API: Process responses in real-time with streaming support and parallel tool calls.
Persistent agent memory: Enable knowledge retention across sessions and even different agents.
Comprehensive tracing: Debug and monitor agent execution with detailed and configurable tracing.
Flexible graph workflows: Design complex agent behaviors using intuitive graph-based workflows.
Modular feature system: Customize agent capabilities through a composable architecture.
Scalable architecture: Handle workloads from simple chatbots to enterprise applications.
Multiplatform: Run agents on JVM, JS, WasmJS, iOS targets with Kotlin Multiplatform.
https://github.com/JetBrains/koog Page 2 of 4
JetBrains/koog: Koog is the official Kotlin framework for building a…rtise and provides proven solutions for complex LLM and AI problems 02/09/25, 09.26
Available LLM providers and platforms
The LLM providers and platforms whose LLMs you can use to power your agent capabilities:
Google
OpenAI
Anthropic
OpenRouter
Ollama
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(
executor = 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.
On JVM, JDK 17 or higher is required to use the framework.
Please check the libs.versions.toml to know more about the Koog dependencies.
Gradle (Kotlin DSL)
1. Add dependencies to the build.gradle.kts file:
dependencies {
implementation("ai.koog:koog-agents:0.4.1")
}
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.4.1'
}
https://github.com/JetBrains/koog Page 3 of 4
JetBrains/koog: Koog is the official Kotlin framework for building a…rtise and provides proven solutions for complex LLM and AI problems 02/09/25, 09.26
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.4.1</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 (link) and to use Koog official YouTrack project for
filing feature requests and bug reports.
https://github.com/JetBrains/koog Page 4 of 4