<?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: Jayana  Gunaweera</title>
    <description>The latest articles on DEV Community by Jayana  Gunaweera (@jayanagunaweera01).</description>
    <link>https://dev.to/jayanagunaweera01</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%2F1147001%2F9fb7b59e-b99a-4acb-832b-925b61bc3e84.jpeg</url>
      <title>DEV Community: Jayana  Gunaweera</title>
      <link>https://dev.to/jayanagunaweera01</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jayanagunaweera01"/>
    <language>en</language>
    <item>
      <title>Hauntlog - A local ghost story generator👻</title>
      <dc:creator>Jayana  Gunaweera</dc:creator>
      <pubDate>Tue, 27 Oct 2026 04:51:09 +0000</pubDate>
      <link>https://dev.to/jayanagunaweera01/hauntlog-a-local-ghost-story-generator-19gk</link>
      <guid>https://dev.to/jayanagunaweera01/hauntlog-a-local-ghost-story-generator-19gk</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week4-2026-10-26"&gt;Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Hauntlog&lt;/strong&gt; is a local ghost story generator. You paste a night of your smart home's sensor log, and Gemma tells the ghost story hiding in it: a hallway motion sensor firing while everyone sleeps, a tap that runs for four seconds, a study that drops to 14.5 °C, a front door lock that registers an unlock attempt with no keypad entry.&lt;/p&gt;

&lt;p&gt;The haunting is in the log, so I made the log the only source of truth. Every scene has to quote a real log line, and the app shows each scene directly above the line that proves it. The sensors are the ghost in the machine, and the model is only allowed to describe what they actually recorded.&lt;/p&gt;

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

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/N7EwWpTVJPs" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;![Hauntlog home page]&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%2Fgazemcf9dou0ihj7v7yh.jpg" 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%2Fgazemcf9dou0ihj7v7yh.jpg" alt=" " width="799" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;![A story, with each scene above the log line that proves it]&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%2Faax0050ufbbw27a38i3g.jpg" 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%2Faax0050ufbbw27a38i3g.jpg" alt=" " width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run &lt;code&gt;hauntlog --demo&lt;/code&gt; to try it without a model. The demo includes one invented event (a basement piano) on purpose, so you can watch the app throw it out:&lt;/p&gt;

&lt;p&gt;![The house lied: an invented event is dropped]&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%2Fzrseuxv39o47hsfvnlo0.jpg" 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%2Fzrseuxv39o47hsfvnlo0.jpg" alt=" " width="800" height="400"&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/JayanaGunaweera01" rel="noopener noreferrer"&gt;
        JayanaGunaweera01
      &lt;/a&gt; / &lt;a href="https://github.com/JayanaGunaweera01/haunt-log" rel="noopener noreferrer"&gt;
        haunt-log
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      👻A local ghost story generator. 
    &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;Hauntlog&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;A local ghost story generator. Paste a night of your smart home's sensor log; Gemma 4 tells what happened while you slept, and every haunted moment has to point at a real log line.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Built for the Halloween "ghost story generator" prompt, on &lt;code&gt;gemma4:e4b&lt;/code&gt; via Ollama. Nothing leaves your computer.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a night: name the house, paste the sensor log (any text, one event per line, with times).&lt;/li&gt;
&lt;li&gt;Press &lt;strong&gt;Tell me what happened&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Read the story. Each scene sits above the log line that proves it, a dread meter is computed from the log, and the log is shown with the cited lines marked.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href="https://youtu.be/N7EwWpTVJPs" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8c038e9fe7b1a5ae425b8a6f2999bd031a691841e58b1f20717219bafa0028dc/68747470733a2f2f696d672e796f75747562652e636f6d2f76692f4e374577577054564a50732f6d617872657364656661756c742e6a7067" alt="Watch the demo on YouTube"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Watch the demo: &lt;a href="https://youtu.be/N7EwWpTVJPs" rel="nofollow noopener noreferrer"&gt;https://youtu.be/N7EwWpTVJPs&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Screenshots&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Add a night&lt;/th&gt;
&lt;th&gt;The story&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/JayanaGunaweera01/haunt-log/docs/home.jpg"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJayanaGunaweera01%2Fhaunt-log%2FHEAD%2Fdocs%2Fhome.jpg" alt="Add a night"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/JayanaGunaweera01/haunt-log/docs/story.jpg"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJayanaGunaweera01%2Fhaunt-log%2FHEAD%2Fdocs%2Fstory.jpg" alt="The story, each scene above its log line"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;The house lied&lt;/th&gt;
&lt;th&gt;The log with cited lines marked&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/JayanaGunaweera01/haunt-log/docs/house-lied.jpg"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJayanaGunaweera01%2Fhaunt-log%2FHEAD%2Fdocs%2Fhouse-lied.jpg" alt="An invented event dropped"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/JayanaGunaweera01/haunt-log/docs/log-marked.jpg"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJayanaGunaweera01%2Fhaunt-log%2FHEAD%2Fdocs%2Flog-marked.jpg" alt="Cited lines highlighted in the log"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;The rule it is built on: the model tells, plain Python decides&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;A smart-home log is dull. A model can make it terrifying, and can…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/JayanaGunaweera01/haunt-log" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model:&lt;/strong&gt; &lt;code&gt;gemma4:e4b&lt;/code&gt; through Ollama, using JSON-schema constrained decoding so every reply parses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;App:&lt;/strong&gt; FastAPI and Jinja2 served on &lt;code&gt;127.0.0.1&lt;/code&gt;, with a readable JSON store in &lt;code&gt;~/.hauntlog&lt;/code&gt;. Nothing leaves the laptop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Core idea:&lt;/strong&gt; the model proposes, plain Python decides:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A haunting must be in the log.&lt;/strong&gt; The model quotes a line, and code finds that quote in the log (ignoring case, punctuation and line breaks). If it isn't there, the scene is dropped and listed under &lt;strong&gt;"The house lied"&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Silence is not a haunting.&lt;/strong&gt; A quiet night is told as a quiet night.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The model never writes a time or a number.&lt;/strong&gt; Times come from the verified log line, and a scene or title containing a digit is replaced.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dread is computed, not declared.&lt;/strong&gt; The 0–5 dread meter comes from the verified lines (night hours, motion, opened doors, unknown sources), so a dramatic model can't inflate it.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Story shape:&lt;/strong&gt; one prompt asks for a title, an opening, one scene per eerie log line in order, and a morning-after ending, so the result reads as one story and not a list of captions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The cited lines are marked in the log, so you can see exactly what each scene rests on:&lt;/p&gt;

