Skip to content
CAI
Software that uses CAICheck a score

google-ai-edge/gallery

46.6

Weak · 22 September 2026

55.7k

lines of production code

Kotlin

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an Android application designed to run and test AI models directly on-device using the Google AI Edge Gallery framework. It provides a unified runtime for orchestrating LLM sessions, managing chat history, and handling multimedia inputs. The app supports a modular skill architecture that extends on-device capabilities through pre-built tools for tasks like mood tracking, text hashing, and media generation.

Features

The Android application is introduced as a new entry point for the Google AI Edge Gallery, allowing users to run and test AI models directly on their devices. The initial build includes a set of built-in agent skills—such as calculating text hashes, creating calendar events, tracking moods, and daily learning companions—alongside the necessary Android permissions and services (including Firebase Analytics and FCM) to support these features.

Android · high confidence

Introduces Agent Runtime Executor and LLM Session Manager

The app now features a new Agent Runtime Executor and LLM Session Manager to orchestrate AI agent conversations. This change introduces a unified execution loop that handles context assembly, inference turns, and event streaming, while the session manager coordinates session lifecycle, chat history persistence, and model configuration. Users benefit from improved session management, including the ability to create, load, reset, and delete chat sessions, as well as support for multimedia attachments (images and audio) and tool execution within the agent loop.

app · high confidence

Users now have access to a set of pre-configured Agent Skills that extend the on-device LLM's capabilities. The \skills/built-in\ directory adds several functional tools: a text-only roleplay skill (\kitchen-adventure\), and JavaScript-based skills for calculating text hashes, displaying interactive maps, tracking mood with local storage and charts, generating QR codes, querying Wikipedia summaries, spinning text on a webcam feed, and sending emails via native intents. Additionally, a featured \mood-music\ skill is included, which generates music via the Loudly API based on user mood or media analysis. A comprehensive \README.md\ documents the skill architecture, including the \SKILL.md\ metadata format, JavaScript execution via hidden webviews, and instructions for adding, importing, and sharing skills.

skills · high confidence

Dependencies

The AI Edge Gallery Android application is initialized with a new build structure, setting the package namespace to com.google.ai.edge.gallery and targeting Android SDK 37 (version 1.0.20, code 44). The project adopts Kotlin 2.2.21, AGP 9.0.1, and a modern dependency graph including Hilt for dependency injection, Jetpack Compose, and Firebase services (Analytics, Messaging). It integrates the LiteRT-LM Android SDK (0.11.0) for local LLM inference, ML Kit GenAI for prompt handling, and the Model Context Protocol (MCP) Kotlin SDK for tool use, alongside CameraX, TFLite, and Ktor for networking.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 43 → 47 (+3.9)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 70 → 80 (+10.2)
  • Architecture 98 → 94 (-3.8)
  • Maturity 52 → 56 (+3.8)
  • Readiness 35 → 44 (+8.6)
  • Security 45 → 70 (+26.0)
  • Accessibility 43 → 36 (-7.2)

Resolved (69)

  • AgentToolsImpl.runJs (cognitive 18) (Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AgentTools.kt)
  • BenchmarkResultsViewerKt.BenchmarkResultsViewer (cognitive 68) (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/benchmark/BenchmarkResultsViewer.kt)
  • BenchmarkResultsViewerKt.BenchmarkResultsViewer (cyclomatic 30) (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/benchmark/BenchmarkResultsViewer.kt)
  • BenchmarkValueSeriesViewerKt.BenchmarkValueSeriesViewer (cognitive 21) (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/benchmark/BenchmarkValueSeriesViewer.kt)
  • Change coupling: LlmChatModelHelper.kt ↔ LlmChatTaskModule.kt (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatModelHelper.kt)
  • Dependency hygiene not measured — no supported dependency manifest was read
  • Duplicated block (10 lines × 2) (Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt)
  • Duplicated block (10 lines × 2) (Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt)
  • Duplicated block (10 lines × 2) (Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/tinygarden/ConversationHistoryPanel.kt)
  • Duplicated block (10 lines × 2) (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/ConfigDialog.kt)
  • Duplicated block (10 lines × 2) (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/Utils.kt)
  • Duplicated block (10 lines × 2) (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmsingleturn/PromptTemplatesPanel.kt)
  • Duplicated block (11 lines × 2) (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/SmallFilledTonalButton.kt)
  • Duplicated block (12 lines × 2) (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatView.kt)
  • Duplicated block (13 lines × 2) (Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/mobileactions/MobileActionsScreen.kt)
  • Duplicated block (13 lines × 2) (Android/src/app/src/main/java/com/google/ai/edge/gallery/data/Config.kt)
  • Duplicated block (13 lines × 2) (Android/src/app/src/main/java/com/google/ai/edge/gallery/data/DownloadRepository.kt)
  • Duplicated block (13 lines × 3) (Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddMcpServerFromUrlDialog.kt)
  • Duplicated block (13 lines × 3) (Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddSkillFromFeaturedListBottomSheet.kt)
  • Duplicated block (13 lines × 3) (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatTaskModule.kt)
  • …and 49 more

