<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: komal battan</title>
    <description>The latest articles on DEV Community by komal battan (@komal_battan).</description>
    <link>https://dev.to/komal_battan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4162252%2F7f27130a-fae0-4042-b3f9-987474cd5298.png</url>
      <title>DEV Community: komal battan</title>
      <link>https://dev.to/komal_battan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/komal_battan"/>
    <language>en</language>
    <item>
      <title>Slothdigest: An overnight morning-digest agent that run fully local</title>
      <dc:creator>komal battan</dc:creator>
      <pubDate>Mon, 26 Oct 2026 01:27:36 +0000</pubDate>
      <link>https://dev.to/komal_battan/slothdigest-an-overnight-morning-digest-agent-that-run-fully-local-3k26</link>
      <guid>https://dev.to/komal_battan/slothdigest-an-overnight-morning-digest-agent-that-run-fully-local-3k26</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19"&gt;Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Most of what's due this week is buried in group chats, notes and copied emails, between jokes and shopping lists. SlothDigest reads that pile and leaves a short morning brief: the top three priorities sorted by deadline, plus a one-line summary of each file.&lt;/p&gt;

&lt;p&gt;I drop files into an &lt;code&gt;inbox/&lt;/code&gt; folder and run one command. On my test inbox (a short email, a group chat of about 35 lines, and a notes file: 1,891 characters in total) a 1B-parameter Gemma model running on my own laptop produced three priorities in 34 seconds. Across my runs it took between 34 and 51 seconds. The files are made-up messages, so no personal data is involved.&lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Respond to vendor (by Monday), from email.txt&lt;/li&gt;
&lt;li&gt;Prepare 5 slides for the Monday review (by Monday), from notes.md&lt;/li&gt;
&lt;li&gt;Fill budget sheet by Wednesday night (by Wednesday), from groupchat.txt&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ranking is by how many days away the deadline is. I ran this on a Monday, so Monday items count as due today.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0hfwmflol1agmspmt9sj.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0hfwmflol1agmspmt9sj.jpeg" alt=" " width="799" height="169"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk18vz54xugmvakvrn67b.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk18vz54xugmvakvrn67b.jpeg" alt=" " width="799" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final Summary&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fab8yut2lomztmm8fwj3o.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fab8yut2lomztmm8fwj3o.jpeg" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/komalbattan" rel="noopener noreferrer"&gt;
        komalbattan
      &lt;/a&gt; / &lt;a href="https://github.com/komalbattan/slothdigest" rel="noopener noreferrer"&gt;
        slothdigest
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Offline AI agent that reads your notes and chats overnight and leaves a 3-priority morning brief. Built with Gemma, Mastra and MongoDB for Hacktoberfest 2026.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;slothdigest&lt;/h1&gt;

&lt;/div&gt;
&lt;p&gt;Offline AI agent that reads your notes and chats overnight and leaves a 3-priority morning brief. Built with Gemma, Mastra and MongoDB for Hacktoberfest 2026.&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/komalbattan/slothdigest" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;To run it: install Ollama, &lt;code&gt;ollama pull gemma3:1b&lt;/code&gt;, then &lt;code&gt;cd agent&lt;/code&gt;, &lt;code&gt;npm install&lt;/code&gt;, &lt;code&gt;npx tsx src/index.ts&lt;/code&gt;, and &lt;code&gt;npx tsx src/page.ts&lt;/code&gt; for the HTML view.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;It's a small Node and TypeScript script. For each file it asks Gemma 3 (1B), running locally through Ollama, for strict JSON: a one-sentence summary and a list of tasks with deadlines. Zod validates every answer. Tasks from all files are merged, de-duplicated and sorted by deadline, and the top three go into &lt;code&gt;brief.json&lt;/code&gt; and a plain HTML page.&lt;/p&gt;

&lt;p&gt;A 1B model is easy to demo and hard to trust. Here are five ways mine broke, and the boring code that handles each:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Missing field.&lt;/strong&gt; On my notes file the model returned a task without its &lt;code&gt;deadline&lt;/code&gt;. My validation rejected the whole file twice, and the fallback silently dropped two real tasks. Fix: a missing deadline becomes null, and the prompt says to always include the key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. A non-task in the task list.&lt;/strong&gt; Once the model put something that wasn't a task object into the list, and validation failed again. Fix: filter anything that isn't an object before validating, and ask for objects only.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Stuck in a loop.&lt;/strong&gt; Ollama aborted one request with a 500 error saying the token repeat limit was reached. The model had started repeating itself. Fix: one retry, then a plain-text fallback, so a brief always gets produced.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Invented deadlines.&lt;/strong&gt; For "call the electrician, no rush" the model said the deadline was today. My first fix checked whether the day word appeared anywhere in the file, and it let through "update slides (by tomorrow)" because someone in the chat says "see you all tomorrow". The fix that worked: a day word is kept only if it appears in the line of the source that matches the task, or in the task text itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Two requests merged into one.&lt;/strong&gt; An email said to send slides by Friday and to reply to the vendor before Monday. The model turned that into one wrong task, "send vendor slides by Monday". After I added a prompt rule to split requests, the last run got it right. A 1B model isn't deterministic, so I'd call this improved, not solved.&lt;/p&gt;

&lt;p&gt;What I dropped: I first tried scaffolding with Mastra, but on my slow connection the installer's 60-second limit killed it (&lt;code&gt;npm install&lt;/code&gt; took about five minutes). I called Ollama's HTTP API directly. This is a script, not a full agent framework.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Privacy.&lt;/strong&gt; My files go from disk to a model process on &lt;code&gt;localhost&lt;/code&gt;. No account, no API key, nothing uploaded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost.&lt;/strong&gt; A run costs nothing after a one-time download of under 1 GB.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline.&lt;/strong&gt; The script only talks to localhost, so after the model download it needs no internet. I haven't tested it with Wi-Fi off.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Swappable.&lt;/strong&gt; The model name is one environment variable, so I can try another open model without changing code. I haven't tested other models yet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A larger hosted model might well have skipped these bugs, and I didn't test one. But with a small open model I could see every failure and fix each one in plain code. That's what made me trust the output.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Lazy Payoff
&lt;/h2&gt;

&lt;p&gt;1,891 characters across three files became three correct, ordered tasks in 34 seconds. Limits: the summaries are weaker than the tasks (one still mentions a cat's birthday), it only understands weekday names, "today" and "tomorrow" rather than calendar dates, it reads &lt;code&gt;.txt&lt;/code&gt; and &lt;code&gt;.md&lt;/code&gt;, only the top three tasks are shown, and a 1B model still makes mistakes, so I check the brief by eye. I run it by hand; scheduling it with Windows Task Scheduler is next.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma:&lt;/strong&gt; the whole pipeline runs on Gemma 3 (1B) locally through Ollama.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;How I used AI: I built this with Claude as a pair programmer, pasting photos of my terminal errors back and fixing them one at a time. The five bugs above are real, from my own screen.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>ai</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
