Your First AI Agent in Kotlin

Get started with Koog today!

View at original site


Learn how to build your first AI agent in Kotlin using Koog, JetBrains’ framework for working with LLMs. 🚀

We’ll start from scratch—setting up dependencies, creating an LLM client, and sending prompts to models. You’ll see how to handle responses, translate text, and even connect your agent to the real world by calling tools. Step by step, we’ll implement a money transfer example, showing how to define tools, register them, and let the agent use them dynamically.

You’ll also learn how Koog simplifies working with multiple models, handles conversation history, and manages tool calls automatically.

By the end, you’ll understand what makes an AI agent tick: an LLM acting as the “brain” plus tools it can call in a loop.

This demo is just the beginning—Koog gives you the flexibility to scale from prototypes to production-ready AI agents.

Related Resources

Exposed inline value classes for Java
Exposed inline value classes for Java
Use value classes from Java code with Kotlin 2.2
Nested type aliases in Kotlin 2.2
Nested type aliases in Kotlin 2.2
Use type aliases inside other structures
Context-sensitive resolution in Kotlin 2.2
Context-sensitive resolution in Kotlin 2.2
Write the same code with fewer qualifiers