Kotlin and Java toolkit to create agents with tools, graphs, MCP, streaming, and Spring or Ktor integrations across JVM and mobile targets.
Overview
Koog is an open-source JetBrains framework for composing AI agents on the JVM. Developers define agent behavior in idiomatic Kotlin or Java, attach tools and workflows, and connect to multiple large language model providers from one codebase.
Agents can follow predefined strategies, custom functions, or graph-based flows, including planner-style loops. The stack covers prompts, tool calls, structured output, streaming responses, history compression, persistence checkpoints, tracing, and retrieval augmented generation with vector memory.
Integrations include Model Context Protocol and Agent Client Protocol, plus hooks for Spring Boot and Ktor servers. Observability exporters target common telemetry stacks. LLM backends listed in documentation include cloud APIs, OpenRouter, Ollama, and Bedrock among others.
Kotlin Multiplatform builds can target JVM, JavaScript, WebAssembly in the browser, Android, and iOS, so the same agent abstractions can ship on servers, desktops, and mobile clients where supported.
Key features
- Kotlin and Java agent APIs
- Graph and planner strategies
- MCP and ACP integrations
- Multiple LLM provider adapters
- Streaming and parallel tool calls
- History compression and persistence
- RAG and vector memory hooks
- Spring Boot and Ktor modules
Use cases
- Backend LLM agents on JVM
- Tool-using workflow automation
- Multiplatform mobile AI features
- Observable agent microservices
- Enterprise Spring-based copilots