The Agent Development Kit (ADK) for Kotlin is an open-source, code-first toolkit designed for building, evaluating, and deploying sophisticated AI agents. It provides developers with fine-grained control over agent behavior, orchestration, and tool usage while ensuring tight integration with the Google ecosystem, including Google Cloud and Android README.md24-28
The ADK is built on Kotlin Multiplatform (KMP), supporting both JVM and Android targets build.gradle.kts21-23 It allows developers to define agent logic directly in code, facilitating robust debugging, versioning, and deployment README.md38-39
The following diagram bridges the conceptual "Natural Language Space" (where users interact) to the "Code Entity Space" (where the ADK processes requests).
Interaction Flow and Code Mapping
Sources: README.md81-94 core/src/androidInstrumentedTest/kotlin/com/google/adk/kt/models/mlkit/GenaiPromptInstrumentedTest.kt49-74
The ADK provides a comprehensive suite of features for agent development:
| Feature | Description | Key Code Entities |
|---|---|---|
| Agent Orchestration | Support for single agents or complex hierarchies (Loop, Parallel, Sequential). | LlmAgent, LoopAgent, ParallelAgent |
| Tool Integration | Automatic schema generation and invocation of Kotlin functions as LLM tools. | @Tool, GoogleSearchTool |
| Model Flexibility | Support for various backends including Gemini, Vertex AI, and On-Device Nano. | Gemini, GenaiPrompt |
| Persistence | Abstracted services for managing conversation history and binary artifacts. | SessionService, ArtifactService |
| Extensibility | A plugin system for logging, telemetry, and human-in-the-loop flows. | Plugin, PluginManager |
The ADK is organized into several modules that separate core logic from specific integrations and transport layers.
Module Dependency Graph
Sources: build.gradle.kts38-46 core/build.gradle.kts17-21 gradle/libs.versions.toml92-97
Learn how to configure your build.gradle.kts to include the ADK dependencies for JVM or Android targets build.gradle.kts48-67 This section provides a "Hello World" agent example using the Gemini model and the InMemoryRunner README.md81-94
A deep dive into the multi-module layout. It explains how the core module provides the foundational LlmAgent and Runner abstractions core/build.gradle.kts28-33 and how specialized modules like a2a enable cross-agent communication gradle/libs.versions.toml41-44
The ADK includes a Ktor-based web server that hosts a Development UI README.md96-100 This allows you to visualize agent execution, inspect tool calls, and debug conversation flows in real-time using SSE (Server-Sent Events) core/src/androidInstrumentedTest/kotlin/com/google/adk/kt/models/mlkit/GenaiPromptInstrumentedTest.kt112-121
Sources: