←新闻详情

Google Developers Blog更新于 10月14日 20:13

Google 发布 ADK for Kotlin 1.0,面向 Kotlin 与 Android 的生产级 AI 智能体开发工具

Announcing ADK for Kotlin 1.0: Building Production-Ready AI Agents in Kotlin, Android, and Beyond - Google Developers Blog

AI 导读

Google 发布 Agent Development Kit(ADK)for Kotlin 1.0 正式版,功能与 ADK 1.0 Core 完全对齐,并面向 Android 提供端侧扩展。该版本支持层级多智能体、上下文压缩、Human-in-the-loop 确认流程、会话恢复,以及通过 @Tool 和 @Param 注解自动生成工具 schema,同时集成 Vertex AI 的会话、RAG 记忆与 Memory Bank 服务。Android 侧可用 LiteRT-LM 和 ML Kit(beta)运行端侧智能体,通过 Firebase AI Logic 编排混合云工作流,并用 Room 与 AppSearch 持久化智能体状态。

推荐理由

精选AI 评分 60

ADK for Kotlin 1.0 补齐与 Python、Java 版的核心能力对齐,并给出 Android 端侧与云端混合的落地路径。

主题

标签

正文

当前显示原文,中文全文译文尚未就绪。

Facebook; Twitter; LinkedIn; Mail

Today, we're thrilled to announce the 1.0 general availability release of the Agent Development Kit (ADK) for Kotlin! Check out the GitHub repository to dive into the code and build your first agent today, and explore the documentation.

When we introduced ADK for Kotlin 0.1.0, our mission was to bring idiomatic, lightweight, and composable AI agent development to Kotlin, Java, and Android developers. Over the past months, we've worked to evolve the framework into a production-ready toolkit.

With version 1.0, ADK for Kotlin reaches full feature parity with ADK 1.0 Core while delivering a rich suite of Android-first, on-device extensions. Whether you want to run fast, private on-device agents using LiteRT-LM and ML Kit (beta), orchestrate hybrid cloud workflows via Firebase AI Logic, or persist agent state across process restarts with Room and AppSearch, ADK for Kotlin 1.0 provides everything you need.

ADK for Kotlin is not only for Android though, as server-side Kotlin developers will be able to write idiomatic Kotlin code to create their enterprise-ready agents and smart applications.

🚀 What's new in ADK for Kotlin 1.0?

ADK for Kotlin is built around a Kotlin Multiplatform (KMP) core that remains completely agnostic to specific model backends, session providers, or memory systems. Version 1.0 combines core multi-agent orchestration capabilities for local and cloud scenarios, along with plug-and-play Android extensions for developers targeting mobile devices.

Full ADK 1.0 core parity

ADK for Kotlin 1.0 delivers complete alignment with ADK Python and Java, bringing advanced multi-agent coordination patterns to idiomatic Kotlin:

Hierarchical multi-agent systems: Chain agents and delegate tasks to specialized child agents; Context compaction & multi-turn conversations: Manage context by summarizing history to stay within token limits; Human-in-the-loop (HITL) & confirmation flows: Pause execution, request user confirmation for sensitive actions, and resume execution; Long-running & annotation-based tools: Automatically generate schemas for tools written in Kotlin using @Tool and @Param annotations; Session Resumability: Pause, serialize, and restore active agent interactions across user sessions; First-party Java interoperability: Call ADK Kotlin agents directly from existing Java applications; Enterprise Agent Platform (VertexAI) integration: VertexAiSessionService, VertexAiRagMemoryService, VertexAiMemoryBankService

⛑️ Example of a database incident response agent

Let's take ADK for Kotlin 1.0 for a spin, and build an incident triage & diagnostics agent that investigates production database alerts. Our agent will take advantage of ADK function calling and agent skill capabilities:

Tools (@Tool): Executable, type-safe capabilities (calling APIs, querying metrics, performing actions); Skills (SkillToolset): On-demand procedural knowledge and domain playbooks loaded dynamically via progressive disclosure (SKILL.md, checklists, templates)

ADK leverages KSP (Kotlin Symbol Processing) to generate function call definitions at compile time, giving you type-safe schemas, support for suspend functions, and zero runtime reflection.

You define your services using regular Kotlin data classes:

And functions annotated with @Tool and @Param:

At build time, KSP automatically creates the extension function InfrastructureDiagnosticsService().generatedTools().

Instead of hardcoding triage guidelines in code, place standard operating procedures in src/main/resources/skills/database-incident-triage/SKILL.md:

Skills can bundle auxiliary assets (e.g. assets/mitigation_rules.txt) that the model only fetches if needed, keeping token usage minimal—that’s a mechanism called progressive disclosure.

Now it’s time to equip our agent with both tools and skills in a declarative way:

With our agent ready, let’s execute it using Kotlin Coroutines and InMemoryRunner:

When the alert fires, the agent executes autonomously in a structured turn loop:

Discovers and loads the database-incident-triage skill and its safety guardrails; Invokes getServiceMetrics() → identifies 98.5% connection pool saturation; Invokes fetchRecentDeployments() → pinpoints deploy-9842 ("Add unindexed batch query..." 25 minutes ago) as the root cause; Posts an update to #production-alerts and presents a post-triage report advising an immediate rollback

📱 Android-first & on-device extensions

After this server side production agent, let’s come back to the mobile capabilities of ADK for Kotlin. Modern mobile AI requires balancing cloud reasoning power with on-device privacy, speed, and offline reliability. ADK for Kotlin 1.0 introduces modular implementations for standard Android architecture components:

💻 Android example: a financial assistant

Let's look at how ADK for Kotlin integrates into a production Android app. In the following example, we build a financial assistant powered by Gemini 3.8 Flash, via Firebase AI. It uses KSP-generated function calling to handle sensitive transactions requiring explicit user approval, while taking full advantage of first-class Android persistence services, like storing chat sessions in Room, indexed memory in AppSearch, and files directly in Android storage:

Let’s first define the bank transfer tools (requiring human confirmation):

Here’s how we configure the agent, using Gemini 3.8 Flash via Firebase AI, and configuring the tools we’ve just defined:

We configure the InMemoryRunner with the session service backed by Room, and the memory service powered by AppSearch:

Time to run the agent, with the two turns requesting the transfer and confirming the transfer via human approval:

📦 Getting started

🔗 Resources & documentation

Explore the repository, check out sample applications, and start building your multi-agent experiences:

🎬 ADK documentation and getting started: adk.dev; 📖 GitHub repository: github.com/google/adk-kotlin; 🧩 Modular architecture guide: ADK Kotlin modules documentation; 📱 On-device & cloud guide: Building Android agents with ADK; 🛠️ Feature showcase: All Kotlin examples; ☕ Java interop examples: ADK Kotlin Java sample

Whether you develop agents on the server-side on a JVM or for Android mobile devices, we can’t wait to see how you’ll take advantage of ADK for Kotlin! Star the repo, try out the samples, and share your feedback with us!

Mobile; AI; Cloud; Announcements; Solve

Bring multimodal semantic search to the edge with EmbeddingGemma 2

Optimizing a 200,000-line Python codebase overnight with Gemini 4 Argon

Gemini 4 Argon for Robotics

来源

Google Developers Blog