# Koog

A JVM framework, in idiomatic Kotlin and Java, for building AI agents that call tools, run multi-step workflows and communicate with users across backend services, Android, iOS and browser environments.

Koog is a Kotlin-based framework for building and running AI agents in idiomatic Kotlin and Java, deployable across JVM, JS, WasmJS, Android and iOS targets through Kotlin Multiplatform. Agents can interact with tools, handle multi-step workflows and communicate with users, with built-in retries and persistence for restoring agent state after a failure.

It compresses conversation history to manage token usage in long-running conversations, integrates with Spring Boot and Ktor, and exports OpenTelemetry traces to observability tools such as W&B Weave and Langfuse. It supports the Model Context Protocol and Agent Client Protocol for tool and client integration, lets an agent switch language models mid-conversation without losing history, and retrieves knowledge across conversations using vector embeddings and retrieval-augmented generation.

Website: https://docs.koog.ai
