# Building On-Device AI Agents on Android with Google ADK -- Part 1: The Engine & Architecture

DevFeed: [Building On-Device AI Agents on Android with Google ADK -- Part 1: The Engine & Architecture](<https://devfeed.tech/articles/building-on-device-ai-agents-on-android-with-google-adk-part-1-the-engine-architecture-61527.md>)

Original publisher: [Read original article](<https://medium.com/google-developer-experts/building-on-device-ai-agents-on-android-with-google-adk-part-1-the-engine-architecture-bf5639a2f439?source=rss----a67bd6fa7d58---4>)

Author: Pankaj Rai

Published: 2026-09-29T01:50:28Z

Content type: tutorial

Language: en

Sources: [Google Developer Experts](<https://devfeed.tech/sources/google-developer-experts-medium.md>)

Topics: [google-adk](<https://devfeed.tech/topics/google-adk.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [gemma](<https://devfeed.tech/topics/gemma.md>), [Local AI](<https://devfeed.tech/topics/local-ai.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [artificial-intelligence](<https://devfeed.tech/tags/artificial-intelligence.md>), [gemma](<https://devfeed.tech/tags/gemma.md>), [google-adk](<https://devfeed.tech/tags/google-adk.md>), [litert](<https://devfeed.tech/tags/litert.md>), [llms](<https://devfeed.tech/tags/llms.md>), [on-device-ai](<https://devfeed.tech/tags/on-device-ai.md>)

## AI overview

This introductory tutorial explains how to build on-device AI agents for Android using Google ADK, LiteRT-LM, and local Gemma models. It covers offline operation, privacy and latency considerations, agent tool use, model packaging, and the initial setup for running an agent turn.

## Source excerpt

Run local Gemma models offline, configure LiteRT-LM, navigate APK packaging traps and establish the foundational primitives of Google's Agent Development Kit. 1. The Shift from Simple Chatbots to Autonomous Agents For the past two years, mobile AI in Android apps has largely meant one pattern: taking user text, wrapping it into a network request, firing it to an expensive cloud API and rendering a markdown stream. While cloud LLMs offer vast knowledge, mobile apps have different requirements: Privacy & Compliance: Sensitive user data (health logs, private notes, device contacts) should never leave the phone. Offline Reliability: Airplane mode, subways, or poor cellular reception shouldn't break app functionality. Deterministic Latency: Skipping network hops eliminates DNS lookups, TLS handshakes and server queuing. Action over Conversation: Users do not just want an AI that talks; they want an AI that acts -- inspecting device battery levels, querying local Room SQLite databases, setting alarms and scheduling tasks. This is where Agents differ from simple LLM wrappers. An Agent is an autonomous system driven by a language model that operates in a loop: it receives a goal, reasons about what to do, inspects available Tools, invokes functions with structured JSON parameters, observes the output and iteratively works until the task is complete. Google introduced the Agent Development Kit (ADK) for Kotlin and Android (google/adk-kotlin). Combined with LiteRT-LM and Google's open-weight Gemma family, we can now build full-fledged, multi-turn, tool-calling agents running entirely on a physical Android device with zero cloud dependencies. In this introductory article, we will build the foundation: configuring the build system, extracting multi-gigabyte models without crashing the Android packager, initializing LiteRT-LM, and executing your first agent turn. 2. The Core Primitives of Google ADK Unlike generic prompting libraries, Google ADK provides an opinionated, productio