DEV Community

devkshitij7
devkshitij7

Posted on

Gemma Agent : WhatsApp Digest with Google Gemma

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Side Hustle.

What I Built

Overnight Gemma Agent is a private, 100% local morning briefing assistant for your WhatsApp group chats powered by Google Gemma (gemma2:2b).

The Problem

Every morning, developers, managers, and students wake up to dozens of notifications and 100+ unread messages in team channels and group chats. Reading through all of them takes 20+ minutes of cognitive load, and critical blockers or emergency server issues get buried under casual chit-chat.

Sending confidential company chats or private group conversations to third-party cloud LLM APIs poses huge privacy, compliance, and cost issues.

The Solution: Overnight Gemma Agent

Overnight Gemma Agent monitors selected WhatsApp or Telegram groups overnight while you sleep, collects conversations in a local SQLite database, and at your designated morning hour (e.g., 7:00 AM), runs Google Gemma locally to deliver an executive Strict Two-Line Digest:

  1. Line 1 (The Vibe / Core Topic): What the group talked about overnight in under 20 words.
  2. Line 2 (Action Items & Blockers): Clear, prioritized tasks, deadlines, decisions, or emergency bug fixes.

Key Features

  • πŸ”’ Zero Data Leakage / 100% Private: Your chat logs, contacts, and group messages never leave your local machine.
  • ⚑ Local Google Gemma Inference: Powered by gemma2:2b running locally via Ollama with zero API cost and ultra-low latency.
  • πŸ“± Multi-Platform Support: Seamless integration for WhatsApp (instant QR code connection via Baileys) and Telegram.
  • ⏰ Morning Scheduler: Automated delivery schedule (set your morning wake-up time).
  • πŸ§ͺ Instant Mock Seed Simulator: Test group conversations and prompt engineering instantly without waiting overnight.
  • πŸ’» Clean React + Vite Dashboard: Real-time connection status, group selector, scheduled time configuration, and interactive digest card.

Architecture & How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  WhatsApp / Adapters   β”‚ ───► β”‚  Local SQLite Message Store β”‚
β”‚   (Baileys / Bot API)  β”‚      β”‚     (overnight_chats.db)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                        β”‚
                                                        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚      Modern React Dashboard     β”‚ ◄─── β”‚      Gemma 2B Pipeline      β”‚
β”‚  (Vite + Tailwind / Responsive) β”‚      β”‚  (Ollama Local API / 11434) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Enter fullscreen mode Exit fullscreen mode

The Gemma Two-Line Extraction Prompt

In backend/src/agent/gemmaSummarizer.js, Gemma is configured with deterministic parameters (temperature: 0.2, num_predict: 90) to eliminate hallucinations and output strictly actionable morning briefings:

const prompt = `You are an overnight group chat summarizer agent.
Read the following chat transcript from the group "${groupName}" and output STRICTLY TWO LINES of plain text.
Line 1: Summarize the core discussion or vibe in under 20 words.
Line 2: List any action items, deadlines, decisions, or important links (or write "No action items." if none).
Do NOT include bullet points, bold text, labels like "Line 1:", or greetings.

Chat Transcript:
${chatTranscript}`;
Enter fullscreen mode Exit fullscreen mode

How to Run Locally

1. Prerequisites

  • Node.js v18+
  • Ollama installed with Gemma:
  ollama pull gemma2:2b
Enter fullscreen mode Exit fullscreen mode

2. Start Backend Server

cd backend
npm install
node server.js
Enter fullscreen mode Exit fullscreen mode

The backend starts on http://localhost:4000.

3. Start Frontend Dashboard

cd frontend
npm install
npm run dev
Enter fullscreen mode Exit fullscreen mode

Open http://localhost:5173 in your browser.


Why Open Innovation & Local Models Matter

Group chats are deeply personal and sensitive. Open-weight models like Google Gemma democratize on-device AI:

  • Zero API bills: Run continuous overnight cron jobs for unlimited groups at $0 marginal cost.
  • Offline Resilience: Functions even if your external internet connection drops during the night.
  • Complete Data Sovereignty: Compliance-friendly for workplace internal teams.

My Agent Session

This entire agent architecture, DevRelay connection, and verification was recorded live using Google Antigravity and DevRelay:

Overnight Gemma Agent β€” Local WhatsApp and Telegram Morning Digest with Google Gemma gemini-3.8-flash
You

We have to record this agent session by using DevRelay and Antigravity now, please guide me through it & after that we need to submit it. We are developing the Overnight Gemma Agent (an open-source, local WhatsApp and Telegram morning digest assistant powered by Google Gemma).

Agent

Ran system doctor and wired DevRelay MCP server into Antigravity. Synced all 9 DevRelay agent skills into ~/.gemini/config/skills. Inspected workspace architecture for Overnight Gemma Agent (Node.js/Express backend, Baileys WhatsApp adapter, SQLite message repository, and Gemma 2B summarization pipeline).

You

Package and record the current session right now and generate the DevRelay session link.

Agent

Compiling and sanitizing session transcript. Scrubbing local sensitive paths and credentials. Submitting normalized session transcript via DevRelay gateway to generate public interactive agent replay on DEV.

πŸ”— Interactive Session Replay: View Session on DEV

Recorded with DevRelay in Google Antigravity (Gemini 3.8 Flash)

Top comments (0)