Teaches AI agents to write idiomatic Kotlin (data classes, val, scope fns, Kotest) AND to make the right stack choices on JVM: Kotlin 2.3 + JDK 21 + Gradle Kotlin DSL, Ktor for HTTP, kotlinx-coroutines, DJL for ML inference, JavaCV for vision, Koog for AI agent orchestration.
95
95%
Does it follow best practices?
Impact
95%
1.23xAverage score across 10 eval scenarios
Passed
No known issues
ai.djl:api + an engine artifact)Predictor<I, O> API.subprocess.exec("python infer.py")), don't bundle a separate Python venv, don't hand-write JNI bindings.ai.djl.pytorch:pytorch-engine) — broadest model zoo coverage, default pick for HuggingFace-style modelsai.djl.onnxruntime:onnxruntime-engine) — smaller footprint, pick when your model is already exported to ONNX (vision classifiers, FER+)platform("ai.djl:bom:0.36.0")) so all DJL artifacts align on a single versionZooModel<I, O> for the process lifetime: model loading is slow, prediction is cheapmodel.newPredictor() per worker thread / coroutine — Predictor is not thread-safepredictor.close() then model.close() on shutdown (or use .use { ... })Translator<I, O> — DJL provides ImageClassificationTranslator as a starting point; copy and adapt for ViT/FER+ models~/.djl.ai/cache/. First run on a new model pulls hundreds of MB.newPredictor() once.model.newPredictor() per request — the Predictor allocation is non-trivial; pool one per worker