跳到正文
DEV Community· Mayur·· 3 小時前AI 評分39

EcoSloth AI:用本地開放權重 AI 為舊電子產品尋找新用途

EcoSloth AI: Don't Throw It Away. Let Local Open-Weight AI Find Its Next Life 🦥🌱

AI 導讀

EcoSloth AI 是一款本地優先、保障私隱的 AI 助手,協助用戶為廢棄或老舊電子產品評估維修、重用、捐贈、轉售或回收等出路。它可評估安全風險、生成準備清單,並以離線 SQLite 數據庫記錄處理結果;用戶描述裝置後,不到 3 秒即可取得分流建議和交接清單。

正文

Mayur

Mayur

Posted on Oct 24 AI-assisted

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

Submission Post Body:

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

What I Built

EcoSloth AI is a local-first, privacy-preserving AI assistant engineered to slow down the relentless tide of electronic waste (e-waste).

Every year, millions of smartphones, laptops, monitors, and tablets are either tossed into municipal garbage bins or left forgotten in drawers because figuring out what to do with them feels exhausting:

  • Is this 6-year-old laptop worth fixing or repurposing?
  • How do I safely sign out of iCloud/Google and sanitize the storage so my data isn't exposed?
  • Is this bulging battery hazardous?
  • Where can I find an authenticated, certified e-waste recycler that won't just dump toxic waste abroad?

Instead of rushing to the trash can, EcoSloth AI embodies the “Slow and Steady” mindset. Users describe an unwanted electronic device (and optionally provide a photo). The local open-weight AI immediately:

  1. Performs safety hazard triage: Detects swollen lithium-ion pouch cells or high-voltage CRT internals and issues immediate physical containment instructions.
  2. Synthesizes a circular next-life pathway: Prioritizes repair and creative repurposing over premature shredding.
  3. Generates non-destructive preparation checklists: Walks users step-by-step through account decoupling, factory resets, and battery terminal insulation.
  4. Tracks e-waste diversions locally: Records outcomes (Repaired, Reused, Donated, Resold, Recycled) in an offline SQLite database without fabricated carbon claims.

Who gets to be a little lazier because of it?
Anyone with a "junk drawer" of old electronics. Instead of spending 45 minutes searching forums, reading motherboard teardown guides, and wondering which recycling depot is legitimate, EcoSloth AI delivers an actionable triage and handoff checklist in less than 3 seconds.

Demo

  • GitHub Repository & Source Code: https://github.com/Demo-For-Test/ecosloth-ai
  • Interactive Web App: Built with Streamlit (streamlit run app.py) featuring an Assess Device wizard, Interactive Checklists, Local E-Waste Tracker, Verified Recycler Hub, and Multi-Format Exports (Markdown, Plain Text, and Printable HTML).
  • CLI Demo Script: A zero-dependency CLI script is included to test realistic triage scenarios:
  python demo.py

Demo Terminal Output:

=================================================================
      [ECOSLOTH AI] LOCAL E-WASTE ASSISTANT DEMO
      'Don't throw it away. Let AI find its next life.'
=================================================================

--- Running Scenario 1: 6-Year-Old Working Laptop (Slow & Steady Reuse) ---
Device: ThinkPad T480 (Laptop / Ultrabook) | Condition: Working | Goal: Recycle
-> Assessed Category: Laptop / Ultrabook (Confidence: 90.0%)
-> Safety Hazard Status: SAFE
-> Primary Recommendation: Reuse
-> Action Title: EcoSloth Action Plan: Reuse Pathway
-> Reasoning: Slow & Steady Principle: Because this device is still fully functional, 
   direct recycling wastes embodied energy and materials. Repurposing keeps it in active circulation.
-> Creative Reuse Ideas:
   * Install a lightweight OS (Linux Mint, ChromeOS Flex) for basic browsing & student work
   * Home media server (Plex / Jellyfin) or local ad-blocker (Pi-hole)
-> Preparation Checklist:
   [ ] [BACKUP] Back up critical photos, documents, and license keys.
   [ ] [ACCOUNTS] De-authorize software licenses and sign out of accounts.
   [ ] [DRIVE WIPE] Securely erase storage drives using standard OS reset.
