Who it is forAn Android developer who wants a private, offline AI feature such as summarizing notes on the phone.
The problemCloud LLM features cost money per call, need a connection and send user data off the device.
The outcomeAn Android app that runs a language model locally, using the GPU or NPU when available.
What you need first
- uv to install the CLI with uv tool install
- Linux, macOS, Windows or Raspberry Pi for the CLI; Android, iOS or the web through the language APIs
- A LiteRT-LM model, for example from the litert-community Hugging Face repos
Steps
- Try models first in the Google AI Edge Gallery app to pick one that runs well on your target phones
- Follow the Kotlin Guide, which the README marks as stable for Android apps and JVM
- Bundle or download a LiteRT LM model such as a Gemma variant
- Use Tool Use, the function calling support, if the feature needs to trigger actions in your app
- Test on low-end devices too, since memory and speed vary widely
Prompt for your agent
Help me add google-ai-edge/LiteRT-LM to my Android app <project> using the Kotlin API. Load <model>, add a summarize(text) function that runs on device, and show how to fall back to CPU when no GPU or NPU is available.
Caveat. The README only links to the Kotlin guide, so the integration details come from Google's docs rather than this repo.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for google-ai-edge/LiteRT-LM and "Add an offline language model to an Android app"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer