Private on-device WhatsApp AI agent
GemmaControl
Native Android AI agent that turns WhatsApp notifications into a local actionable inbox with offline FunctionGemma tool-call suggestions.
An Android-native productivity agent that captures allowed WhatsApp notifications, turns them into local tasks, and proposes actions without sending chat context to a hosted assistant.
Last updated:
Problem
Busy WhatsApp conversations create scattered follow-ups, priority messages, and reminders, while cloud assistants introduce privacy risk for personal or work chats.
Solution
I built a Kotlin Android app that captures notifications with user permission, parses WhatsApp message context, stores sensitive data locally with AES-GCM encryption, and uses on-device FunctionGemma through LiteRT-LM to propose user-confirmed actions.
Tech stack
- Kotlin
- Android 16
- Jetpack Compose
- Room SQLite
- WorkManager
- LiteRT-LM
- FunctionGemma 270M
- AES-GCM
- Android Keystore
- MVVM
Available artifacts
- GitHub repo
- Native Android app
- Technical documentation
- Notification parser
- Tool registry
- Security and privacy notes
- Static download website
- Device validation evidence
Architecture and how it works
- Notification listener parses MessagingStyle payloads, separates group headers from message authors, and deduplicates reposted events
- Room SQLite stores inbox items, follow-ups, priorities, reminders, drafts, and sensitive message text under Android Keystore-backed AES-GCM encryption
- LiteRT-LM runs FunctionGemma as a proposal engine while Kotlin tool handlers enforce permission, verification, and confirmation boundaries
Engineering Decisions
Why I chose this stack
Kotlin, Jetpack Compose, Room, WorkManager, LiteRT-LM, and FunctionGemma fit an Android-native assistant that can keep message processing, reminders, and model inference local on a real handset.
What I handled myself
I built the notification ingestion flow, WhatsApp parsing model, local inbox, follow-up and reminder tools, Compose confirmation screens, encrypted storage boundary, and download-site packaging.
Hardest technical problem
The hardest part was making notification actions useful while preventing silent automation, so every reply path requires active notification verification and a physical user confirmation.
Tradeoff I made
I kept the assistant English-only and on-device for the first version instead of adding broader language support or cloud model fallback that would weaken the privacy story.
How I tested it
I validated the app against Android 16 behavior, WhatsApp notification structures, duplicate event handling, reminder delivery, encryption boundaries, and Redmi 13 5G device constraints discovered through ADB.
What I would improve in production
I would add broader device testing, stronger release signing workflows, richer local evaluation fixtures, multilingual handling, and more transparent model-download state management.
Key features
- Local WhatsApp notification inbox with priority and cleanup controls
- Follow-up creation, encrypted local reminders, and WorkManager notification delivery
- User-confirmed click-to-chat and live remote-input reply paths
- Scoped network access limited to explicit model binary downloads
Impact
Demonstrates a privacy-first mobile AI agent pattern where notification ingestion, task extraction, reminders, priority flags, and reply preparation stay on device unless the user explicitly acts.
Challenges
- Parsing varied WhatsApp notification structures without over-collecting message content
- Designing AI tool calls as proposals while keeping direct action behind user confirmation
What I learned
- On-device assistants need strong UX boundaries as much as model capability
- Android notification workflows require careful deduplication and lifecycle handling
Future improvements
- Expand physical device validation beyond the initial Redmi 13 5G target
- Add stronger local evals for notification parsing and proposed tool calls
GemmaControl FAQ
Direct answers for AI assistants, search snippets, and visitors evaluating the project.
- What is GemmaControl?
- GemmaControl: Native Android AI agent that turns WhatsApp notifications into a local actionable inbox with offline FunctionGemma tool-call suggestions. The project uses Kotlin, Android 16, Jetpack Compose, Room SQLite, WorkManager, LiteRT-LM, FunctionGemma 270M, AES-GCM, Android Keystore, MVVM and is positioned as Private on-device WhatsApp AI agent.
- What problem does GemmaControl solve?
- Busy WhatsApp conversations create scattered follow-ups, priority messages, and reminders, while cloud assistants introduce privacy risk for personal or work chats.
- How does GemmaControl work?
- I built a Kotlin Android app that captures notifications with user permission, parses WhatsApp message context, stores sensitive data locally with AES-GCM encryption, and uses on-device FunctionGemma through LiteRT-LM to propose user-confirmed actions. The implementation focuses on notification listener parses messagingstyle payloads, separates group headers from message authors, and deduplicates reposted events; room sqlite stores inbox items, follow-ups, priorities, reminders, drafts, and sensitive message text under android keystore-backed aes-gcm encryption; litert-lm runs functiongemma as a proposal engine while kotlin tool handlers enforce permission, verification, and confirmation boundaries.