AI Pulse by Inblix

JetBrains' new KotlinLLM plugin uses LLMs to generate Java code that actually ships

MarkTechPost · Jul 31, 2026 · 2 min read · Read original article →

Curated by the Inblix editorial team


Featured image for article: JetBrains' new KotlinLLM plugin uses LLMs to generate Java code that actually ships

JetBrains Research just dropped something genuinely different from the usual AI coding assistant. KotlinLLM is an IntelliJ plugin that introduces “Smart macros” — regular Kotlin function calls whose bodies are generated by an LLM, then committed as plain source code you can review and ship. No model dependency at runtime. No hallucination roulette in production.

The API is deliberately tiny: asLlm<F, T>(from, hint) converts messy input into typed values like data classes or enums, and mockLlm<T>() generates stateful interface implementations for test doubles. Here’s the clever part. When execution hits a scenario the generated code can’t handle, the plugin captures runtime values, asks an LLM agent for a fix, compiles the update, and hot-redefines the loaded class — all through JVM class redefinition via JDI. Once a scenario is covered, it never costs another inference call.

Michal Sutter and the team tested this on an adapted Spring Petclinic project with 18 call sites. All 24 application scenarios completed after macro evolution, with a 100% hot-reload success rate and about 1% runtime overhead from compilation. A synthetic GitHub issue radar parsing 30,000+ issues across 20 repos hit roughly 0.89 recall on beginner-friendly labels. Those numbers aren’t earth-shattering, but they’re honest about what the prototype can do.

This isn’t for production runtimes — JetBrains labels it experimental, and regulated enterprises will want to scrutinize generated sources carefully. But the model is refreshingly pragmatic: the LLM writes code during development, not during execution. Platform teams at mid-size Kotlin shops, fintech firms with heavy JVM estates, and anyone wrestling semi-structured API payloads into typed submission will see the appeal immediately. Apache 2.0 licensed, requires IntelliJ IDEA 2025.2.x and JDK 21.

💡 Key Takeaways

  1. Smart macros generate plain Kotlin source you commit and review — the LLM is a development tool, not a runtime dependency
  2. The JDI-based hot-reload loop catches uncovered scenarios, requests an LLM fix, and redefines classes without restarting
  3. A 24-scenario Petclinic evaluation showed 100% hot-reload success with roughly 1% compilation overhead
  4. Covered execution paths never trigger another inference call, eliminating both latency and cost for known scenarios
  5. Currently a research prototype best suited for R&D groups and platform teams, not regulated production environments

Keep reading: See related articles below for more coverage on this topic.

Get smarter about AI

The sharpest AI news, curated daily. Delivered free to your inbox.

Learn more

Glossary terms

← Back to all articles