New (158)

  • Change coupling: AgentChatScreen.kt ↔ AgentChatTaskModule.kt (Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AgentChatScreen.kt)
  • Change coupling: ChatPanel.kt ↔ MessageBodyText.kt (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatPanel.kt)
  • Change coupling: ChatPanel.kt ↔ Theme.kt (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatPanel.kt)
  • Change coupling: Consts.kt ↔ Model.kt (Android/src/app/src/main/java/com/google/ai/edge/gallery/data/Consts.kt)
  • Change coupling: Consts.kt ↔ ModelManagerViewModel.kt (Android/src/app/src/main/java/com/google/ai/edge/gallery/data/Consts.kt)
  • Change coupling: LlmChatModelHelper.kt ↔ LlmSingleTurnViewModel.kt (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatModelHelper.kt)
  • Change coupling: MessageBodyText.kt ↔ MessageInputText.kt (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/MessageBodyText.kt)
  • Change coupling: ModelImportDialog.kt ↔ ModelManagerViewModel.kt (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/ModelImportDialog.kt)
  • ChatMessageMapper.serializeMessage (cognitive 16) (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatMessageMapper.kt)
  • ClassTooLong: ModelManagerViewModel (Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/ModelManagerViewModel.kt)
  • ClassTooLong: ScrapbookViewModel (Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/scrapbook/ScrapbookViewModel.kt)
  • ClassTooLong: SkillManager (Android/src/app/src/main/java/com/google/ai/edge/gallery/skills/SkillManager.kt)
  • CollageEditorKt.CollageEditor (cognitive 84) (Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/scrapbook/CollageEditor.kt)
  • CollageEditorKt.CollageEditor (cyclomatic 25) (Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/scrapbook/CollageEditor.kt)
  • CutoutEditorKt.CutoutEditor (cognitive 68) (Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/scrapbook/CutoutEditor.kt)
  • CutoutEditorKt.CutoutEditor (cyclomatic 32) (Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/scrapbook/CutoutEditor.kt)
  • CutoutManagerKt.CutoutManager (cognitive 31) (Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/scrapbook/CutoutManager.kt)
  • DefaultDownloadRepository.observerWorkerProgress (cognitive 28) (Android/src/app/src/main/java/com/google/ai/edge/gallery/data/DownloadRepository.kt)
  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no usage examples (skills/README.md)
  • …and 138 more

Changes since last survey

  • 87 commits — 83 feature/other, 4 fixes

By area

  • Android/src — 84 commits
  • (repo) — 1 commit
  • model_allowlists/1_0_18.json — 1 commit
  • model_allowlists/1_0_19.json — 1 commit

Notable commits

  • fix: Fix Android NPU embedding models by setting vision and audio delegates.
  • fix: Fix model download failure notification content string in Android app.
  • fix: Fix stale model initialization race condition when navigating to custom tasks.
  • fix: Revert AI Edge Gallery Android app version to 1.0.18
  • change: - Replace custom getter on ChatViewModel.currentSessionId that delegated to runtimeExecutor.activeSessionId with a standard mutable property. - Ensure restored historical session IDs take precedence over stale active session IDs. - Prevent duplicate chat history entries when continuing reopened chats and prevent consecutive Agent Skills from overwriting existing history entries. - Add unit tests in LlmChatViewModelTest verifying session ID persistence across resetSession with clearHistory true and false.
  • change: Add 1.0.18 allowlist
  • change: Add Scrapbook custom task.
  • change: Add a logButtonClick helper for Firebase button click analytics.
  • change: Add metrics tracker to LlmModelHelper class to track inference metrics.
  • change: Add model allowlist for 1.0.19
  • change: Add reusable multi-step OnboardingDialog component with persistent DataStore state.
  • change: Add support for extra data files in the Android model allowlist. This change introduces the ModelDataFile data class to represent supplementary files that need to be downloaded alongside a main model.
  • change: Add support for inference metrics tracking.
  • change: Add turn_index and session_id to inference metrics proto and tracker.
  • change: Automatically reset chat session with previous history when resuming after interruption
  • change: Bump Gradle to 9.7.1.
  • change: Disable learn-something-new skill by default on non-Gemma4-E4B models.
  • change: Display NPU and TPU model variants before other variants in ModelItem.
  • change: Expose LiteRT-LM model capabilities in Kotlin and migrate AI Edge Gallery callers to ModelInfo.from.
  • change: Extract BackendSpec and ModelHierarchy from Model.kt into their own components
  • …and 67 more

Architecture

  • Containers 0 added · 0 removed · contexts 1 added · 1 removed · edges 0 added · 0 removed

Added bounded contexts (1)

  • app

Removed bounded contexts (1)

  • src

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

google-ai-edge/gallery was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 22 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 6353707057ccc524a6e513e73f0d6d5886f348a8 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-821afab8930d.