{"id":4710,"date":"2026-08-03T11:14:39","date_gmt":"2026-08-03T11:14:39","guid":{"rendered":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2026\/08\/03\/jetbrains-open-sources-kotlinllm-a-research-prototype-for-runtime-code-generation\/"},"modified":"2026-08-03T11:14:39","modified_gmt":"2026-08-03T11:14:39","slug":"jetbrains-open-sources-kotlinllm-a-research-prototype-for-runtime-code-generation","status":"publish","type":"post","link":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2026\/08\/03\/jetbrains-open-sources-kotlinllm-a-research-prototype-for-runtime-code-generation\/","title":{"rendered":"JetBrains Open-Sources KotlinLLM, a Research Prototype for Runtime Code Generation"},"content":{"rendered":"<div><img data-opt-id=116081836  fetchpriority=\"high\" decoding=\"async\" width=\"770\" height=\"330\" src=\"https:\/\/devops.com\/wp-content\/uploads\/2026\/08\/KotlinLLM_770x330_FINAL.jpg\" class=\"attachment-large size-large wp-post-image\" alt=\"\" \/><\/div>\n<p><img data-opt-id=1475274556  fetchpriority=\"high\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/devops.com\/wp-content\/uploads\/2026\/08\/KotlinLLM_770x330_FINAL-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail wp-post-image\" alt=\"\" \/><\/p>\n<p><span>JetBrains has released KotlinLLM as open source, giving Kotlin\/JVM developers a research prototype that lets applications generate their own logic at runtime \u2014 and then keep it as ordinary, reviewable source code.<\/span><\/p>\n<p><span>The tool comes from JetBrains Research, built by Anastasia Birillo and Stanislav Sandler, and it tackles a problem most teams have only half-solved so far: how do you let an LLM handle logic that\u2019s too messy or too variable to hand-write, without turning your production app into something that depends on a live model call every time it runs?<\/span><\/p>\n<p><span>KotlinLLM is an IntelliJ IDEA plugin that adds what the team calls \u201cSmart macros\u201d \u2014 Kotlin function calls whose bodies are generated code. There are two of them in the public API right now. <\/span><span>asLlm&lt;F, T&gt;()<\/span><span> takes unstructured or semi-structured input and converts it into a typed Kotlin value \u2014 a data class, an enum, a list, a primitive. <\/span><span>mockLlm&lt;T&gt;()<\/span><span> generates a stateful implementation of an interface, so it behaves like a test double you didn\u2019t have to write by hand.<\/span><\/p>\n<p><span>The call site looks like ordinary Kotlin. What\u2019s different is what happens underneath. Instead of shipping out to a model every time the function runs, KotlinLLM generates real Kotlin source the first time it hits a new scenario, then reuses that code going forward. No further model call, no added latency, and reproducible output because it\u2019s compiled code sitting in your repo.<\/span><\/p>\n<p><span>\u201cA model call in the request path has no SLA,\u201d said Mitch Ashley, VP and practice lead for software lifecycle engineering and AI-native software engineering at <a href=\"https:\/\/futurumgroup.com\/\" target=\"_blank\" rel=\"noopener\">The Futurum Group<\/a>. \u201cGenerating the code once and committing it puts that logic back under change control. Teams get a diff, a test, and a rollback path instead of a prompt they have to trust.\u201d<\/span><\/p>\n<p><span>That distinction matters because most existing approaches to this problem have real tradeoffs. Calling an LLM directly on every request is slow and non-deterministic, and it makes your app dependent on an external service at runtime. Routing logic through an external agent workflow keeps that logic outside your codebase, where it\u2019s harder to review or test. And most of the prior research in this space \u2014 projects like byLLM, nightjar, and Healer \u2014 was built for interpreted languages like Python. Kotlin, compiled and statically typed, hadn\u2019t really been addressed the same way.<\/span><\/p>\n<p><span>JetBrains designed KotlinLLM around three properties: it\u2019s explicit, so a reviewer can see a feature is LLM-backed just by reading the call site; it\u2019s persistent, since generated behavior gets saved as source rather than living only in a runtime session; and it\u2019s portable, meaning the generated code runs as plain Kotlin once the plugin isn\u2019t in the loop anymore.<\/span><\/p>\n<p><span>Ashley pointed to that first property as the real payoff for teams already stretched thin on review capacity. \u201cSelf-evidencing code is how teams pay down verification debt,\u201d he said. \u201cA reviewer can see the call site is model-backed and read exactly what it produced. Anyone shipping AI-generated logic into production owes reviewers that much.\u201d<\/span><\/p>\n<p><span>The team tested the approach on two projects. An adapted version of Spring Petclinic Kotlin used 18 <\/span><span>asLlm<\/span><span> call sites and completed all 24 application scenarios after the Smart macros evolved, with a 100% hot-reload success rate. Compilation and redefinition added roughly 1% runtime overhead \u2014 a small enough tax to make the approach realistic for actual use. A second test, a synthetic tool called GitHub Beginner Issue Radar, parsed real issue data across 20 repositories \u2014 more than 30,000 issues \u2014 and reached about 0.89 recall against ground-truth beginner labels.<\/span><\/p>\n<p><span>This isn\u2019t the first attempt at bringing LLMs into runtime logic. Research out of the University of Michigan on byLLM took a similar swing at the problem for Python, using a compiler that reads semantic intent from code and turns it into targeted prompts. That project has already seen over 14,000 downloads in a single month since going open source, which says something about how much appetite there is for this kind of tooling \u2014 developers want AI-generated logic they can actually own, not just call.<\/span><\/p>\n<p><span>The KotlinLLM repository is public now under the Apache License 2.0. It includes the IntelliJ plugin, the Smart macro API, and runnable example projects\u2014including the committed generated source from both test cases \u2014so anyone can see exactly what the LLM produced and run it as regular Kotlin. JetBrains also published the KotlinConf 2026 talk recording and a full technical write-up covering the design and evaluation.<\/span><\/p>\n<p><span>JetBrains is upfront that this is a research prototype, not a finished product, and they\u2019re asking for exactly the kind of feedback that stage calls for: try it on a real Kotlin\/JVM project, open issues when something breaks or behaves unexpectedly, and send pull requests with real use cases. The team specifically wants examples of where <\/span><span>asLlm<\/span><span> and <\/span><span>mockLlm<\/span><span> work well \u2014 or where they don\u2019t.<\/span><\/p>\n<p><span>For teams already experimenting with agentic AI in their development pipelines, KotlinLLM is worth watching less for what it does today and more for the pattern it\u2019s testing: LLM-generated logic that lives in your codebase like any other code, instead of behind an API call you have to trust every time.<\/span><\/p>\n<p><a href=\"https:\/\/devops.com\/jetbrains-open-sources-kotlinllm-a-research-prototype-for-runtime-code-generation\/\" target=\"_blank\" class=\"feedzy-rss-link-icon\">Read More<\/a><\/p>\n<p>\u200b<\/p>","protected":false},"excerpt":{"rendered":"<p>JetBrains has released KotlinLLM as open source, giving Kotlin\/JVM developers a research prototype that lets applications generate their own logic [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4711,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[5],"tags":[],"class_list":["post-4710","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops"],"_links":{"self":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/4710","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/comments?post=4710"}],"version-history":[{"count":0,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/4710\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/media\/4711"}],"wp:attachment":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/media?parent=4710"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/categories?post=4710"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/tags?post=4710"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}