<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/jetbrains-open-sources-kotlinllm-a-runtime-llm-code-generator-that-saves-output-as-plain-kotlin-76vderime" -->

---
title: JetBrains open sources KotlinLLM, a runtime LLM code...
description: JetBrains Research has open sourced KotlinLLM, a research IntelliJ IDEA plugin that uses LLMs as a code generator rather than a runtime dependency. The...
canonical: https://daily.dev/posts/jetbrains-open-sources-kotlinllm-a-runtime-llm-code-generator-that-saves-output-as-plain-kotlin-76vderime
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: JetBrains open sources KotlinLLM, a runtime LLM code generator that saves output as plain Kotlin | daily.dev
og:description: JetBrains Research has open sourced KotlinLLM, a research IntelliJ IDEA plugin that uses LLMs as a code generator rather than a runtime dependency. The...
og:url: https://daily.dev/posts/jetbrains-open-sources-kotlinllm-a-runtime-llm-code-generator-that-saves-output-as-plain-kotlin-76vderime
og:image: https://api.daily.dev/og/posts/76VDeriMe.png
og:image:alt: JetBrains open sources KotlinLLM, a runtime LLM code generator that saves output as plain Kotlin
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# JetBrains open sources KotlinLLM, a runtime LLM code generator that saves output as plain Kotlin

