{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "google-ai-edge-litert-lm--add-an-offline-llm-to-an-android-app",
 "repo": "google-ai-edge/LiteRT-LM",
 "repo_url": "https://github.com/google-ai-edge/LiteRT-LM",
 "repo_slug": "google-ai-edge-litert-lm",
 "title": "Add an offline language model to an Android app",
 "page_title": "How to add an offline language model to an Android app with LiteRT LM",
 "summary": "Use the stable Kotlin API to run Gemma inside your Android app with no server.",
 "who": "An Android developer who wants a private, offline AI feature such as summarizing notes on the phone.",
 "problem": "Cloud LLM features cost money per call, need a connection and send user data off the device.",
 "outcome": "An Android app that runs a language model locally, using the GPU or NPU when available.",
 "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"
 ],
 "agent_prompt": "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.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Advanced",
 "time": "half a day",
 "basis": "readme",
 "caveat": "The README only links to the Kotlin guide, so the integration details come from Google's docs rather than this repo.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "c++",
 "requirements": [
  "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/google-ai-edge-litert-lm/add-an-offline-llm-to-an-android-app/",
 "md": "https://dedupedai.com/use-cases/google-ai-edge-litert-lm/add-an-offline-llm-to-an-android-app/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/google-ai-edge-litert-lm--add-an-offline-llm-to-an-android-app.json",
 "api_version": "v1"
}
