Gemini Nano Android agents
Builds on-device Android AI agents with ML Kit and Gemini Nano, so chat and tool calls run on the phone.
Claude's review
7/10 ML Kit GenAI agent API patterns with lifecycle rules and code, alpha SDK and some reference files missing
We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.
In detail
Builds autonomous on-device agentic workflows in Android apps using the ML Kit GenAI Agent API powered by Gemini Nano and AICore. Use this skill when implementing conversational agents, multi-turn chat with AgentSession in a ViewModel, autonomous tool calling using Android AppFunctions (@AppFunctionDeclaration and AppFunctionAgentTools.discover), ephemeral single-turn execution with runner.runSingleTurnAsync, or handling GenAiException error resilience. It solves the problem of orchestrating local reasoning loops, typed tool dispatch, and session persistence on-device with zero cloud latency and privacy preservation. Don't use for cloud-based Gemini models or Vertex AI, single-turn text generation without agent loops (suggest Prompt API), or non-Android platforms.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: mlkit-agent-api
description: Builds autonomous on-device agentic workflows in Android apps using the
ML Kit GenAI Agent API powered by Gemini Nano and AICore. Use this skill when implementing
conversational agents, multi-turn chat with AgentSession in a ViewModel, autonomous
tool calling using Android AppFunctions (@AppFunctionDeclaration and AppFunctionAgentTools.discover),
ephemeral single-turn execution with runner.runSingleTurnAsync, or handling GenAiException
error resilience. It solves the problem of orchestrating local reasoning loops,
typed tool dispatch, and session persistence on-device with zero cloud latency and
privacy preservation. Don't use for cloud-based Gemini models or Vertex AI, single-turn
text generation without agent loops (suggest Prompt API), or non-Android platforms.
license: Complete terms in LICENSE.txt
metadata:
author: Google LLC
last-updated: '2026-11-10'
keywords:
- Android
- ML Kit
- GenAI
- Agent API
- Gemini Nano
- AICore
- AppFunctions
- Tool Calling
- Function Calling
- Session Persistence
- AgentSession
---
Targeting **AICore Developer Preview**. This skill provides authoritative
execution patterns and failure-prevention rules for on-device agentic workflows
in Android apps.
*** ** * ** ***
## 1. Prerequisites and setup
### Gradle dependencies
```kotlin
...From android's repository, Apache-2.0 licence.
Related skills
-
Checked
Android Gradle Plugin upgrade
Moves Kotlin Multiplatform projects to Android Gradle Plugin 9 and fixes the build failures it causes.
8/101 credit -
Checked
CocoaPods to SwiftPM
Moves Kotlin Multiplatform projects from CocoaPods to Swift Package Manager and updates the Xcode project.
8/101 credit -
Checked
Kotlin Native build speed
Diagnoses and fixes slow Kotlin/Native iOS builds in Kotlin Multiplatform projects, both locally and on CI.
8/101 credit -
Checked
SwiftUI Liquid Glass
Adds and reviews Liquid Glass in SwiftUI apps for iOS 26, avoiding pitfalls with bars, buttons and scrolling.
8/101 credit -
Checked
Compose Multiplatform UI
Builds one shared Compose UI in Kotlin for Android, iOS and desktop, so you write your screens once.
7/101 credit -
Checked
SwiftUI Mac app rules
Writes and debugs Swift 6 and SwiftUI code for Mac apps, fixing concurrency, state and common compiler errors.
7/101 credit