**[Trends](https://daily.dev/sources/trends)** · 2 min read · 5 upvotes · 0 comments

## Summary

JetBrains Research has open sourced KotlinLLM, a research IntelliJ IDEA plugin that uses LLMs as a code generator rather than a runtime dependency. The concept, called 'Smart macros,' fills in function bodies with LLM-generated Kotlin source the first time a new scenario is encountered, then saves the output as plain `.kt` files. After generation, the code runs as ordinary Kotlin with no further LLM calls, eliminating per-request latency and API costs. Two APIs are included: `asLlm<F,T>()` for converting unstructured data to typed Kotlin values, and `mockLlm<T>()` for generating stateful interface implementations. Benchmarks on Spring Petclinic Kotlin showed 100% hot-reload success across 24 scenarios with ~1% overhead. The plugin is released under Apache License 2.0 and is explicitly a research prototype, not a production tool.

## Content

JetBrains Research just open-sourced KotlinLLM, and the core idea is genuinely different from how most teams are using LLMs in production today.

The pitch: instead of calling an LLM on every request (slow, expensive, non-deterministic), or hiding AI usage inside agents nobody can audit, KotlinLLM generates real Kotlin source code the first time it hits a new scenario, saves it as a normal `.kt` file, and reuses it forever after. No model at runtime. No latency hit. Just code you can read, commit, and test.

The plugin introduces two APIs. `asLlm<F,T>()` converts unstructured input into typed Kotlin values. `mockLlm<T>()` generates stateful interface implementations. Both are explicit call sites in your codebase, which means they show up in code review like any other function call. That's the point — JetBrains is betting that visibility is the thing most AI-in-production approaches get wrong.

The numbers from their Spring Petclinic Kotlin evaluation are decent: 100% hot-reload success across 24 scenarios, roughly 1% runtime overhead, and ~0.89 recall on a GitHub issue parser. Not production-hardened, but enough to show the concept isn't purely theoretical.

The honest framing here matters: JetBrains is calling this a research prototype explicitly, and they're asking for community feedback rather than claiming it's ready to ship. That's a refreshingly low-hype posture for a tool in this space.

What's interesting is the problem it's actually solving. The complaint about LLM-backed features in production usually comes down to three things: you can't review what the model decided, you can't test it reliably, and you're paying inference costs on every request. KotlinLLM takes a swing at all three by treating generated code as an artifact rather than a live call.

Whether the tradeoff — generated code that might go stale as your app evolves — is worth it depends heavily on your use case. But as a research direction, it's more interesting than another wrapper around the OpenAI API.

Available under Apache 2.0 on GitHub.

## Questions this post answers

### What is KotlinLLM and how does it avoid calling an LLM at runtime?

KotlinLLM is a JetBrains Research open-source tool that generates real Kotlin source code the first time it encounters a new scenario, saves it as a plain .kt file, and reuses that generated code afterward instead of calling a model on every request. It exposes two APIs: asLlm<F,T>() for typed conversion of unstructured input, and mockLlm<T>() for generating stateful interface implementations, both explicit and reviewable in code.

_Developers weighing whether to bake LLM calls into production code can follow research like KotlinLLM on daily.dev._

### How well did KotlinLLM perform in JetBrains' Spring Petclinic Kotlin evaluation?

KotlinLLM achieved 100% hot-reload success across 24 scenarios, roughly 1% runtime overhead, and about 0.89 recall on a GitHub issue parser task in a Spring Petclinic Kotlin evaluation. JetBrains describes these results as promising but not production-hardened, framing the project explicitly as a research prototype rather than a shipped tool.

_Teams evaluating LLM code-generation tradeoffs can track early benchmarks like this via daily.dev._

## Similar posts on daily.dev

- [adam bien's blog](https://daily.dev/posts/adam-bien-s-blog-1kfev7sch) · Jakarta EE · 0 upvotes · 0 comments

---

Tags: [#llm](https://daily.dev/tags/llm), [#devtools](https://daily.dev/tags/devtools), [#kotlin](https://daily.dev/tags/kotlin), [#jetbrains](https://daily.dev/tags/jetbrains)

[View this post on daily.dev](https://daily.dev/posts/jetbrains-open-sources-kotlinllm-a-runtime-llm-code-generator-that-saves-output-as-plain-kotlin-76vderime)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"JetBrains open sources KotlinLLM, a runtime LLM code generator that saves output as plain Kotlin","url":"https://daily.dev/posts/jetbrains-open-sources-kotlinllm-a-runtime-llm-code-generator-that-saves-output-as-plain-kotlin-76vderime","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/jetbrains-open-sources-kotlinllm-a-runtime-llm-code-generator-that-saves-output-as-plain-kotlin-76vderime"},"datePublished":"2026-07-30T23:28:57.115Z","dateModified":"2026-09-13T19:19:33.033Z","description":"JetBrains Research has open sourced KotlinLLM, a research IntelliJ IDEA plugin that uses LLMs as a code generator rather than a runtime dependency. The...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f13051ea0df7408e65450d32d6a1e3cc?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f13051ea0df7408e65450d32d6a1e3cc?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Trends","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Trends","logo":"https://media.daily.dev/image/upload/s--ZfSp3asX--/f_auto,q_auto/v1780996004/logos/trends?_a=BAMAMiWQ0","url":"https://daily.dev/sources/trends"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/jetbrains-open-sources-kotlinllm-a-runtime-llm-code-generator-that-saves-output-as-plain-kotlin-76vderime","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"llm,devtools,kotlin,jetbrains","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Trends","item":"https://daily.dev/sources/trends"},{"@type":"ListItem","position":3,"name":"JetBrains open sources KotlinLLM, a runtime LLM code generator that saves output as plain Kotlin"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/jetbrains-open-sources-kotlinllm-a-runtime-llm-code-generator-that-saves-output-as-plain-kotlin-76vderime#faq","mainEntity":[{"@type":"Question","name":"What is KotlinLLM and how does it avoid calling an LLM at runtime?","acceptedAnswer":{"@type":"Answer","text":"KotlinLLM is a JetBrains Research open-source tool that generates real Kotlin source code the first time it encounters a new scenario, saves it as a plain .kt file, and reuses that generated code afterward instead of calling a model on every request. It exposes two APIs: asLlm<F,T>() for typed conversion of unstructured input, and mockLlm<T>() for generating stateful interface implementations, both explicit and reviewable in code. Developers weighing whether to bake LLM calls into production code can follow research like KotlinLLM on daily.dev."}},{"@type":"Question","name":"How well did KotlinLLM perform in JetBrains' Spring Petclinic Kotlin evaluation?","acceptedAnswer":{"@type":"Answer","text":"KotlinLLM achieved 100% hot-reload success across 24 scenarios, roughly 1% runtime overhead, and about 0.89 recall on a GitHub issue parser task in a Spring Petclinic Kotlin evaluation. JetBrains describes these results as promising but not production-hardened, framing the project explicitly as a research prototype rather than a shipped tool. Teams evaluating LLM code-generation tradeoffs can track early benchmarks like this via daily.dev."}}]}
```