&lt;p&gt;![The log with the cited lines marked]&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%2F82p69h2v82ugczsui27g.jpg" 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%2F82p69h2v82ugczsui27g.jpg" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;A smart-home log records when you are home, asleep and away. That is not something to paste into a hosted API. With an open-weight model running locally, the whole thing works offline, the only network call is to Ollama on localhost, and it costs nothing to re-run the same night for a different story. Because the constrained decoding and the verification live in my own code, a 4B-class model is trustworthy enough for the job.&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; Gemma 4 E4B (&lt;code&gt;gemma4:e4b&lt;/code&gt;) runs locally through Ollama and writes the ghost story: a title, an opening, one scene per eerie log line, and a morning-after ending. Its output is constrained to a JSON schema, and plain Python then checks every scene against the sensor log. Smaller variants such as E2B work too: set &lt;code&gt;HAUNTLOG_MODEL&lt;/code&gt; to switch.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>🦥Lazy local helpers that tidy your folders and digest your chats</title>
      <dc:creator>Jayana  Gunaweera</dc:creator>
      <pubDate>Thu, 22 Oct 2026 16:29:01 +0000</pubDate>
      <link>https://dev.to/jayanagunaweera01/lazy-local-helpers-that-tidy-your-folders-and-digest-your-chats-65c</link>
      <guid>https://dev.to/jayanagunaweera01/lazy-local-helpers-that-tidy-your-folders-and-digest-your-chats-65c</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;&lt;strong&gt;🦥 open-agent-sloth&lt;/strong&gt;: lazy local helpers that do the dull jobs so you don't have to. It adds a &lt;code&gt;sloth&lt;/code&gt; command to the open-source &lt;a href="https://github.com/the-open-agent/openagent" rel="noopener noreferrer"&gt;OpenAgent&lt;/a&gt; project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;sloth tidy&lt;/code&gt;&lt;/strong&gt; sorts and renames a messy folder (Downloads, I'm looking at you). It's a dry run by default, and &lt;code&gt;sloth undo&lt;/code&gt; reverses the last run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;sloth digest&lt;/code&gt;&lt;/strong&gt; turns a chat export or any long text into a two-line summary: what happened, and what needs your reply.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;sloth watch&lt;/code&gt;&lt;/strong&gt; runs the tidier on a slow timer, so the folder stays clean without you remembering.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's for anyone with a chaotic Downloads folder, a group chat with 400 unread messages, or both. Everything runs on your own machine: no cloud, no account, no API key.&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%2Fxuifn6rw6vepop407ijv.png" 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%2Fxuifn6rw6vepop407ijv.png" alt=" " width="800" height="257"&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%2Fjizm4s1ggbpo7wjxq79y.png" 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%2Fjizm4s1ggbpo7wjxq79y.png" alt=" " width="800" height="216"&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%2Ftgbcc8vs7s4hlozjqja8.png" 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%2Ftgbcc8vs7s4hlozjqja8.png" alt=" " width="800" height="327"&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/JayanaGunaweera01" rel="noopener noreferrer"&gt;
        JayanaGunaweera01
      &lt;/a&gt; / &lt;a href="https://github.com/JayanaGunaweera01/open-agent-sloth" rel="noopener noreferrer"&gt;
        open-agent-sloth
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      🦥Lazy local helpers that tidy your folders and digest your chats
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;🦥 open-agent-sloth&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Lazy local helpers that tidy your folders and digest your chats, powered by Gemma 4 E4B on your own machine.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;No cloud, no API key, no account. Just &lt;code&gt;openagent sloth&lt;/code&gt; and a small open-weight model.&lt;/em&gt;&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;&lt;a href="https://github.com/JayanaGunaweera01/open-agent-sloth/./LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/216fb7040647bfffaf3e029ba6759cd0d1747489a33eb6566e070e09a554fa1b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4a6179616e6147756e61776565726130312f6f70656e2d6167656e742d736c6f74683f7374796c653d666c61742d73717561726526636f6c6f723d323263353565" alt="License"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/422405d4f5105b449cad12c05c879aab3babbf1ec8c2d12cf162c3658b7e7955/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f476f2d312e32352532422d3030414444383f7374796c653d666c61742d737175617265266c6f676f3d676f266c6f676f436f6c6f723d7768697465"&gt;&lt;img src="https://camo.githubusercontent.com/422405d4f5105b449cad12c05c879aab3babbf1ec8c2d12cf162c3658b7e7955/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f476f2d312e32352532422d3030414444383f7374796c653d666c61742d737175617265266c6f676f3d676f266c6f676f436f6c6f723d7768697465" alt="Go"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/12d4dbcce68bb2bb3300331db17d3f300eb674c27b88a57272815f52bf5d76d3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d6f64656c2d67656d6d61342533416534622d3466343665353f7374796c653d666c61742d737175617265"&gt;&lt;img src="https://camo.githubusercontent.com/12d4dbcce68bb2bb3300331db17d3f300eb674c27b88a57272815f52bf5d76d3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d6f64656c2d67656d6d61342533416534622d3466343665353f7374796c653d666c61742d737175617265" alt="Model"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/5c950bbe17eaf55bc59e86c1cf39206d3d820fbf159a8b0574c158cd1db1bafa/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72756e732d3130302532352532306c6f63616c2d3065613565393f7374796c653d666c61742d737175617265"&gt;&lt;img src="https://camo.githubusercontent.com/5c950bbe17eaf55bc59e86c1cf39206d3d820fbf159a8b0574c158cd1db1bafa/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72756e732d3130302532352532306c6f63616c2d3065613565393f7374796c653d666c61742d737175617265" alt="Runs"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;Built for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19" rel="nofollow"&gt;Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady&lt;/a&gt;
Sloth Mode is added on top of the open-source &lt;a href="https://github.com/the-open-agent/openagent" rel="noopener noreferrer"&gt;OpenAgent&lt;/a&gt; project (Apache-2.0).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;What it does&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What you get&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sloth tidy &amp;lt;folder&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sorts and renames a messy folder (Downloads, I'm looking at you). Dry run by default.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sloth undo &amp;lt;folder&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Restores the last applied tidy.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sloth digest &amp;lt;file&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A two-line summary of a chat export or any long text: what happened, and what needs a reply.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sloth watch &amp;lt;folder&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Runs the tidier on a slow timer so the folder stays clean.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sloth doctor&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Checks that Ollama and the model are ready.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;It's for anyone with a chaotic Downloads folder, a…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/JayanaGunaweera01/open-agent-sloth" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The Sloth code lives in &lt;code&gt;internal/sloth/&lt;/code&gt;, hooked into the OpenAgent CLI in &lt;code&gt;internal/cli/cli.go&lt;/code&gt;, with a usage guide in &lt;code&gt;SLOTH.md&lt;/code&gt;.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agent harness:&lt;/strong&gt; &lt;a href="https://github.com/the-open-agent/openagent" rel="noopener noreferrer"&gt;OpenAgent&lt;/a&gt; (Apache-2.0). Sloth is a new &lt;code&gt;openagent sloth&lt;/code&gt; subcommand that runs before the heavy server startup, so it needs no database or login.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open-weight model:&lt;/strong&gt; &lt;strong&gt;Gemma 4 E4B&lt;/strong&gt; (&lt;code&gt;gemma4:e4b&lt;/code&gt;), served locally by &lt;strong&gt;Ollama&lt;/strong&gt;. Set the model and server address with &lt;code&gt;SLOTH_MODEL&lt;/code&gt; and &lt;code&gt;SLOTH_OLLAMA_URL&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plain Go:&lt;/strong&gt; the Ollama client, tidy planner and digester use only the standard library, so the command starts instantly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A few design choices make it safe to leave running:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The model can't choose paths.&lt;/strong&gt; It picks from a fixed category list and proposes a file name that gets sanitised to &lt;code&gt;[A-Za-z0-9._-]&lt;/code&gt;, so a confused or hostile reply stays inside the folder.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It never overwrites a file&lt;/strong&gt; and never touches hidden files or subfolders. Every applied run is logged, which is what &lt;code&gt;undo&lt;/code&gt; reads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It works without the model.&lt;/strong&gt; If Ollama is down, tidying falls back to sorting by file type, and &lt;code&gt;--no-model&lt;/code&gt; forces that.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It suits small models.&lt;/strong&gt; Long chats are condensed chunk by chunk, so a model with a short context can still summarise a big log.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The tests need no model.&lt;/strong&gt; They use a fake Ollama server and cover hostile model output, name collisions, undo, the offline fallback and chunked digests.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;This tool reads your Downloads folder and your private chats, which are exactly the things most people won't send to a closed API. Open weights plus a local harness mean:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Privacy by default.&lt;/strong&gt; Your files and messages never leave your machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No key, no bill, no rate limit.&lt;/strong&gt; A tool meant to run on a timer forever would be awkward on a metered API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It works offline&lt;/strong&gt; and keeps working if a provider changes its pricing or terms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You can inspect and change all of it.&lt;/strong&gt; Swap the model, change the categories, or audit exactly what happens to your files.&lt;/li&gt;
&lt;/ul&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; Gemma 4 E4B (&lt;code&gt;gemma4:e4b&lt;/code&gt;) runs locally through Ollama and does the file classification, renaming and chat summaries. Smaller variants such as E2B work too: set &lt;code&gt;SLOTH_MODEL&lt;/code&gt; to switch.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>I Built a Local AI That Stops Freelancers Doing Free Work!</title>
      <dc:creator>Jayana  Gunaweera</dc:creator>
      <pubDate>Thu, 15 Oct 2026 14:43:38 +0000</pubDate>
      <link>https://dev.to/jayanagunaweera01/i-built-a-local-ai-that-stops-freelancers-doing-free-work-4eii</link>
      <guid>https://dev.to/jayanagunaweera01/i-built-a-local-ai-that-stops-freelancers-doing-free-work-4eii</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;ScopeGuard&lt;/strong&gt; is a scope-creep guard for freelancers. It reads your signed agreement and a client's message, and tells you what you're about to do for free.&lt;/p&gt;

&lt;p&gt;Every freelancer knows the message: &lt;em&gt;"Looks great! Could you also add a mobile version, and one more round on the colours?"&lt;/em&gt; Saying yes is easier than digging out the contract, so the unbilled hours pile up.&lt;/p&gt;

&lt;p&gt;You paste the client's message, and ScopeGuard splits it into separate requests and marks each one:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Covered&lt;/strong&gt;: the agreement includes it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Excluded&lt;/strong&gt;: the agreement rules it out or limits it, with the clause quoted and highlighted in your contract.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not covered&lt;/strong&gt;: nothing in the agreement mentions it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For anything billable it shows an hours range, a price at &lt;em&gt;your&lt;/em&gt; hourly rate, and a draft change order to send. You then &lt;strong&gt;quote&lt;/strong&gt; each item or &lt;strong&gt;waive it as goodwill&lt;/strong&gt;, and a ledger tracks both and exports to CSV for your invoice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who would pay for it:&lt;/strong&gt; solo designers, developers, writers and photographers who bill by the hour or by the project. One caught afternoon of unbilled work pays for a tool like this, and it costs nothing to run per message.&lt;/p&gt;

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

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/MQqcnGHszRc" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;The video walks through the demo of the created codebase.&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/JayanaGunaweera01" rel="noopener noreferrer"&gt;
        JayanaGunaweera01
      &lt;/a&gt; / &lt;a href="https://github.com/JayanaGunaweera01/scope-guard" rel="noopener noreferrer"&gt;
        scope-guard
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      I Built a Local AI That Stops Freelancers Doing Free Work!
    &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;ScopeGuard - I Built a Local AI That Stops Freelancers Doing Free Work!&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;A scope-creep guard for freelancers. It reads your signed agreement and your client's message with an open model on your own laptop, shows what you are about to do for free, and drafts the change order.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://youtu.be/MQqcnGHszRc" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJayanaGunaweera01%2Fscope-guard%2FHEAD%2Fdocs%2Fthumbnail.png" alt="Watch the demo on YouTube"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Watch the demo: &lt;a href="https://youtu.be/MQqcnGHszRc" rel="nofollow noopener noreferrer"&gt;https://youtu.be/MQqcnGHszRc&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A client writes &lt;em&gt;"great! Could you also make it work on mobile, and one more round on the colours?"&lt;/em&gt; and you say yes
because checking the contract is tedious and the ask feels small. Over a project that is hours of unbilled work
ScopeGuard checks every message in seconds.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a client: paste the agreement, set your rate and a goodwill threshold.&lt;/li&gt;
&lt;li&gt;Paste the client's message.&lt;/li&gt;
&lt;li&gt;Get, per request: &lt;strong&gt;covered&lt;/strong&gt;, &lt;strong&gt;excluded&lt;/strong&gt; (with the clause quoted and highlighted in your contract), or &lt;strong&gt;not covered&lt;/strong&gt;, with an hours range, a price, and a draft reply.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quote it&lt;/strong&gt;…&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/JayanaGunaweera01/scope-guard" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model:&lt;/strong&gt; an open-weight Gemma 4 model (&lt;code&gt;gemma4:e4b&lt;/code&gt; by default) served locally by &lt;strong&gt;Ollama&lt;/strong&gt;. The model is one environment variable, so any Ollama model that supports JSON schema output can replace it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Constrained output:&lt;/strong&gt; each call passes a JSON Schema to Ollama's &lt;code&gt;format&lt;/code&gt; option, so decoding is constrained and the reply always parses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;App:&lt;/strong&gt; a small FastAPI app bound to &lt;code&gt;127.0.0.1&lt;/code&gt;, with records in one readable JSON file. The only network call is to local Ollama.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The core idea is &lt;strong&gt;the model proposes, plain Python decides&lt;/strong&gt;. A chatbot can invent a clause or botch the maths, and either would cost a freelancer money. So &lt;code&gt;core.py&lt;/code&gt; enforces these rules, and the 14 tests cover them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A clause must be real.&lt;/strong&gt; Every "covered" or "excluded" verdict has to quote the contract, and code searches for that quote in your text, ignoring case, punctuation and line breaks. If it isn't there, the verdict is downgraded to "needs you" and the fake quote is discarded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Silence is not exclusion.&lt;/strong&gt; If no clause speaks to a request, it's shown as "not covered", never as "the contract forbids it".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The model never writes a number.&lt;/strong&gt; Hours are its estimate, shown as a range. Prices are hours × your rate, computed in code, and an opening line containing a digit is replaced.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Small asks stay human.&lt;/strong&gt; Billable requests under your goodwill threshold are flagged so you can be generous on purpose, and waiving is recorded.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The reply to the client is assembled only from verified parts.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Privacy is the product.&lt;/strong&gt; Agreements are often under NDA, and client emails contain their plans and budgets. A freelancer can't paste those into a hosted API and stay within their own contracts. With an open model on the laptop, nothing is uploaded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The economics only work at zero marginal cost.&lt;/strong&gt; The point is to check &lt;em&gt;every&lt;/em&gt; message, including the small ones where creep hides. With per-token pricing people ration usage and miss the ten-minute asks that add up. Locally it's free after the download.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A small model is enough.&lt;/strong&gt; Schema-constrained decoding plus code verification means a model in the 4B class can be trusted on this task, where a bigger unverified one could not.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No lock-in.&lt;/strong&gt; A pricing change or deprecation at a hosted vendor can't break a tool people use to get paid.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Room to specialise.&lt;/strong&gt; Clause language differs by trade (photography licences, retainers, SaaS SLAs). Open weights can be tuned on exactly that, while a general API treats every contract alike.&lt;/li&gt;
&lt;/ul&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; Gemma 4 (E4B, with E2B as a fallback) runs locally through Ollama&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>Cleanup Walk - an Android app that turns screen time into a neighborhood cleanup.</title>
      <dc:creator>Jayana  Gunaweera</dc:creator>
      <pubDate>Sat, 10 Oct 2026 16:52:39 +0000</pubDate>
      <link>https://dev.to/jayanagunaweera01/cleanup-walk-is-an-android-app-that-turns-screen-time-into-a-neighborhood-cleanup-3j59</link>
      <guid>https://dev.to/jayanagunaweera01/cleanup-walk-is-an-android-app-that-turns-screen-time-into-a-neighborhood-cleanup-3j59</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week1-2026-10-05"&gt;Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;You tap &lt;strong&gt;"30-minute cleanup"&lt;/strong&gt; (or 15, 45, 60), and the app plans a walking loop that routes you past known problem spots nearby. You pick up litter, snap photos of what you find, and at the end you get a summary like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You cleaned 1.8 km of your neighborhood and removed 14 pieces of litter.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The app's job isn't to keep you scrolling. It exists to get you out the door and hand you something useful to do once you're there.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Spots problems with the camera.&lt;/strong&gt; Take a photo and an on-device model finds litter, overflowing bins, damaged public infrastructure, and fallen branches, with a count. You confirm or correct with one tap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plans a time-boxed route.&lt;/strong&gt; Spots with damaged infrastructure and overflowing bins are weighted highest. Any spare time becomes exploration stops in a new direction, so you find new problems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Guides the walk.&lt;/strong&gt; It shows time left, distance walked, litter removed, and the direction to the next stop. A big &lt;strong&gt;+1 litter&lt;/strong&gt; button counts everything you pick up along the way.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remembers.&lt;/strong&gt; Open issues are saved so future walks route past them, and lifetime totals show on the home screen.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Who it's for:&lt;/strong&gt; anyone who wants a reason to walk and leave the block a bit better than they found it. That includes people who care about their neighborhood but never know where to start.&lt;/p&gt;

&lt;p&gt;It works fully offline. There's no account, server, API key, or Google Play Services dependency, and photos never leave the phone.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Home&lt;/th&gt;
&lt;th&gt;Walk in progress&lt;/th&gt;
&lt;th&gt;AI detection&lt;/th&gt;
&lt;th&gt;Summary&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJayanaGunaweera01%2Fclean-up-walk%2Fmain%2Fdocs%2Fscreenshots%2F01-home.png" width="720" height="1620"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJayanaGunaweera01%2Fclean-up-walk%2Fmain%2Fdocs%2Fscreenshots%2F03-walk-in-progress.png" width="720" height="1620"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJayanaGunaweera01%2Fclean-up-walk%2Fmain%2Fdocs%2Fscreenshots%2F06-ai-detected.png" width="720" height="1620"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJayanaGunaweera01%2Fclean-up-walk%2Fmain%2Fdocs%2Fscreenshots%2F08-walk-summary.png" width="720" height="1620"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&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/JayanaGunaweera01" rel="noopener noreferrer"&gt;
        JayanaGunaweera01
      &lt;/a&gt; / &lt;a href="https://github.com/JayanaGunaweera01/clean-up-walk" rel="noopener noreferrer"&gt;
        clean-up-walk
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      An Android app that turns screen time into a neighborhood cleanup.
    &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;Cleanup Walk&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;An Android app that turns screen time into a neighborhood cleanup.&lt;/p&gt;
&lt;p&gt;Pick &lt;strong&gt;"30-minute cleanup"&lt;/strong&gt;, follow a walking loop that prioritizes places with visible problems, pick up litter or report what you find, and at the end:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You cleaned 1.8 km of your neighborhood and removed 14 pieces of litter.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The app's job isn't to entertain you — it converts screen interaction into physical action.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Screenshots&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;1 · Home&lt;/th&gt;
&lt;th&gt;2 · Choose a duration&lt;/th&gt;
&lt;th&gt;3 · Walk in progress&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/JayanaGunaweera01/clean-up-walk/docs/screenshots/01-home.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJayanaGunaweera01%2Fclean-up-walk%2FHEAD%2Fdocs%2Fscreenshots%2F01-home.png" width="250" alt="Home screen"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/JayanaGunaweera01/clean-up-walk/docs/screenshots/02-choose-duration.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJayanaGunaweera01%2Fclean-up-walk%2FHEAD%2Fdocs%2Fscreenshots%2F02-choose-duration.png" width="250" alt="Choose how long to clean"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/JayanaGunaweera01/clean-up-walk/docs/screenshots/03-walk-in-progress.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJayanaGunaweera01%2Fclean-up-walk%2FHEAD%2Fdocs%2Fscreenshots%2F03-walk-in-progress.png" width="250" alt="Walk screen with timer, distance, litter count and direction to the next stop"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Start a walk or scan an issue; open issues listed below.&lt;/td&gt;
&lt;td&gt;15, 30, 45 or 60 minutes. The app gets your location and plans the loop.&lt;/td&gt;
&lt;td&gt;Time left, distance, litter count, and an arrow to the next problem spot.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;4 · At a problem spot&lt;/th&gt;
&lt;th&gt;5 · Scan&lt;/th&gt;
&lt;th&gt;6 · AI suggestion&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/JayanaGunaweera01/clean-up-walk/docs/screenshots/04-arrived-litter-count.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJayanaGunaweera01%2Fclean-up-walk%2FHEAD%2Fdocs%2Fscreenshots%2F04-arrived-litter-count.png" width="250" alt="Arrived at a litter spot, choosing how many pieces were picked up"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/JayanaGunaweera01/clean-up-walk/docs/screenshots/05-scan-camera.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJayanaGunaweera01%2Fclean-up-walk%2FHEAD%2Fdocs%2Fscreenshots%2F05-scan-camera.png" width="250" alt="Camera photo of litter"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/JayanaGunaweera01/clean-up-walk/docs/screenshots/06-ai-detected.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJayanaGunaweera01%2Fclean-up-walk%2FHEAD%2Fdocs%2Fscreenshots%2F06-ai-detected.png" width="250" alt="Detected litter x3, 91% sure"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"Done here" asks how many pieces you picked up.&lt;/td&gt;
&lt;td&gt;Take a photo; the on-device model finds the&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;…&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/JayanaGunaweera01/clean-up-walk" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


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

&lt;p&gt;&lt;strong&gt;Open-source AI: Gemma 3n E2B.&lt;/strong&gt; It's Google's open-weight multimodal model, running entirely on the phone through &lt;a href="https://github.com/google-ai-edge/LiteRT-LM" rel="noopener noreferrer"&gt;LiteRT-LM&lt;/a&gt; (Apache 2.0). Each scan sends the camera photo plus a fixed prompt, and Gemma replies in a strict, parseable format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;litter:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;overflowing_bin:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;damaged_infrastructure:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;fallen_branch:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;main:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;litter&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;confidence:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;high&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A few design decisions I'm happy with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Forgiving parsing.&lt;/strong&gt; Small models don't always follow the format perfectly. &lt;code&gt;GemmaScan.kt&lt;/code&gt; holds the prompt and a parser that copes with markdown, odd casing, and missing lines, all covered by unit tests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic output.&lt;/strong&gt; Sampling is set to &lt;code&gt;topK = 1, temperature = 0.1&lt;/code&gt;, and every scan uses a fresh conversation so photos don't influence each other.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model stays loaded.&lt;/strong&gt; The first scan loads the engine (a few seconds) and it's kept for the session. The vision encoder runs on the GPU when available and falls back to the CPU.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Swappable model.&lt;/strong&gt; The &lt;code&gt;.litertlm&lt;/code&gt; file is imported at runtime (&lt;strong&gt;⋮ → Import Gemma model&lt;/strong&gt;), so you can try Gemma 3n E4B or a fine-tune without rebuilding.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI suggests, human confirms.&lt;/strong&gt; The model's answer comes first, and one tap confirms or corrects it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The route planner&lt;/strong&gt; is plain Kotlin, not AI. Choosing spots within a time limit is an &lt;em&gt;orienteering problem&lt;/em&gt;, so the planner:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Scores each issue: &lt;code&gt;priority × (1 + ln(count)) × freshness&lt;/code&gt;, where freshness halves every 14 days.&lt;/li&gt;
&lt;li&gt;Keeps only issues reachable and returnable within the budget.&lt;/li&gt;
&lt;li&gt;Greedily inserts the best score-per-extra-second issue, improving the loop with 2-opt after each insertion.&lt;/li&gt;
&lt;li&gt;Fills leftover time with an octagonal exploration loop heading away from visited issues.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Stack:&lt;/strong&gt; Kotlin, Jetpack Compose, Room, platform &lt;code&gt;LocationManager&lt;/code&gt;, and LiteRT-LM. About 3,000 lines of Kotlin.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tests
&lt;/h3&gt;

&lt;p&gt;The core logic is pure Kotlin, so it's covered by unit tests that run in CI on every push to &lt;code&gt;main&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Route planner&lt;/strong&gt;: includes a randomized test that the estimated time never exceeds the time you chose&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemma reply parser&lt;/strong&gt;: markdown, odd casing, and missing lines&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Walk manager and distance tracking&lt;/strong&gt;: walks survive the app being closed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Domain model&lt;/strong&gt;: scoring, freshness, and issue handling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://github.com/JayanaGunaweera01/clean-up-walk/actions/runs/37635833010" rel="noopener noreferrer"&gt;Passing CI run&lt;/a&gt;: &lt;code&gt;./gradlew testDebugUnitTest assembleDebug&lt;/code&gt;, which also builds the debug APK.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./gradlew testDebugUnitTest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;A cleanup app is only useful if people actually trust it with their camera and location, and that's where open weights changed the design.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Privacy by architecture.&lt;/strong&gt; Because Gemma 3n runs on the device, photos are analyzed locally and deleted right after. There's no server to leak from and no upload policy to trust.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Works where the problems are.&lt;/strong&gt; Litter and broken bins are often in places with poor signal. A closed vision API would have made the core feature useless exactly where it's needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No keys, no bills, no accounts.&lt;/strong&gt; A free community tool can't carry per-photo API costs, and every user would need an account or key. With open weights the marginal cost of a scan is zero.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Swappable and improvable.&lt;/strong&gt; The model is just a file. Anyone can drop in a bigger Gemma, or a version fine-tuned on their own city's litter and signage, with no rebuild.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Gemma (Gemma 3n E2B running on-device via LiteRT-LM)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>gemma</category>
    </item>
    <item>
      <title>Thaththa's Memory Box - a personal AI agent that isn't allowed to make things up</title>
      <dc:creator>Jayana  Gunaweera</dc:creator>
      <pubDate>Sun, 04 Oct 2026 15:37:29 +0000</pubDate>
      <link>https://dev.to/jayanagunaweera01/thaththas-memory-box-a-personal-ai-agent-that-isnt-allowed-to-make-things-up-82d</link>
      <guid>https://dev.to/jayanagunaweera01/thaththas-memory-box-a-personal-ai-agent-that-isnt-allowed-to-make-things-up-82d</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;"Thaththa", in Sinhala language, is my father. In his cupboard there is a box of things he has kept for about 30 years: certificates,awards, medals, newspaper articles, old photographs and coins. Every one of them has a story and almost none of those stories are written down anywhere. Thaththa is the only one who can tell them.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;Thaththa's Memory Box&lt;/strong&gt;, a personal AI agent that runs on a laptop at home. You photograph a keepsake and the agent fills in a catalogue card for it: what it is, every word written on it and careful guesses about when, where, who and why. Then it asks questions and Thaththa answers them. His answers become part of the record and the agent reads every later keepsake knowing what he said.&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%2Fzmq7hacykl9mu671n90c.jpg" 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%2Fzmq7hacykl9mu671n90c.jpg" alt=" " width="800" height="694"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The moment the app exists for
&lt;/h3&gt;

&lt;p&gt;One of the first things we photographed was an old photo of Thaththa, sitting at a desk in uniform. The agent described what it could see, noting the emblem visible on his shirt and that the photo appears to be an older,possibly faded print. Then, instead of inventing his life story, it asked:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Does this photo show Thaththa at a particular time in his life?&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Is the emblem on his shirt related to his work or a group he belonged to?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Thaththa answered:"Yes. This photo was taken during my work at Samanthurei, Sri Lanka".&lt;/p&gt;

&lt;p&gt;The details turned blue, with "from Thaththa" next to them. The agent's earlier guesses moved into the card's history. And every keepsake photographed after that one was read knowing what Thaththa had said.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule: it is not allowed to invent a memory
&lt;/h2&gt;

&lt;p&gt;An AI that confidently writes "your 1998 school sports meet" when the medal says no such thing is not building a memory collection. It is writing fiction about someone's life and handing it to their grandchildren. So the whole design rests on one rule and the rule is enforced in code, not in the prompt.&lt;/p&gt;

&lt;p&gt;Every detail on a card carries where it came from, shown in three inks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Blue italic: the family told it.&lt;/strong&gt; Nothing the model does later can overwrite it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typewriter: it is written on the object.&lt;/strong&gt; The model has to transcribe every word it can see, exactly. A date or place only counts as "written on it" if the code finds it in that transcription. If Gemma says "I read 1998" but the transcription of the medal is &lt;code&gt;INTER-SCHOOL ATHLETICS 400 M&lt;/code&gt;, then 1998 stays a guess.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grey with a question mark: a guess.&lt;/strong&gt; The story may only use it with "appears to" and the card turns the
biggest gaps into questions for the family.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;grounded&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;visible_text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Is `value` actually written on the object? Years must all appear in the transcription;
    anything else must appear in it as a whole phrase.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The model proposes. Plain Python decides what counts as known. When the family corrects something, the old value is never deleted; it moves into the history with who changed it and when. And if the agent can't work out what someone meant, their words are still saved on the card exactly as they said them. Nothing a person tells it is thrown away.&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo Video
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/TQnalzTmMiE" width="710" height="399"&gt;
  &lt;/iframe&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/JayanaGunaweera01" rel="noopener noreferrer"&gt;
        JayanaGunaweera01
      &lt;/a&gt; / &lt;a href="https://github.com/JayanaGunaweera01/memory-box-agent" rel="noopener noreferrer"&gt;
        memory-box-agent
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &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;Thaththa's Memory Box&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Your personal AI agent for family memories, running at home on Gemma 4.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Built for my father, with love
&lt;a href="https://youtu.be/TQnalzTmMiE" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/f62d34a10207504991660366f2cb0d91c5122eac7a1ce68bc42f3885437dd56f/68747470733a2f2f696d672e796f75747562652e636f6d2f76692f54516e616c7a546d4d69452f687164656661756c742e6a7067" alt="Watch the demo"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;▶ &lt;strong&gt;Demo video:&lt;/strong&gt; &lt;a href="https://youtu.be/TQnalzTmMiE" rel="nofollow noopener noreferrer"&gt;https://youtu.be/TQnalzTmMiE&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/JayanaGunaweera01/memory-box-agent/docs/screenshots/keepsake.jpg"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJayanaGunaweera01%2Fmemory-box-agent%2FHEAD%2Fdocs%2Fscreenshots%2Fkeepsake.jpg" alt="A keepsake's catalogue card"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thaththa has a box of things he has kept for about 30 years: certificates, awards, medals, newspaper articles
old photographs and coins. Only he knows the stories behind them.&lt;/p&gt;
&lt;p&gt;Thaththa's Memory Box is a personal AI agent that runs on a laptop at home. Photograph a keepsake, and the agent:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;reads it&lt;/strong&gt; with Gemma 4: what it is, every word written on it, and careful guesses about when, where, who and why;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;asks&lt;/strong&gt; the family the questions that would fill the biggest gaps;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;remembers&lt;/strong&gt; what they answer, and reads every later keepsake knowing it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Nothing leaves the house: no account, no API key, no cloud. The whole archive is one folder you can copy to a USB stick.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;The rule it is built on:&lt;/h2&gt;…&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/JayanaGunaweera01/memory-box-agent" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Python, FastAPI and htmx, with Gemma 4 served locally by Ollama and 28 tests. The interesting part is &lt;code&gt;src/memorybox/memory.py&lt;/code&gt;: the provenance rules, in plain Python, that sit between the model and the card.&lt;/p&gt;

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

&lt;p&gt;I built it over the challenge weekend with Claude as a pair programmer, then tested it on Thaththa's real memory box.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gemma 4 does three jobs&lt;/strong&gt;, all through Ollama on Azure Vivobook, 16GB RAM&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Looking&lt;/strong&gt; (vision). The photo, plus everything the family has said so far, goes in. Out come the object's kind, an exact transcription of any writing, a guess with a stated reason for date, place, people and occasion and one to three questions for the family.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Writing&lt;/strong&gt; (text). Two to four sentences for the card, given every detail labelled &lt;code&gt;[family]&lt;/code&gt;, &lt;code&gt;[read]&lt;/code&gt;,&lt;code&gt;[seen]&lt;/code&gt; or &lt;code&gt;[guess]&lt;/code&gt;, with rules about how each may be used.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Understanding&lt;/strong&gt; (text). Thaththa's free-text answer becomes structured updates ("date → [year]") plus anything worth remembering beyond this object. Those become memory notes and every later photo is read against them.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Three things that mattered when running a small model locally:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ollama's native API with a JSON Schema in &lt;code&gt;format&lt;/code&gt;.&lt;/strong&gt; Ollama constrains decoding to the schema, so a small model's reply always parses. Asking for JSON in the prompt is fine for a big hosted model; on a laptop, enforcing it is the difference between working and not.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Setting &lt;code&gt;num_ctx&lt;/code&gt; explicitly.&lt;/strong&gt; Ollama's default context window silently drops the start of a long prompt and the start is where the instructions are. As the memory notes grow, the agent passes only the notes that share words with the object being read.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Thinking off (&lt;code&gt;think: false&lt;/code&gt;).&lt;/strong&gt; On a laptop the reasoning is most of the wait. Each keepsake took about 3 minutes on my laptop.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;One keepsake at a time.&lt;/strong&gt; A background worker reads the box in order, so the family can add twenty photos and keep browsing while it works. You can add the back of a photo, or the next page of a letter and every side is&lt;br&gt;
read together. After a restart it picks up where it left off.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why open innovation matters for this
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;These are the most private things a family owns.&lt;/strong&gt; Thaththa's certificates, his awards, photos of him at work.I would not upload his box to a company to be described and nobody should have to. Here the photos go from a phone to a laptop in the same house and the model that reads them is a file on that laptop. Turn off the Wi-Fi and everything still works.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A memory archive has to outlive the service it was made with.&lt;/strong&gt; An app built on an API key stops working when the key, the price or the company changes. This archive is a folder: a readable JSON file and the photos.&lt;br&gt;
"Take a copy" downloads it as one zip, with a memory book that opens in any browser. The model is open weights, so in ten years it can be run again, or swapped for a better one by editing one line.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I could put the rules around the model, not inside it.&lt;/strong&gt; Because the whole stack is open, the "never invent a memory" rule is ordinary, testable code that sits between the model and the card. With a closed API I could only have asked nicely in the prompt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It costs nothing per photo, so the whole box gets done.&lt;/strong&gt; Not just the ten best things, but the coins and the newspaper cuttings too.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where a closed model was better&lt;/strong&gt; Hosted models are faster and generally better with faded handwriting and small print; Gemma took about 3 minutes per keepsake on my laptop and on Thaththa's uniform photo it asked what the emblem was instead of recognising it. I chose local anyway: his photos and certificates stay in the house and for a memory archive a good question beats a confident guess, because Thaththa's answer is the real record.&lt;/p&gt;

&lt;h2&gt;
  
  
  Handing it over
&lt;/h2&gt;

&lt;p&gt;I sat down with Thaththa at home with the laptop and his box. The first thing he chose was an old photo of himself, sitting at a desk in uniform.&lt;/p&gt;

&lt;p&gt;The agent described what it could see, the emblem on his shirt and the faded print and then, instead of guessing his story, it asked: "Does this photo show Thaththa at a particular time in his life?"&lt;/p&gt;

&lt;p&gt;He answered it: yes and he told it when the photo was taken. His words appeared on the card in blue, marked "from Thaththa" and the agent's guesses moved into the history. Every keepsake after that was read knowing what he had said.&lt;/p&gt;

&lt;p&gt;That was the moment I knew the idea worked. The agent didn't tell him about his own life. It asked and he was the one who remembered.&lt;/p&gt;

&lt;p&gt;What didn't work: while testing, a new keepsake showed the picture from an earlier one. Gemma had read the right photo, but the browser was reusing a cached image because keepsake numbers repeat when you start a new box. I changed the caching so the browser always checks for the latest photo.&lt;/p&gt;

&lt;p&gt;What's next: the box isn't finished and that's the point. There are still certificates, medals, newspaper cuttings and coins to go through, one evening at a time, with Thaththa answering the questions only he can. When we're done, "Take a copy" will turn it into a memory book the whole family can keep, on a USB stick, with no app and no internet needed.&lt;/p&gt;

&lt;p&gt;Thirty years of keepsakes sat in a box because nobody had time to ask him about them. Now something does ask and it waits for his answer.&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; Gemma 4 (E4B, with E2B as a fallback) runs locally through Ollama and does all three
jobs: it reads keepsake photos with vision, transcribing printed text and handwriting exactly; it writes
provenance-constrained stories; and it turns the family's free-text answers into structured updates. It uses
schema-constrained output with thinking off and switching to the 26B model is one line in &lt;code&gt;config/models.toml&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>gemma</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
