DEV Community

Jayana  Gunaweera
Jayana Gunaweera

Posted on

🦥Lazy local helpers that tidy your folders and digest your chats

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission 🦥

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

What I Built

🦥 open-agent-sloth: lazy local helpers that do the dull jobs so you don't have to. It adds a sloth command to the open-source OpenAgent project:

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

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.

Demo

Code

GitHub logo JayanaGunaweera01 / open-agent-sloth

🦥Lazy local helpers that tidy your folders and digest your chats

🦥 open-agent-sloth

Lazy local helpers that tidy your folders and digest your chats, powered by Gemma 4 E4B on your own machine.

No cloud, no API key, no account. Just openagent sloth and a small open-weight model.


License Go Model Runs


Built for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Sloth Mode is added on top of the open-source OpenAgent project (Apache-2.0).

What it does

Command What you get
sloth tidy <folder> Sorts and renames a messy folder (Downloads, I'm looking at you). Dry run by default.
sloth undo <folder> Restores the last applied tidy.
sloth digest <file> A two-line summary of a chat export or any long text: what happened, and what needs a reply.
sloth watch <folder> Runs the tidier on a slow timer so the folder stays clean.
sloth doctor Checks that Ollama and the model are ready.

It's for anyone with a chaotic Downloads folder, a…

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

How I Built It

  • Agent harness: OpenAgent (Apache-2.0). Sloth is a new openagent sloth subcommand that runs before the heavy server startup, so it needs no database or login.
  • Open-weight model: Gemma 4 E4B (gemma4:e4b), served locally by Ollama. Set the model and server address with SLOTH_MODEL and SLOTH_OLLAMA_URL.
  • Plain Go: the Ollama client, tidy planner and digester use only the standard library, so the command starts instantly.

A few design choices make it safe to leave running:

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

Why Does Open Innovation Matter?

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:

  • Privacy by default. Your files and messages never leave your machine.
  • No key, no bill, no rate limit. A tool meant to run on a timer forever would be awkward on a metered API.
  • It works offline and keeps working if a provider changes its pricing or terms.
  • You can inspect and change all of it. Swap the model, change the categories, or audit exactly what happens to your files.

Prize Categories

  • Best Use of Gemma. Gemma 4 E4B (gemma4:e4b) runs locally through Ollama and does the file classification, renaming and chat summaries. Smaller variants such as E2B work too: set SLOTH_MODEL to switch.

Top comments (0)