Back to Newsroom

JetBrains Open-Sources KotlinLLM: Smart Macros That Generate Kotlin Source Code at Runtime and Hot-Reload It Through JDI

By Modelverse Editorial·July 31, 2026·2 min read
JetBrains Open-Sources KotlinLLM: Smart Macros That Generate Kotlin Source Code at Runtime and Hot-Reload It Through JDI

JetBrains Research has open-sourced KotlinLLM, an experimental IntelliJ IDEA plugin for Kotlin/JVM projects that introduces "Smart macros." These are Kotlin function calls, like asLlm<F, T>(from, hint) for type conversion or mockLlm<T>() for generating stateful interface implementations, whose bodies are dynamically generated Kotlin source code by an LLM. Crucially, while a research prototype, its output is deployable: once behavior is generated, the resulting plain Kotlin code can be compiled and run without further LLM interaction for that specific scenario.

The plugin operates via a sophisticated runtime evolution loop. Upon project launch, KotlinLLM identifies Smart macro calls and sets breakpoints. If initial generated logic doesn't match a runtime scenario, execution pauses. The plugin captures runtime context, feeds it to an LLM agent for a code update, then compiles and hot-reloads the new code using JVM class redefinition via JDI. This unique, Kotlin/JVM-specific capability allows applications to dynamically adapt and evolve their code based on real-time execution needs, ensuring robust and context-aware behavior with minimal overhead.

KotlinLLM represents a significant advancement for developers and researchers. Developers gain a novel way to integrate LLMs, enabling dynamic code generation, reducing boilerplate, and simplifying complex tasks. Researchers benefit from an open-source platform to explore runtime code evolution and LLM-driven adaptation. This experimental plugin paves the way for intelligent development environments where code can self-adapt and optimize at runtime.

ai-newsbreakingmarktechpost

Footnotes & Primary References

Related content

Advancing responsible AI across Europe

OpenAI shares how its safety, security, transparency, and provenance practices support responsible AI governance in Europe. The work will continue as the EU AI Act advances.

Read article

Anthropic says its own AI models breached three companies during security tests

After OpenAI's models broke into Hugging Face, Anthropic checked its own history and found three similar incidents

Read article

Building a Policy-Governed Multi-Agent Financial Research Workflow with Omnigent

In this tutorial, we demonstrate how to build and execute a multi-agent workflow with Omnigent in a secure, isolated Python environment. Learn to integrate live exchange-rate data,...

Read article
© 2026 Modelverse®. All rights reserved.Modelverse Newsroom