JetBrains Analysis Open-Sources KotlinLLM. KotlinLLM is an IntelliJ IDEA plugin for Kotlin/JVM initiatives that provides a language characteristic referred to as Sensible macros. A Sensible macro is an everyday Kotlin perform name whose physique is generated Kotlin code. The general public API is intentionally small. asLlm converts an enter of kind F right into a typed worth T, equivalent to a knowledge class, enum, record, or primitive. mockLlm generates a stateful implementation of an interface T, whose conduct is dependent upon which strategies are referred to as on it.
val issuesApiUrl: String = asLlm(repoInput, trace = "GitHub API URL: get all points, together with closed")
val points: Record = asLlm(response, trace = "Return all beginner-friendly points for this repository")
The runtime loop
When a undertaking launches via the KotlinLLM run configuration, the plugin scans for asLlm and mockLlm calls, updates generated bootstrap/supplier/parser/mock information, launches the run configuration beneath JDI, and registers breakpoints on generated regenerate hooks. If generated logic doesn’t match a runtime state of affairs, execution reaches a hook. The plugin captures runtime values and sort data from the suspended body, the LLM agent submits a code replace, and the plugin compiles it and redefines the loaded class earlier than retrying the unique name.
KotlinLLM targets Kotlin/JVM particularly as a result of the runtime evolution loop is dependent upon JVM class redefinition via JDI.
Explainer: how a Sensible macro evolves
The embed beneath walks the macro API, animates the nine-step runtime loop, and fashions why lined situations cease costing inference calls.
Reported outcomes
On an tailored Spring Petclinic Kotlin undertaking with 18 asLlm name websites, 24 of 24 software situations accomplished after Sensible macro evolution, with a 100% hot-reload success charge and compilation/redefinition including roughly 1% of whole runtime overhead. An artificial “GitHub Newbie Challenge Radar” parsed actual challenge knowledge throughout 20 repositories and 30k+ points, reaching about 0.89 recall on ground-truth newbie labels.
Setup necessities
The plugin requires IntelliJ IDEA 2025.2.x, JDK 21, and an OpenAI API key saved within the goal undertaking’s .kotlinllm file through Instruments > KotlinLLM Settings. It’s launched beneath the Apache License 2.0, with runnable examples, the thesis write-up, and the KotlinConf 2026 speak recording within the repository.
Is it deployable?
Not as a manufacturing runtime, a minimum of not but. JetBrains labels KotlinLLM a analysis prototype, and it’s described it as an experimental IntelliJ IDEA plugin. The plugin is experimental, however its output is deployable. As soon as conduct has been generated, the goal undertaking can compile and run that conduct with out one other LLM request for a similar state of affairs. You ship plain Kotlin, not a mannequin dependency.
- Firm stage: finest match at present is R&D teams, platform groups at mid-size to giant Kotlin/JVM entities, and startups with tolerance for prototype tooling. Regulated enterprises ought to deal with generated sources as reviewable code, which is precisely how KotlinLLM shops them.
- Industries: fintech and banking (heavy JVM/Kotlin estates), developer tooling, e-commerce, logistics, and any staff parsing messy third-party API payloads.
- Purposes: normalizing semi-structured API responses into typed values, constructing evolving take a look at doubles, adapting to upstream schema drift, and classification over noisy textual content fields.
Key Takeaways
- KotlinLLM is a JetBrains Analysis prototype, not a manufacturing runtime.
- Sensible macros generate Kotlin supply that’s dedicated, reviewed, and run with out the plugin.
- Lined situations set off no additional LLM name, so no added latency or price.
- Petclinic analysis: 24/24 situations, 100% hot-reload, ~1% overhead.
- Apache 2.0, Kotlin/JVM solely, IntelliJ IDEA 2025.2.x plus JDK 21.
Sources: JetBrains Analysis weblog, the kotlinllm-plugin README, and InfoWorld

