koog  by JetBrains

Kotlin framework for building AI agents

Created 4 months ago
3,095 stars

Top 15.5% on SourcePulse

GitHubView on GitHub
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

21 hours ago

Responsiveness

1 day

Pull Requests (30d)
170
Issues (30d)
48
Star History
1,587 stars in the last 30 days

Explore Similar Projects

Starred by Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
7 more.

SuperAGI by TransformerOptimus

0.1%
17k
Open-source framework for autonomous AI agent development
Created 2 years ago
Updated 7 months ago
Feedback? Help us improve.