Overview
Koog is an open-source JetBrains framework for building AI agents designed specifically for the JVM ecosystem. It provides a first-class development experience for both Kotlin and Java developers, featuring an idiomatic, type-safe Kotlin DSL and fluent builder-style Java APIs.
While Java developers can leverage the full power of Koog on the JVM using idiomatic APIs, Kotlin developers can also deploy agents across JS, WasmJS, Android, and iOS targets using Kotlin Multiplatform.
-
Build and run your first AI agent
-
Learn the essential terms
Agents
Learn about agents in general and how to create different types of agents using Koog:
-
Use a predefined strategy that works for most common use cases
-
Define custom logic as a lambda function in plain Kotlin or Java
-
Implement a custom workflow as a strategy graph
-
Iteratively build and execute a plan until the state matches the desired conditions
Core components
Learn about the core components of Koog agents in detail:
-
Create, manage, and run prompts that drive the agent's interaction with the LLM
-
Design the agent's intended workflow as a directed graph
-
Enable the agent to interact with external data sources and services
-
Extend and enhance the functionality of AI agents
Advanced usage
-
Optimize token usage while maintaining context in long-running conversations using advanced techniques
-
Restore the agent state at specific points during execution
-
Generate responses in structured formats
-
Process responses in real-time with streaming support and parallel tool calls
-
Retain and retrieve knowledge across conversations using vector embeddings, ranked document storage, and shared agent memory
-
Debug and monitor agent execution with detailed, configurable tracing
-
Integrate vector databases and memory providers for RAG and persistent memory.
Integrations
-
Use MCP tools directly in AI agents
-
Add Koog to your Spring applications
-
Integrate Koog with Ktor servers
-
Trace, log, and measure your agent with popular observability tools
-
Connect agents and services over a shared protocol