Building AI Agents with the Kotlin Agent Development Kit (ADK)
This tutorial builds a starter "Hello World" style agent using Kotlin and the native Kotlin version of the Agent Development Kit (ADK). The full sample project is available on GitHub: xbill9 / adk-hello-world-kotlin Kotlin ADK and MCP Hello World This project is a runnable Kotlin Agent Development Kit (ADK) demo. A Kotlin LlmAgent uses Gemini to decide when to call a greet tool discovered from a local Kotlin Model Context Protocol (MCP) server. The project has two Gradle modules: agent : the Kotlin ADK agent, Gemini model configuration, MCP toolset, and interactive ReplRunner ; server : the Ktor MCP server that exposes greet . Technology Stack Kotlin: 2.3.0 Kotlin ADK SDK: com.google.adk:google-adk-kotlin-core (v0.6.0) MCP Kotlin SDK: io.modelcontextprotocol:kotlin-sdk-jvm (v0.8.1) Ktor Framework: 3.0.0 (Netty, SSE, ContentNegotiation, CORS) JDK: Java 25 Build System: Gradle 9.2.1 (Kotlin DSL) Prerequisites Java 25 A Gemini Developer API key The Gradle wrapper is included. Configure Gemini Create the local environment file: cp .env.example .env Set GOOGLE_API_KEY in .env , then load it: source ./set_env.sh The file is ignored by Git. Run the Demo Start the Kotlin MCP server in one… View on GitHub What Is Kotlin? Kotlin is a modern, statically typed programming language created by JetBrains. It runs on the Java Virtual Machine (JVM), works alongside existing Java libraries, and is widely used for Android, backend, and multiplatform development. Static typing is especially useful when building agents. Agent configuration, tool schemas, and tool results can all be checked by the compiler before a prompt reaches the model. Installing Java This sample uses Java 25 . If Java is not installed, SDKMAN! is a convenient way to install and switch between JDK versions on Linux and macOS: Home | SDKMAN! the Software Development Kit Manager SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems. sdkman.io After installing