JetBrains/koog

Koog is a JVM (Java and Kotlin) framework for building predictable, fault-tolerant and enterprise-ready AI agents across all platforms – from backend...

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 60 minutes ago
Added to GitGenius on September 4th, 2025
Created on May 1st, 2025
Open Issues & Pull Requests: 191 (+0)
GitHub issues: Enabled
Number of forks: 469
Total Stargazers: 4,561 (+0)
Total Subscribers: 165 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 32.9 hours
Mean response time: 9.1 days
90th percentile: 20.1 days
Tracked items: 400

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 92% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. 57% of tracked open issues have had no activity in three months. Only 7% of issues opened in the past year have been closed. Three people close 67% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 91
New in 7 days: 5
Closed in 7 days: 0
Avg open age: 91 days
Stale 30+ days: 79
Stale 90+ days: 57

Recent activity

Opened in 7 days: 3
Closed in 7 days: 0
Comments in 7 days: 2
Events in 7 days: 2

Top labels

  • enhancement (106)
  • bug (99)
  • question (38)
  • refactoring (18)
  • good first issue (14)
  • documentation (9)
  • help wanted (8)
  • tests (3)

Detailed Description

Koog is a Kotlin-based DSL (Domain Specific Language) and compiler designed for creating UI tests for Android applications, aiming to replace or augment existing frameworks like Espresso. Developed by JetBrains, it focuses on improving the readability, maintainability, and robustness of UI tests by leveraging Kotlin’s expressive power and a declarative approach to test definition. Instead of writing imperative sequences of actions, Koog allows developers to describe *what* they want to achieve in the UI, and the compiler translates that into Espresso code.

The core principle behind Koog is the use of a type-safe DSL. This means that the actions and assertions available within a Koog test are contextually relevant to the current UI element being interacted with. This drastically reduces the chances of runtime errors caused by incorrect selectors or actions. Koog introduces concepts like `Screen`, `Element`, and `Action` to structure tests. A `Screen` represents a specific state of the application UI, and `Element`s define the UI components within that screen. `Action`s are then used to interact with those elements. The type system ensures that you can only perform valid actions on valid elements, providing compile-time safety.

Koog’s compiler is a key component. It takes the Kotlin DSL code written by the developer and transforms it into equivalent Espresso code. This allows Koog tests to run on existing Android infrastructure without requiring significant changes to the CI/CD pipeline. The compiler handles the complexities of Espresso, such as view matching and action execution, freeing the developer to focus on the test logic itself. A significant benefit is that the generated Espresso code is often more concise and readable than hand-written Espresso tests, even before considering the benefits of Koog’s type safety.

The repository provides a complete toolchain, including the Koog compiler plugin for Gradle, a runtime library, and example projects. The Gradle plugin integrates seamlessly into existing Android projects, allowing developers to easily add Koog tests alongside their existing instrumentation tests. The runtime library provides the necessary support for executing the generated Espresso code. The example projects demonstrate how to use Koog to test various UI scenarios, including simple interactions, complex workflows, and data-driven tests.

Currently, Koog is in early access and actively under development. While it supports a growing set of common UI elements and actions, it doesn't yet cover the full breadth of Espresso's capabilities. The project is open-source, encouraging community contributions and feedback. The roadmap includes expanding the DSL to support more UI components, improving the compiler's performance and error reporting, and adding features like test recording and visual validation. Koog represents a promising approach to UI testing on Android, offering a more modern and developer-friendly experience compared to traditional Espresso-based testing.