koog  by JetBrains

Kotlin framework for building AI agents

created 3 months ago
1,406 stars

Top 29.5% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Koog is a Kotlin-based framework for building and running AI agents, targeting developers who want to leverage idiomatic Kotlin for AI development. It simplifies the creation of agents capable of tool interaction, complex workflows, and user communication, offering a pure Kotlin implementation with features like intelligent history compression and a flexible graph workflow system.

How It Works

Koog provides a modular, composable architecture for AI agents, enabling customization through a feature system. It supports flexible graph workflows for designing agent behaviors and integrates with LLM providers via the Model Context Protocol (MCP). Key advantages include a pure Kotlin implementation, parallel tool calls via a streaming API, persistent memory, and comprehensive tracing for debugging.

Quick Start & Requirements

  • Install: Add ai.koog:koog-agents:0.1.0 to your Gradle or Maven project.
  • Prerequisites: JDK 17+ for JVM targets. API keys for LLM providers (OpenAI, Anthropic, Google, OpenRouter, Ollama).
  • Example: A main function demonstrates a simple agent run with an OpenAI LLM. Quickstart Example
  • Documentation: Official Documentation

Highlighted Details

  • Pure Kotlin implementation for AI agents.
  • Supports JVM and JS targets via Kotlin Multiplatform.
  • Integrates with multiple LLM providers: Google, OpenAI, Anthropic, OpenRouter, Ollama.
  • Features intelligent history compression and persistent agent memory.
  • Offers flexible graph workflows and a modular feature system.

Maintenance & Community

  • Developed by JetBrains.
  • Official Slack channel available for support and community interaction. Slack Channel

Licensing & Compatibility

  • Licensed under the Apache 2.0 License.
  • Compatible with commercial and closed-source projects.

Limitations & Caveats

The framework is at version 0.1.0, indicating it is likely in an early stage of development with potential for breaking changes and missing features.

Health Check
Last commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
108
Issues (30d)
24
Star History
1,441 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.