The Lazy Payoff
Let's be honest: nobody actually organizes their Downloads folder. Between juggling tech projects, running community events, and everyday life, dragging and dropping files into neat little subfolders is the ultimate chore. So, for the Slow and Steady challenge, I decided to channel my inner sloth and build something that does the work for me, forever.
Meet SlothSort.
It’s a local AI agent that periodically scans your chaotic, cluttered folders, reads filenames, and automatically routes them into structured directories (like /Finances, /Code, /Images, or /Trash). You literally just click a big black button, lean back, and watch your digital mess vanish. No drag-and-drop, no thinking, pure laziness rewarded.
Demo
How I Built It
I wanted the UI to be zero-friction. I built the frontend using Next.js and Tailwind CSS, heavily inspired by Mainstack's minimalist, stark black-and-white aesthetic. Soft rounded corners, bold typography, and a single call-to-action: "Do The Work For Me."
Behind the sleek UI, the backend is where the magic happens:
- Local File System: A Node.js API reads the designated messy folder.
- The Agent Brain: I used Mastra to orchestrate the AI logic. The agent is fed the filename and instructed to return exactly one destination category.
-
Local Execution: The agent calls a local instance of Gemma 2B running via Ollama to make the sorting decision, then uses Node's
fsto physically move the files.
Why Open Innovation Matters Here
This project simply could not exist securely using closed-source AI.
Our download folders are filled with highly sensitive data: bank statements, tax returns, SSH keys, unreleased code, and personal photos. Sending file names like 2026_Bank_Statement_Final.pdf to a proprietary third-party API is a massive privacy risk.
By building this with open-weight models running locally, the data never leaves my machine. Open innovation means my automation works flawlessly without an internet connection, keeps my personal files entirely on my own hardware, and costs exactly $0 in API fees to run forever. It’s the ultimate set-it-and-forget-it solution.
Partner Technologies Used
- Best Use of Gemma: The core decision engine of SlothSort is powered by Google's Gemma (2B). Running Gemma locally via Ollama meant I got lightning-fast inference on my laptop without sacrificing my privacy. The 2B model is remarkably good at contextualizing file names (e.g., knowing
Q3_Invoice.pdfgoes to Finances) with very little overhead. - Best Use of Mastra: I used Mastra as the agent framework to orchestrate the workflow between the local file system and the local Gemma model, keeping the agent logic clean and scalable.
- Best Use of Sentry Agent Tracing: I integrated Sentry into the Next.js API routes to trace the agent's execution. By wrapping the Mastra/Gemma calls in custom Sentry spans (
gemma-local-inference), I could monitor exactly how much latency the local LLM added to the file-sorting process and track execution times directly from the Sentry dashboard.
Conclusion
Happy International Sloth Day! Build smart, run local, and let the agents do the heavy lifting while you take a nap.
Check out the repo here: SlothSort GitHub Repository

Top comments (0)