-> Saved to local history store (Record ID #1)

--- Running Scenario 2: Smartphone with Swollen Battery (Critical Hazard) ---
Device: iPhone 7 | Condition: Damaged / Partially Working | Goal: Repair
-> Safety Hazard Status: CRITICAL
   [!] WARNING: CRITICAL BATTERY HAZARD: Swollen, punctured, or leaking lithium-ion batteries 
   pose severe thermal runaway and fire risks.
-> Primary Recommendation: Recycle (Hazardous E-Waste Protocol)
-> Action Title: Immediate Safe Containment & Hazardous Battery Handling
-> Reasoning: CRITICAL SAFETY OVERRIDE: Physical battery damage detected. DIY repair is unsafe.

Code

GitHub logo Demo-For-Test / ecosloth-ai

EcoSloth AI - Local AI-Powered E-Waste Assistant for Hacktoberfest 2026 (Week 3: Slow and Steady)

🦥 EcoSloth AI — Local AI-Powered E-Waste Assistant

“Don't throw it away. Let AI find its next life.”

License: MIT Python 3.10+ Local AI: Ollama Streamlit UI Tests: Pytest

EcoSloth AI is a local-first, privacy-preserving AI assistant built for the DEV Open-Source AI Challenge (Hacktoberfest 2026, Week 3: “Slow and Steady”). It helps individuals and organizations evaluate discarded or aging electronic devices to find the most responsible and circular next-life pathway: Repair, Reuse, Donate, Resell, or Responsibly Recycle.


🌟 Motivation & Problem Addressed

Electronic waste (e-waste) is the world's fastest-growing municipal waste stream. When electronics are discarded prematurely:

  1. Embodied Energy is Lost: Up to 80% of a computer's total lifetime carbon footprint occurs during manufacturing and rare-earth extraction.
  2. Toxic Chemicals Leach: Heavy metals (lead, cadmium, mercury) pollute soil and water if landfilled.
  3. Batteries Cause Fires: Crushed lithium-ion batteries are a leading cause of fires in municipal recycling trucks and waste sorting facilities.

Most people discard devices simply because researching…

The repository is modular and open-source under the MIT license:

  • app.py: Streamlit multi-page interface with real-time model switching and local SQLite dashboard.
  • services/safety_rules.py: Deterministic hazard engine guaranteeing safety boundaries regardless of LLM temperature.
  • services/device_assessor.py: Category classifier and question generator.
  • services/recommendation_engine.py: Circular triage logic mapping devices to repair, reuse, donation, resale, or recycling.
  • services/checklist_generator.py: Non-destructive preparation instructions.
  • services/image_analyzer.py: Multimodal vision inspection with local models and anti-hallucination disclaimers.
  • services/history_store.py: Local SQLite persistence for device outcomes.
  • services/export_service.py: Generates Markdown, TXT, and printable HTML reports.
  • tests/: 14 automated unit tests verifying model disconnections, malformed JSON, and safety overrides.

How I Built It

EcoSloth AI is built around a local-first, open-weight AI architecture:

  • Local Inference Engine: Powered by Ollama, running open-weight models on localhost:11434.
  • Primary Text Models:
    • llama3.2:3b (Meta Llama 3.2 Community License) & qwen2.5:3b (Apache 2.0) for fast, structured JSON generation and device triage.
    • llama3.2:1b for ultra-low resource devices (runs on 2 GB RAM).
  • Multimodal Vision:
    • llama3.2-vision:11b and llava:7b for local physical device and damage inspection.
  • Structured Validation: Pydantic v2 schemas (DeviceInput, RecommendationOutput, DeviceAssessmentResult) ensuring reliable, strictly validated JSON schemas from model outputs.
  • Deterministic Hybrid Safety Layer: LLMs are paired with deterministic rule engines. If a user describes a swollen pouch cell or a high-voltage cathode-ray tube, immutable code overrides the prompt to enforce physical containment before calling the model.
  • Offline Fallback Architecture: If Ollama is offline or uninstalled, the system seamlessly transitions to a built-in deterministic heuristic engine. The app never crashes when offline.

Why Does Open Innovation Matter?

Open innovation is what made EcoSloth AI possible:

  1. Hardware & Personal Data Privacy:
    E-waste triage involves serial numbers, device specs, accounts, and photos of private home spaces. Sending this telemetry to closed commercial cloud APIs (like OpenAI or Anthropic) introduces ongoing SaaS subscription fees and privacy exposure. Open weights allow users to triage tech completely offline on their own hardware with zero data egress.

  2. Perpetual Software Longevity:
    Closed APIs suffer from deprecation schedules, price hikes, and sudden endpoint shutdowns. An e-waste tool that stops working because a commercial vendor changed their API pricing defeats the purpose of sustainability. Open weights downloaded via Ollama will run in 10 years exactly as they do today.

  3. Responsible AI Transparency:
    Commercial black-box models often claim they can "see everything." With open-source models, we can inspect model weights, verify licenses (Apache 2.0 / Llama Community), benchmark exact capabilities, and candidly document that ordinary cameras cannot detect internal battery degradation behind aluminum casings.

My Agent Session

This application was engineered with pair programming assistance from an autonomous AI coding agent. The agent handled:

  • Architecture scaffolding and Pydantic schema validation
  • Developing deterministic regex-backed safety firewalls
  • Writing a comprehensive pytest test suite with mocked Ollama API responses
  • Crafting clean Streamlit UI components and multi-format export engines

The Lazy Payoff

Before EcoSloth AI:
You find an old 2018 iPad or a 2017 ThinkPad in a closet. To do the right thing, you had to:

  • Google whether the battery is still safe: 10 mins.
  • Search Apple/Lenovo forums for how to remove activation locks and wipe data without bricking the device: 15 mins.
  • Browse Reddit for repurposing ideas (can it run Linux or act as a smart home monitor?): 15 mins.
  • Search municipal sites for real e-waste drop-offs that don't charge hidden fees: 10 mins. Total effort: ~50 minutes of friction. Result: Most people give up and leave it in the drawer or throw it in the trash.

With EcoSloth AI:

  1. Pick device category and condition (30 seconds).
  2. Click "Generate Next-Life Action Plan" (2 seconds).
  3. Follow the interactive checklist (decouple accounts, factory reset, apply thermal tape).
  4. Export the Markdown plan or print a physical handoff label. Total effort: 2 minutes. The laziness hurdle is completely gone, and another device stays out of the landfill.

Prize Categories

  • Primary Track: Hacktoberfest Open-Source AI Challenge — Week 3: “Slow and Steady”

This file has also been saved to docs/hacktoberfest_article.md and pushed to your GitHub repository.

來源:DEV Community · dev.to