Koog is a Kotlin‑based framework for building and running AI agents entirely in idiomatic Kotlin, supporting both single‑run agents that process individual inputs and complex workflow agents with custom strategies and configurations. It features pure Kotlin implementation, seamless Model Control Protocol (MCP) integration for enhanced model management, vector embeddings for semantic search, and a flexible system for creating and extending tools that access external systems and APIs. Ready‑to‑use components address common AI engineering challenges, while intelligent history compression optimizes token usage and preserves context. A powerful streaming API enables real‑time response processing and parallel tool calls. Persistent memory allows agents to retain knowledge across sessions and between agents, and comprehensive tracing facilities provide detailed debugging and monitoring.
Features
- Pure Kotlin implementation with no external DSL or wrapper overhead
- Native support for embedding models via Model Context Protocol (MCP)
- Custom tool integration enabling agents to call APIs or services
- Intelligent memory management: persistent agent state, checkpoints, and history compression
- Streaming API and support for parallel “MapReduce”-style tool execution
- Observability with OpenTelemetry tracing, moderation filters, and detailed logging