*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady](https://dev.to/challenges/hacktoberfest-week3-2026-10-19)*
## What I Built
**Inbox Sloth** is a lightweight, pure-Python local chat triage engine and CLI utility designed to save developers and open-source maintainers from messy inbox overwhelm.
In **v3.1**, Inbox Sloth evolves from a stateless CLI tool into a persistent local assistant. It automatically digests chat logs, classifies messages into actionable operational states (π¨ **Urgent**, π
**Moderate**, π΄ **Chill**), generates instant suggested replies, and now **automatically persists historical execution metrics locally using SQLite** (`sloth_history.db`) with full **Sentry Agent Tracing** telemetry tracking.
It gets busy developers a little lazier by eliminating manual chat scanning and keeping a historical log of communication patterns right on their local machineβzero heavy container overhead or mandatory cloud API keys required.
## Demo
You can check out the open-source repository and codebase here:
- **GitHub Repository:** [MUBARAK-53/inbox-sloth](https://github.com/MUBARAK-53/inbox-sloth)
Quick CLI execution demo:
powershell
python sloth.py emergency.txt
## Code
Here is the core logic driving the SQLite persistence, heuristic triage engine, and Sentry telemetry tracing (`sloth.py`):
python
import os, sys, sqlite3, datetime, sentry_sdk
sentry_sdk.init(
dsn="https://88429cf795513cefa27646afd2a586ff@o4512305399398400.ingest.us.sentry.io/4512305423581184",
traces_sample_rate=1.0,
environment="hacktoberfest-pure-local"
)
DB_FILE = "sloth_history.db"
def init_db():
conn = sqlite3.connect(DB_FILE)
cursor = conn.cursor()
cursor.execute("""
CREATE TABLE IF NOT EXISTS triage_logs (
id INTEGER PRIMARY KEY AUTOINCREMENT,
timestamp TEXT,
filename TEXT,
urgency_level TEXT,
line_count INTEGER,
question_count INTEGER
)
""")
conn.commit()
conn.close()
def log_triage(filename, urgency, lines_count, questions_count):
init_db()
conn = sqlite3.connect(DB_FILE)
cursor = conn.cursor()
cursor.execute("""
INSERT INTO triage_logs (timestamp, filename, urgency_level, line_count, question_count)
VALUES (?, ?, ?, ?, ?)
""", (datetime.datetime.now().isoformat(), filename, urgency, lines_count, questions_count))
conn.commit()
conn.close()
def triage_chat(text):
lines = [l.strip() for l in text.splitlines() if l.strip()]
tl = text.lower()
if any(w in tl for w in ["bug", "fix", "error", "down", "broken", "asap", "production"]):
u, r = "URGENT - ACTION REQUIRED", ["I can look into this right away."]
elif any(w in tl for w in ["tomorrow", "today", "when", "who", "meet", "time", "still on"]):
u, r = "MODERATE", ["Sounds good, see you then!", "Works for me!"]
else:
u, r = "CHILL - IGNORE", ["Got it, thanks!", "Love that."]
qs = [l for l in lines if "?" in l]
return {"urgency_level": u, "morning_briefing": f"Processed {len(lines)} message lines. Found {len(qs)} question(s).", "suggested_replies": r, "lines": len(lines), "questions": len(qs)}
def run(fp):
if not os.path.exists(fp): return print("File not found")
with open(fp, "r", encoding="utf-8") as f: data = f.read()
print(f"\nπ¦₯ Inbox Sloth digesting '{fp}'...")
with sentry_sdk.start_transaction(op="agent.execution", name="local_triage_with_db"):
res = triage_chat(data)
log_triage(fp, res["urgency_level"], res["lines"], res["questions"])
print("\n" + "="*40 + "\n π INBOX SLOTH MORNING BRIEFING (Logged) \n" + "="*40)
print(f"π¨ Urgency Level : {res['urgency_level']}")
print(f"π Summary : {res['morning_briefing']}")
print(f"π‘ Suggested Reply: {res['suggested_replies'][0]}")
print("="*40 + "\n")
if name == "main":
run(sys.argv[1] if len(sys.argv)>1 else "sample_chat.txt")
## How I Built It
Inbox Sloth is built around pure, standard-library Python (`os`, `sys`, `sqlite3`, `datetime`) combined with **Sentry SDK** for robust execution tracing and performance monitoring (`agent.execution`).
For Week 3's *Slow and Steady* theme, the architecture emphasizes durability and local persistence. Instead of relying on volatile memory or expensive cloud AI wrappers, `v3.1` implements an embedded SQLite database (`sloth_history.db`) that silently records execution metadata, line densities, and urgency classifications during every run.
## Why Does Open Innovation Matter?
Open innovation and open-source tooling make it possible to build software that respects user privacy and runs entirely offline. When dealing with private communication logs, messages, and internal team threads, relying on closed commercial APIs introduces security risks and ongoing subscription costs. Inbox Sloth proves that powerful automation, local telemetry, and state persistence can be achieved transparently using standard libraries and open standards.
## My Agent Session
* **Telemetry & Tracing:** Integrated directly with Sentry Agent Tracing (`agent.execution` transactions) to track execution health, timing, performance, and telemetry during local file processing.
## The Lazy Payoff
Instead of manually opening and reading through raw chat exports every morning to figure out what's on fire and what can wait, Inbox Sloth digests logs in milliseconds, logs historical trends locally, and instantly hands you the exact urgency breakdown and suggested reply. It saves valuable mental bandwidth and cuts morning inbox triage time down to zero.
## Prize Categories
* **Best Use of Sentry Agent Tracing**
* **Open Source Track / Hacktoberfest Challenge**
Top comments (0)