Build AI Agents with Kotlin
The official Kotlin framework for building predictable, fault-tolerant and enterprise-ready AI agents across all platforms
Why Koog?
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.Multiplatform
Deploy agents across JVM, JS, WasmJS, Android, and iOS targets using Kotlin Multiplatform
Fault-Tolerant
Built-in retries and state persistence to handle failures gracefully
Enterprise-Ready
Integrate with Spring Boot and Ktor for production deployments
Type-Safe DSL
Idiomatic Kotlin DSL designed specifically for JVM and Kotlin developers
Multiple LLM Providers
Support for OpenAI, Anthropic, Google, Ollama, DeepSeek, and more
Observability
Built-in OpenTelemetry support for monitoring and debugging
Quick Example
Get started with a simple agent in just a few lines of Kotlin:Key Features
Intelligent History Compression
Optimize token usage while maintaining context in long-running conversations
Graph-Based Workflows
Design complex agent behaviors using intuitive graph-based workflows
Model Context Protocol
Use MCP tools in AI agents for enhanced functionality
Agent Client Protocol
Build ACP-compliant agents that communicate with standardized client applications
Knowledge Retrieval
Retain and retrieve knowledge across conversations using vector embeddings and RAG
Streaming API
Process responses in real-time with streaming support and parallel tool calls
Custom Tools
Enhance your agents with tools that access external systems and APIs
Comprehensive Testing
Debug and test agents with detailed tracing and mocking utilities
Get Started
Quickstart
Build your first AI agent in minutes
Installation
Add Koog to your Kotlin project
Core Concepts
Learn the fundamental concepts behind Koog
Examples
Explore real-world examples and use cases
Supported LLM Providers
OpenAI
GPT-4, GPT-3.5, and more
Anthropic
Claude 3 and Claude 4
Gemini models
Ollama
Local LLM deployment
OpenRouter
Access multiple models
DeepSeek
DeepSeek models
Bedrock
AWS Bedrock integration
View All
See all providers
Community and Support
Slack Channel
Join our community on Slack
GitHub
Star us on GitHub and contribute
Issue Tracker
Report bugs and request features
API Reference
Explore the complete API documentation