Kotlin-AI-Examples

A collection of Kotlin-based examples featuring AI frameworks such as Spring AI, LangChain4j, and more — complete with Kotlin notebooks for hands-on learning.

What is Kotlin-AI-Examples?

A collection of Kotlin-based examples featuring AI frameworks such as Spring AI, LangChain4j, and more — complete with Kotlin notebooks for hands-on learning.

Overview of Kotlin-AI-Examples

What it is

Kotlin AI Examples is a repository that showcases various AI frameworks integrated into Kotlin-based projects. It contains ready-to-use examples for Spring AI, LangChain4j, and other frameworks, along with interactive Kotlin notebooks for hands-on learning.

Key features

  • Includes complete Kotlin projects demonstrating AI integrations, such as Spring AI, LangChain4j, and MCP examples.
  • Provides a collection of interactive Kotlin notebooks organized by project, covering topics like prompts, streaming, tools, structured outputs, RAG, text-to-image, text-to-audio, local models, and AI agent patterns.
  • Features a tutorial series for Spring AI with Kotlin, guiding from basic concepts to advanced integrations.
  • Contains notebooks for AI agents (prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer) and other frameworks like OpenAI, ARC, KInference, and xef.ai.
  • Each project in the projects/ directory has its own README with setup and run instructions.

Use cases

  • Learning how to integrate AI frameworks (Spring AI, LangChain4j, etc.) with Kotlin.
  • Rapid prototyping of AI-powered applications using provided examples.
  • Reference implementations for common AI patterns such as RAG, agent workflows, and multi-provider setups.
  • Hands-on experimentation with Kotlin notebooks in IntelliJ IDEA.

Getting started

bash git clone https://github.com/Kotlin/Kotlin-AI-Examples.git For projects, see each project's README in projects/ for setup and run instructions. For notebooks, open them in IntelliJ IDEA (Kotlin Notebook plugin is bundled) and open any .ipynb file.

License and pricing

The repository is licensed under Apache-2.0 and is open source.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/kotlinkotlin-ai-examples.svg)](https://yunodb.com/tools/kotlinkotlin-ai-examples?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/kotlinkotlin-ai-examples?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/kotlinkotlin-ai-examples.svg" alt="Featured on YunoDB" height="20"></a>