cd /news/ai-agents/sloth-digest-a-local-gemma-3-agent-t… Β· home β€Ί topics β€Ί ai-agents β€Ί article
[ARTICLE Β· art-153546] src=dev.to β†— pub= topic=ai-agents verified=true sentiment=↑ positive

Sloth Digest πŸ¦₯ β€” a local Gemma 3 agent that does my inbox triage so I don't have to

A developer built Sloth Digest, a local email-triage agent that runs Gemma 3 4B IT (QAT-quantized) on llama.cpp over plain CPU to sort unread Gmail into urgency buckets and produce a morning markdown digest. The roughly 200-line Python stdlib pipeline uses a strict three-line CATEGORY/SUMMARY/ACTION verdict at temperature 0, fetches mail read-only via the Gmail API, and processes six sample emails in about 14 seconds without any cloud API. The developer says nothing leaves the machine: "Pull the network cable and it still works.

by read3 min views28 publishedOct 20, 2026

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

Sloth Digest is a local AI agent that reads my unread Gmail overnight and hands me a morning digest, so I never have to open a cold inbox again.

Every email gets triaged by an open-weight model running entirely on my own machine (Gemma 3 4B IT, QAT-quantized, served by llama.cpp on plain CPU) into three buckets:

Who gets to be lazier? Me, every single morning. Instead of 15–30 minutes of scanning subject lines and context-switching, I read one short markdown page and only touch the 3–4 emails that actually need a human.

Here's real output from the bundled sample inbox:


## ⚑ Needs you (4)
- **Energia Lux** β€” Your October invoice β€” €84.12 due Oct 27
  Electricity bill of €84.12 is due soon.
  β†’ Pay the invoice before October 27th.
- **Marco Silva** β€” Re: Thursday moved to 15:00?
  Plumber availability needs confirmation for Thursday.
  β†’ Confirm 15:00 or propose an alternative time.
...

## 😴 Skip safely (1)
- **ShopMega** β€” πŸ”₯ 70% OFF ends tonight β€” don't miss out!
  Promotional email about a limited-time sale.

6 emails triaged locally in 14s (~12 min of manual triage saved).
Nothing left this machine.

Live demo: https://friend-crops-sharp-episode.trycloudflare.com

It shows the sample inbox (6 fake emails β€” bills, a friend asking for a confirmation, a flash sale, a delivery notice, a medical appointment reminder) and runs the triage live on the local Gemma model when you hit the button. ~14 seconds on CPU, no cloud API involved anywhere.

You can reproduce the whole thing offline:

./llama-server -m gemma-3-4b-it-qat-Q4_0.gguf --port 8801
python sloth_digest.py --demo   # sample inbox, zero credentials needed

A local AI agent that reads your unread Gmail overnight and hands you a morning digest β€” so you don't have to.

Every email is triaged into three buckets by an open-weight model running entirely on your own machine (Gemma 3 4B IT QAT via llama.cpp):

No email content ever leaves your computer. Works offline. Costs nothing per run β€” set it up once and forget it.

Your inbox is the most private dataset you own. A closed API means sending every message β€” invoices, medical appointments, personal threads β€” to someone else's servers. Sloth Digest runs the whole pipeline against a local OpenAI-compatible endpoint, so the "open" piece is the product:

The agent is ~200 lines of Python stdlib. The only dependencies are llama.cpp (for inference) and, for the optional web UI, FastAPI.

The architecture is deliberately boring β€” a sloth would approve:

unread Gmail ──► fetch (Gmail API, strictly read-only)
                   β”‚
                   β–Ό
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚ Gemma 3 4B IT (QAT) β”‚  per email: CATEGORY / SUMMARY / ACTION
        β”‚ llama.cpp, CPU      β”‚  strict 3-line verdict, temperature 0
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
                   β–Ό
        morning digest (markdown, grouped by urgency)

Three design choices make a small 4B model reliable enough to trust with triage:

CATEGORY / SUMMARY / ACTION) at temperature 0. No essays, no JSON to break. Local inference is not a gimmick here, it's the point: the whole pipeline β€” fetch, classify, summarize β€” runs against llama.cpp's OpenAI-compatible endpoint on 127.0.0.1. Pull the network cable and it still works.

Your inbox is probably the most private dataset you own: invoices, medical appointments, family threads, business negotiations. Triage means reading all of it β€” and with a closed API, "reading" means shipping every message to someone else's servers, on someone else's terms, under a privacy policy that can change.

Because Gemma's weights are open and llama.cpp is open source, the equation flips:

I ran it on my real unread inbox this morning: 8 emails triaged in ~20 seconds, and the digest correctly separated two things I genuinely needed to act on from the newsletter noise. Manual triage averages ~2 minutes per email once you include the context-switching β€” so the agent saves me roughly 15 minutes a day, ~90 hours a year, for a one-time setup cost and €0 in API fees.

The cron job runs at 7am. I wake up, read one page, and go back to being lazy. The sloth wins. πŸ¦₯

── more in #ai-agents 4 stories Β· sorted by recency
── more on @gemma 3 4b it 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/sloth-digest-a-local…] indexed:0 read:3min 2026-10-20 Β· β€”