JetBrains Open-Sources KotlinLLM: Smart Macros That Generate Kotlin Source Code at Runtime and Hot-Reload It Through JDI
JetBrains open-sources KotlinLLM: LLM-generated code compiles to static Kotlin, then runs with zero inference overhead.

Why it matters
A practical tool for Kotlin developers that uses LLMs to generate code once at development time, compiles it into the running JVM, and eliminates runtime inference costs — changing how teams think about LLM-assisted development beyond simple API calls.
The key facts
11 to knowJetBrains Research open-sources KotlinLLM under Apache 2.0
IntelliJ IDEA plugin with Smart macros (asLlm, mockLlm)
Captures runtime values via JDI, requests narrow code updates from LLM agent, compiles and hot-reloads via class redefinition
24/24 scenarios completed with 100% hot-reload success rate on adapted Spring Petclinic
Approximately 1% runtime overhead after compilation
Generated code runs as plain Kotlin with no further inference calls
JetBrains Research open-sourced KotlinLLM under Apache 2.0
LLM generates Kotlin source once; compiles and hot-reloads via JDI
24/24 scenarios completed on Spring Petclinic; 100% hot-reload success rate
~1% runtime overhead post-generation
No inference calls after initial code generation
Go to the source
MarkTechPostmarktechpost.com
Publisher excerpt: JetBrains Research has open-sourced KotlinLLM under the Apache License 2.0. The IntelliJ IDEA plugin prototype adds Smart macros, asLlm and mockLlm, whose bodies are generated Kotlin source rather than live model calls. The plugin captures runtime values through JDI, asks an LLM agent for a narrow…