I Built slothd: A Local-First, Offline-Capable AI Daemon That Patiently Organizes Your Messy Workspace
Description and use
A developer built slothd, a local‑first AI daemon that automatically organizes files in a workspace without internet access, leveraging Gemma 3 and TabPFN models and an SQLite WAL log for reversible actions.
Problem
Users spend time manually organizing cluttered workspaces, risking privacy by uploading sensitive files to cloud AI services.
Outcome
In under a second, the demo fixture of 10 files was scanned, 2 clutter anomalies flagged, 1 duplicate set detected, and no cloud API calls were made, demonstrating 100% offline operation.
Workflow
- Detect keyboard/mouse inactivity
- Scan target directory
- Extract 7 tabular signals
- Run Prior Labs TabPFN triage
- Flag anomalies
- Run Gemma 3 via Ollama for document understanding
- Generate organization plan
- Dry‑run preview
- Approve plan
- Move files
- Index in Tiger Data pgvector or local SQLite
- Provide semantic search
- Log actions in SQLite WAL
- Enable 1‑click rollback
Evidence
I built **slothd**, a local-first, offline-capable AI file organizer designed around the philosophy of **"Slow and Steady"**
Uses native OS APIs to measure keyboard and mouse inactivity. It sleeps while you work and only activates when you step away.
Fast metadata triage (1ms via local 7-signal engine, ~20ms via **Prior Labs TabPFN**) flags anomalies before invoking heavier models.
Uses **Gemma 3** running locally in **Ollama** with strict Pydantic JSON schemas to read PDFs, invoices, and images.
Every run is a dry‑run by default. Every approved move is written to an SQLite WAL log with a unique batch ID. If you dislike what it did, slothd undo restores every file to its exact original path.
The entire core workflow—idle detection, filesystem scanning, tabular metadata triage, Gemma 3 document understanding via local Ollama, SQLite WAL manifests, and 1‑click rollback—executes **100% locally on your machine with zero internet calls.
Anyone can clone and run the scan immediately: git clone https://github.com/JaniDhruv/slothd.git uv run slothd scan test_workspace/messy_inbox
- Record date: 2026-11-02T12:14:05.625Z